ini_get() & ini_set() disabled.

Topics: User Forum
Feb 12, 2010 at 10:01 PM

Hi !

I discovered phpexcel a little ago and i was really eager to use it but ...

Here is the error msg i get on my multimania personnal web page :

Warning: ini_get() has been disabled for security reasons in /data/members/free/multimania/.../PHPExcel/Calculation/Functions.php on line 60

Warning: ini_set() has been disabled for security reasons in /data/members/free/multimania/.../PHPExcel/Calculation/Functions.php on line 62

Fatal error: Class 'ZipArchive' not found in /data/members/free/multimania/.../PHPExcel/Reader/Excel2007.php on line 217


After a little search i discovered that there ain't any free web hosting service for personnal use that allows the utilisation of ini_get() and ini_set() ..
And since i can't modify the php.ini ...

Is there any solution for that ?


Sorry if the question has already been asked :/

And thanks for any answer !

Feb 13, 2010 at 10:58 AM

For ini_set() and ini_get(), simply go into Functions.php and comment out those lines of code:

// $savedPrecision = ini_get('precision');
// if ($savedPrecision < 16) {
//    ini_set('precision',16);
// }

You do need php_zip enabled as well

Feb 13, 2010 at 5:09 PM

Thank you !

Yeah i tryed this and yeah i have to find a free web hosting that has enabled php_zip (hard task already tryed some) ...

I wondered if i used one of the first version of phpexcel that doesn't use php_zip it would be great ... But i somehow can't find on ur website any older version than 1.6.4 ...


Is there a sourceforge directory or smthg like that hidden somewhere here ?


Thanks for any answer !

Feb 13, 2010 at 9:54 PM
Edited Feb 13, 2010 at 9:55 PM

php_zip is only needed by PHPExcel_Reader_Excel2007, PHPExcel_Writer_Excel2007, PHPExcel_Reader_OOCalc. In other words, if you need PHPExcel to handle .xlsx or .ods files you will need the zip extension, but otherwise not. You can read/write Excel 5 without needing php_zip. No earlier version of PHPExcel has ever worked with Excel2007 without needing php_zip.

Most good web hosts will enable php_zip if asked.