Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

334
Views
Unable to generate pdf on server side in NGNIX

I am using Dompdf (v-0.8.2) to generate pdf on the server-side. My server is NGINX and I am using CodeIgniter 2.41 (PHP framework) for PDF generation. PDF is being generated in the localhost without any errors whatsoever. But when I try to generate the same pdf on the server side it gives this error,

   [error] 31558#31558: *4 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: 
   Call to undefined function Dompdf\mb_internal_encoding() in 
  /application/libraries/dompdf/src/Dompdf.php:274
     Stack trace:
   #0 /application/libraries/Pdf.php(17): Dompdf\Dompdf->__construct()
   #1 /system/core/Loader.php(1100): Pdf->__construct()
   #2 /system/core/Loader.php(976): CI_Loader->_ci_init_class('pdf', '', 
    NULL, NULL)
   #3 /system/core/Loader.php(217): CI_Loader->_ci_load_class('Pdf', NULL, 
     NULL)
   #4 /application/third_party/HMVC/Loader.php(138): CI_Loader- 
    >library('pdf', NULL, NULL)

I tried upgrading my dompdf version to 0.8.5. but still the error is not resolving. Does anyone have an idea of how to resolve the error.

Thank you in advance, cheers. :)

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

mbstring is a "non-default" extension, that is not enabled by default ;

try to install or enabled mbstring extension

sudo apt-get install php(version)-mbstring

ex.: sudo apt-get install php7.3-mbstring

for enabling extension use sudo phpenmod mbstring

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!