Read and write spreadsheet works once, then web server must be restarted.

Topics: Developer Forum, User Forum
Aug 31, 2009 at 10:18 PM
Edited Aug 31, 2009 at 10:19 PM

First off great product, did exactly what I needed it to. Then the second time I tried to run it, it would not go. Basically what I do is read in a spreadsheet, append some values from the db, then spit out the sheet again.

I am running WAMP server 2.0 for Vista 64 bit and the newest release of PEAR PHPExcel. The errors that appear everytime after the initial and successful run are:

Warning: Attempt to assign property of non-object in C:\wamp\www\trunk\PEAR\PHPExcel\Reader\Excel2007.php on line 200

Warning: Attempt to assign property of non-object in C:\wamp\www\trunk\PEAR\PHPExcel\Reader\Excel5.php on line 479

Warning: Attempt to assign property of non-object in C:\wamp\www\trunk\PEAR\PHPExcel\Reader\Excel5.php on line 497

Fatal error: Call to a member function read() on a non-object in C:\wamp\www\trunk\PEAR\PHPExcel\Reader\Excel5.php on line 500.

The local webserver has to be restarted every time I want to re-run the report for it to work. I wanted to see if this was a server issue so I tried running this in our production server running Gentoo, and received this error:

Fatal error: Class 'ZipArchive' not found in /var/www/localhost/htdocs/PEAR/PHPExcel/Reader/Excel2007.php on line 217

At the moment I am recompiling php with zip enabled for the linux server which I think should fix the production issue. The development server is running without the zip extension enabled, but it still completed successfully so I do not know what the problem is. I hope somebody can help me with this.

 

Thanks,

Jeramie.

Developer
Sep 1, 2009 at 4:31 AM

These are some weird errors. I suggest we look at one thing at a time. Let us know if you get the script running on the Gentoo Linux server after recompiling with zip extension.