Page 1 of 1

PHP won't run after install

Posted: Wed Oct 24, 2007 1:25 am
by Castral
I recently tried to install PHP 5.2.4 on my laptop with Apache 2.2.6 (also tried Apache 2.0 but that failed as well with the same issue) on Windows XP Pro SP2. What happens is I basically go to start the apache server, and it will either fail to load, or it will crash whenever a php page is accessed with the following (or similar) error:
PHP Fatal error: Possible integer overflow in memory allocation (3224591711 * 4 + 0) in Unknown on line 0
It used to spit up a bunch of other errors, like "Cannot load dynamic library" etc but I fixed those, and I've narrowed it to the point where that is the ONLY error I get in the apache logs when I attempt to start it.

In my apache httpd.conf I use php5apache2_2_filter.dll because php5apache2_2.dll tries to use close to a gig of ram (my laptop only has a gig installed), but for some reason the _filter.dll only tries to use about 350mB of ram. PHP.ini contains nothing special, I had to up the memory limit to 512M (could probably be lower) or it'd return a different error. I ran Memtest86+ and everything is fine with that. The error I get with the regular .dll is:
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 1074993672 bytes) in Unknown on line 0
Should I just try an older PHP5 version?

Thanks in advance.

Posted: Wed Oct 24, 2007 11:21 am
by RobertGonzalez
How did you install Apache and how did you install PHP?

Posted: Wed Oct 24, 2007 2:44 pm
by Castral
First, I ran the Apache MSI installer, installed to C:\Apache. I pointed the DocumentRoot to C:\www. Then, I ran the PHP MSI installer with no extensions at all. I verified that PHP ran by using an index.php with <? phpinfo(); ?>, which it did. Then I reran the PHP MSI to install extensions, and thats when I was receiving the errors. For some reason, if I didn't install the extensions after installing everything else, I would get a bunch of "Cannot Load Dynamic Module" errors for files that actually existed in the C:\PHP\ext directory.

Since you made me think about my process, it occurred to me that an extension was causing the problem.

I managed to narrow it down to the "threads" extension. For some reason when this loads it causes PHP to crash. Removing it makes everything work as expected. Thanks for making me pay attention :D I guess its not a windows-compatible extension... or relies on something I don't have.

Posted: Wed Oct 24, 2007 3:13 pm
by RobertGonzalez
It might depend on Apache, and if it is Apache 2.0 vs 2.2, and whether the MPM module is installed on Apache and various other things.

But I am glad you got it sorted out.