php - Class 'ZipArchive' - PHPExcel -


i following error in program called "collective access", not sure go here given haven't ever had experience type of issue before:

php fatal error:  uncaught error: class 'ziparchive' not found in /var/www/html/providence/app/lib/core/parsers/phpexcel/phpexcel/reader/excel2007.php:94 stack trace: #0 /var/www/html/providence/app/lib/core/parsers/phpexcel/phpexcel/iofactory.php(268): phpexcel_reader_excel2007->canread('project/mapping...') #1 /var/www/html/providence/app/lib/core/parsers/phpexcel/phpexcel/iofactory.php(191): phpexcel_iofactory::createreaderforfile('project/mapping...') #2 /var/www/html/providence/app/models/ca_data_importers.php(768): phpexcel_iofactory::load('project/mapping...') #3 /var/www/html/providence/app/lib/ca/utils/cliutils.php(1147): ca_data_importers::loadimporterfromfile('project/mapping...', array, array) #4 /var/www/html/providence/support/bin/cautils(166): cliutils::load_import_mapping(object(zend_console_getopt)) #5 {main}   thrown in /var/www/html/providence/app/lib/core/parsers/phpexcel/phpexcel/reader/excel2007.php on line 94 

if can help, i'd appreciate it.

ps - code around line 94 of file referring to:

$xl = false;     // load file     $zip = new $zipclass;     if ($zip->open($pfilename) === true) {         // check if ooxml archive         $rels = simplexml_load_string($this->_getfromziparchive($zip, "_rels/.rels"), 'simplexmlelement', phpexcel_settings::getlibxmlloaderoptions());         if ($rels !== false) {             foreach ($rels->relationship $rel) {                 switch ($rel["type"]) {                     case "http://schemas.openxmlformats.org/officedocument/2006/relationships/officedocument":                         if (basename($rel["target"]) == 'workbook.xml') {                             $xl = true;                         }                         break;                  }             }         }         $zip->close();     }      return $xl; } 

----edit ----

i'm using 7.0.15-0ubuntu0.16.04.4 php (or version 7.0 on ubuntu server 16.04.4)

the ziparchive class provided zip php extension that, according its documentation needs enabled on compilation of php (on linux) or in php.ini (on windows).

there great chance extension not available on system. write <?php phpinfo(); in new file, open in browser (through webserver) , check if zip extension compiled or enabled.

if script command line tool run phpinfo() file using php cli or run in terminal:

$ php -m 

to see list of loaded extensions (modules) or

$ php -i 

to see complete information displayed phpinfo().


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -