ZipArchive is not working in Extbase + typo3


 
When we create a new zips “$zip = new ZipArchive();”

However, we get always the following error message:

Fatal error: Class ‘TYPO3 \ .. \ Domain \ Repository \ ZipArchive’ not found in … / Classes / Domain / Repository / XXXRepository.php on line 143.

Zip works nicely on the server. A simple PHP script which zips a file running properly in server.

In Extbase we have to add backward slash [ \ ] infront of class name.

Following script should do the trick.

$zip = new \ZipArchive();

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s