server - Class 'mPDF' not found in Yii2 -


i have problem page on server. i'm using yii2 framework , mpdf; configured according instructions: http://www.bsourcecode.com/yiiframework2/create-pdf-files-using-mpdf-in-yiiframework-2-0/

page work on localhost on windows , xampp when try run page on debian 8 have error:

class 'mpdf' not found 

configuration: http://www.bsourcecode.com/yiiframework2/create-pdf-files-using-mpdf-in-yiiframework-2-0/

function in php:

public function actioncreatepdf()     {         $request = yii::$app->request;         $generate_table = $request->post();          $mpdf = new mpdf;         $mpdf->writehtml($this->renderpartial('view_pdf', ['data'=>$data]));         $mpdf->output('data.pdf', 'd');         exit;     } 

i have no idea i'm doing wrong, it's not running on debian

in case resolved, adding 'mpdf\' => array($vendordir . '/mpdf') autoload_psr4.php required me namespace of class files in ../mpdf/classes using line namespace mpdf; among errors fixed changing include include_once prevent php seeing classes duplicate declaration despite presence of class_exists() test


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -