Same vendor folder of one server is not working on another server. There may be reason that working server has php 5.5 and non working server has php 5.6
Add following lines in file vendor/composer/autoload_classmap.php
Add following lines in file vendor/composer/autoload_classmap.php
'UCDN' => $vendorDir . '/mpdf/mpdf/classes/ucdn.php', 'bmp' => $vendorDir . '/mpdf/mpdf/classes/bmp.php', 'cssmgr' => $vendorDir . '/mpdf/mpdf/classes/cssmgr.php', 'directw' => $vendorDir . '/mpdf/mpdf/classes/directw.php', 'grad' => $vendorDir . '/mpdf/mpdf/classes/grad.php', 'mPDF' => $vendorDir . '/mpdf/mpdf/mpdf.php', 'meter' => $vendorDir . '/mpdf/mpdf/classes/meter.php', 'mpdfform' => $vendorDir . '/mpdf/mpdf/classes/mpdfform.php', 'otl' => $vendorDir . '/mpdf/mpdf/classes/otl.php', 'tocontents' => $vendorDir . '/mpdf/mpdf/classes/tocontents.php', 'wmf' => $vendorDir . '/mpdf/mpdf/classes/wmf.php',Add following lines in file vendor/composer/autoload_static.php
'UCDN' => __DIR__ . '/..' . '/mpdf/mpdf/classes/ucdn.php', 'bmp' => __DIR__ . '/..' . '/mpdf/mpdf/classes/bmp.php', 'cssmgr' => __DIR__ . '/..' . '/mpdf/mpdf/classes/cssmgr.php', 'directw' => __DIR__ . '/..' . '/mpdf/mpdf/classes/directw.php', 'grad' => __DIR__ . '/..' . '/mpdf/mpdf/classes/grad.php', 'mPDF' => __DIR__ . '/..' . '/mpdf/mpdf/mpdf.php', 'meter' => __DIR__ . '/..' . '/mpdf/mpdf/classes/meter.php', 'mpdfform' => __DIR__ . '/..' . '/mpdf/mpdf/classes/mpdfform.php', 'otl' => __DIR__ . '/..' . '/mpdf/mpdf/classes/otl.php', 'tocontents' => __DIR__ . '/..' . '/mpdf/mpdf/classes/tocontents.php', 'wmf' => __DIR__ . '/..' . '/mpdf/mpdf/classes/wmf.php',Now run the same web page again in browser. You should not get error.
No changing, currenty give error Uncaught Error: Class 'Mpdf\Mpdf' not found i
ReplyDelete