This topic is locked

PHPExcel and the zip library

7/13/2015 4:05:42 AM
PHPRunner General questions
A
aptivus author

Hello everyone,

maybe someone of you is experiencing the same issue I am.

I mean, the error

stream_wrapper_unregister() [function.stream-wrapper-unregister]: Unable to unregister protocol zip://



when trying to export records.

It is caused by a lacking zip library in the php configuration of your hosting provider.

I have found several refs to Mark Beker online, that is the project leader of PHPExcel, and he always suggests to use this line:

PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP)



to solve the issue.
What is not clear is: where to put it?

It should be pasted in the file that does the excel magic, but what is on phprunner?
I have also found this resource (even if it should fit for PHPExcel versions < 1.6, because starting from 1.6 the PCLZIP lib is included in the package), but still, how to apply it to a phprunner project?

Thank you

Sergey Kornilov admin 7/13/2015

You need to enable zip extension in PHP settings (php.ini) in order to fix this.

A
aptivus author 7/13/2015



You need to enable zip extension in PHP settings (php.ini) in order to fix this.


that what I cannot do, Sergey.

Not allowed by my hosting provider.

Any chance to use the PCLzip?

Sergey Kornilov admin 7/13/2015

PHPExcel library requires zip extension. Neither you nor I can change it.

A
aptivus author 7/16/2015



PHPExcel library requires zip extension. Neither you nor I can change it.


Sergey,

I have found several refs to Mark Beker online, that is the project leader of PHPExcel, and he always suggests to use this line:
PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP)
So PHPExcel could be used with that library instead of the usual zip extension.

I just want to know which file is the one that makes the excel.

Just that. After that I could try myself how to implement that solution.

Would you share that info?

I have found the exportpage.php class, but i am not sure it is the looked for.

Or maybe I should take a MYPAGE_export.php...

Any help?

Thank you.