• Resolved sagar1103

    (@sagar1103)


    Hello
    After upgrading the MPDF lib we are getting Uncaught Error: Class ‘Mpdf\Mpdf’

    In debug log I see the following error:

    [16-Sep-2021 09:40:41 UTC] PHP Warning:  include(/dom35255/wp-content/uploads/vendor/autoload.php): failed to open stream: No such file or directory in /dom35255/wp-content/plugins/pdf-print/pdf-print.php on line 1156
    [16-Sep-2021 09:40:41 UTC] PHP Warning:  include(): Failed opening '/dom35255/wp-content/uploads/vendor/autoload.php' for inclusion (include_path='.:/usr/local/lib/php') in /dom35255/wp-content/plugins/pdf-print/pdf-print.php on line 1156
    [16-Sep-2021 09:40:41 UTC] PHP Fatal error:  Uncaught Error: Class 'Mpdf\Mpdf' not found in /dom35255/wp-content/plugins/pdf-print/pdf-print.php:1167
    Stack trace:
    #0 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(292): pdfprnt_print(Object(WP))
    #1 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
    #2 /wordpress-versions/5.7.3/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
    #3 /wordpress-versions/5.7.3/wp-includes/class-wp.php(763): do_action_ref_array('wp', Array)
    #4 /wordpress-versions/5.7.3/wp-includes/functions.php(1291): WP->main('')
    #5 /wordpress-versions/5.7.3/wp-blog-header.php(16): wp()
    #6 /wordpress-versions/5.7.3/index.php(17): require('/wordpress-vers...')
    #7 {main}
      thrown in /dom35255/wp-content/plugins/pdf-print/pdf-print.php on line 1167
    • This topic was modified 3 years, 5 months ago by sagar1103.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support andrewsupport

    (@andrewsupport)

    Hi,

    It is possible that the problem is related to the permissions set for files and folders. Please make sure that folders wp-content, themes, plugins, uploads (and all folders inside them) have permissions 755, and all files inside them – 644.

    Thread Starter sagar1103

    (@sagar1103)

    Hi, @andrewsupport
    Thank you for your reply. I cross-checked with the hosting server and it’s not related to permissions. It is related to the vendor mPDF folder path. When I updated the mPDF Lib the vendor folder vendor -> mpdf folders get generated under the path /wp-content/uploads/ but our hosting server doesn’t allow the PHP script inside the uploads folder. It is not good practice to place the PHP scripts file in this location.
    Can we move the vendor folder in our plugin’s folder path /wp-content/plugins/pdf-print
    ?

    Plugin Support andrewsupport

    (@andrewsupport)

    Hi,

    To solve your problem, please contact us via our Help Center (https://support.bestwebsoft.com/)

    Thread Starter sagar1103

    (@sagar1103)

    Thank you. I have submitted the ticket via https://support.bestwebsoft.com/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Uncaught Error: Class ‘Mpdf\Mpdf’’ is closed to new replies.