Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

Can't import mapper

Hi all,

I can't seem to import a mapper spreadsheet. If I try to ingest it though the webUI, the file just downloads itself again and doesn't go into the importer list. If I try through caUtils, I get the following error:

www@ca:/var/www/html/staff/support$ bin/caUtils load-import-mapping --file=/media/usb/camappings/schools_uc_mapper.xlsx
CollectiveAccess 1.7.6 (153/RELEASE) Utilities
(c) 2013-2018 Whirl-i-Gig

PHP Fatal error: Uncaught Error: Class 'ZipArchive' not found in /var/www/html/staff/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php:94
Stack trace:

0 /var/www/html/staff/vendor/phpoffice/phpexcel/Classes/PHPExcel/IOFactory.php(268): PHPExcel_Reader_Excel2007->canRead('/media/usb/cama...')

1 /var/www/html/staff/vendor/phpoffice/phpexcel/Classes/PHPExcel/IOFactory.php(191): PHPExcel_IOFactory::createReaderForFile('/media/usb/cama...')

2 /var/www/html/staff/app/models/ca_data_importers.php(766): PHPExcel_IOFactory::load('/media/usb/cama...')

3 /var/www/html/staff/app/lib/ca/Utils/CLIUtils.php(1231): ca_data_importers::loadImporterFromFile('/media/usb/cama...', Array, Array)

4 /var/www/html/staff/support/bin/caUtils(167): CLIUtils::load_import_mapping(Object(Zend_Console_Getopt))

5

thrown in /var/www/html/staff/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php on line 94
www@ca:/var/www/html/staff/support$

The mapper is attached.

I am using a fresh install of Providence 1.7.6 on Debian with the latest Apache, php7.0, mySQL. "Check Configuration" in Providence shows all OK.

I have tried apt-get upgrade, but I don't think that what is throwing the error is caused by an apt package. (Didn't change anything after the upgrade attempt.)

I'm SSHing into the server, but have the mapper physically attached on a USB stick.

Yours,

Chris Litfin

Comments

  • Edit: I thought it might have had something to do with the fact that it was running on a crummy old 32-bit desktop that I use for sandboxing, but it does the exact same thing on my slightly-less-crummy 64-bit sandbox as well. As above, I am using a fresh install of Providence 1.7.6 on Debian with the latest Apache, php7.0, mySQL. "Check Configuration" in Providence shows all OK.

  • Make sure the PHP Zip extension is installed.

  • Hi Seth,
    Is that a new required package? A PECL package? I can’t find any reference to it in the CA documentation.
    Yours,
    Chris Litfin
  • It's often installed by default. It's a PHP extension, not PECL. It's a requirement of PHPExcel.

  • OK, Seems to now be fixed.

    I ran apt-get install php7.0-zip and the mapping importer imported successfully.

    I did some digging and it seems that php zip is (now?) not included by default in the Debian repo version of php7.0.

    I have updated my install script (https://github.com/ChrisLitfin/install_ca) to explicitly install php zip.

Sign In or Register to comment.