scholarslab / BagItPHP

A PHP implementation of https://wiki.ucop.edu/display/Curation/BagIt.
http://scholarslab.github.com/BagItPHP/
Apache License 2.0
28 stars 10 forks source link

Attempted to load class "ZipArchive" from the global namespace. #23

Closed whikloj closed 4 years ago

whikloj commented 4 years ago

Related to https://github.com/mjordan/islandora_bagger/issues/38

This is where your installed version of PHP does not have the Zip extension installed which BagItPHP assumes. This results in an error like.

In bagit_utils.php line 437:

  Attempted to load class "ZipArchive" from the global namespace.  
  Did you forget a "use" statement?                                
mjordan commented 4 years ago

@whikloj Zip is installed: output from php -i | grep -i zip includes "ZIP-based phar archives => enabled".

mjordan commented 4 years ago

sudo apt-get install php7.2-zip got it to work.

php -i | grep -i zip now includes "Zip => enabled".