Showing posts with label zip. Show all posts
Showing posts with label zip. Show all posts

Symfony 2 and ZipArchive - class not found!

It was crazy. I was trying to make my ZipArchive work and I know now, that it was already working just Symfony2 did not knew about it!

Fatal error: Class 'Demo\AcmeBundle\Controller\ZipArchive' not found 





php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory while installing php zip

I was trying to use ZipArchive, but i got an error:
Fatal error: Class 'ZipArchive' not found
Then I started to Google how to install zip extension on my Ubuntu Apache 2 server. I have PHP version 5.3.10 and in configuration it says, that zip is enabled. This information you can get with these 2 simple commands:

How to make PHP unrar and unzip recursively folder with files?

Simple task - unzip zip archive and unrar rar archive. With zip it's all easy, just some basic PHP default ZipArchive class and you have it, but with rar - why to make things more complicated?