Apache crash due to PHPExcel...

Topics: User Forum
Mar 22, 2010 at 9:28 PM


First off, I would like to thank to the developers of such wonderful script, PHPExcel. I've been using it for a while for on the fly Excel editing stuff with PHP. Most of time, I create an excel file with MS Excel GUI and then use it as a template for PHPExcel.

Today, I wanted to use a relatively larger XLS file with a file size of approximately 100 KB. I experienced "out-of-memory" errors as the PHP memory limit was 32 MB. I didn't think of updating PHP memory settings since I wouldn't have priveleges to access php.ini on any servers that I have to deal with. Thus, the right decision appeared to be some attempt to resolve the problem in application side. To this end, I first wanted to look at this web site to see whether some workarounds, suggestions and something related can be found. Consequently, I realized that my PHPExcel was somewhat old and a newer version is available (I guess it was 7.2).

After installing the newest version of PHPExcel from this website, the behaviour of the php script that uses PHPExcel has changed. Previously, the same script that was giving "out-of-memory" errors has started to make Apache crash. I've run into Apache logs and got the following message :

[notice] Parent: child process exited with status 3221225725 -- Restarting.

After some investigations, I've found out that in the meantime PHPExcel creates some TMP files in the temporary folder. I don't know if it fails while creating these files or upon their creation.

All information I have is above. I guess the main problem is that the xls file is a bit larger than PHPExcel want it to be.

How can I overcome it? And what are your opinions ?

Thank you very much for reading so far.


Mar 22, 2010 at 9:36 PM

Some details of my development environment that I should've given:

- XAMPP 1.6.7 (PHP 5.2.6, Apache 2.2.9)

- Windows 7



Mar 22, 2010 at 10:17 PM
Edited Mar 22, 2010 at 10:18 PM

I'm assuming 64-bit Windows 7.

I've been experiencing problems with Apache on Windows 7 myself. I know that if I stop Apache through the xampp console, it triggers an error; and if a script times out, it also triggers an Apache error, and I get the same

[notice] Parent: child process exited with status 3221225477 -- Restarting.

message written to the Apache error log.

I'm investigating, but have noted that the error only occurs on my Windows 7 box. It isn't a problem on Windows XP, Vista or Linux.

Mar 22, 2010 at 11:02 PM

Yes, I'm using 64-bit Windows 7.

Actually, I'd be happy if the error is only something related to Windows. Because I use windows machine only for development purposes, for production, I always use Linux or derivatives.

I'm planning to test the script with new version of PHPExcel on production server to see the problem exists on this platform too. If it works on Linux, the problem can be ignored -- at least for me.

Nonetheless, I'm looking forward to seeing some suggestions to overcome the issue.




Mar 23, 2010 at 1:01 AM

I'm looking for a 64-bit build of Apache/PHP for Windows 7 to see if the problem still exists then: xampp is 32-bit.

If I can't find one, I may well have to do my own manual build.

Mar 23, 2010 at 1:12 PM

I've tested the script on a Linux machine.

Unfortunately the script caused a similar effect on a Linux machine too. Apache crashed again and I got a blank page. But at the moment, I couldn't ensure that the exact error message and number are the same with those occured in windows machine.

The script does a simple thing, open a specific excel sheet and writes to the response stream. It doesn't contain any editation nor any such operations.

Here is the excel file that causes the error:


Any help is really appreciated.





Mar 26, 2010 at 6:05 AM

It looks like the problem is the with formulas in cells Q130 and U130. Excel5 writer does not yet support defined names in formulas. It goes into some kind of function nesting infinite loop.


I have written this on my list to see if there is a quick solution.

Mar 26, 2010 at 8:43 AM

Thank you very much for your interest.

Actually, I've borrowed this XLS file from somewhere else and didn't realize that it contained such a formula. If I had done, I'd remove it since the formula wasn't that necessary.

After removing the "named formula", it worked smoothly as expected. Thus, I've got that a 100 KB file is not that large for PHPExcel to process -- it handles it in a few seconds, nice work! --

Thank you again for excellent work and cordial efforts to resolve the issue.