Opened 13 years ago

Last modified 12 months ago

#18004 new defect

php 5.2.8 generates "zend_mm_heap corrupted", crashes apache2

Reported by: steven@… Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc: jyrkiwahlstedt, chrstphrchvz (Christopher Chavez)
Port: php5

Description (last modified by blb@…)

Some system details:

ProductName: Mac OS X ProductVersion: 10.5.6 BuildVersion: 9G55
GCC: i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)

ports installed:
apache2                        @2.2.11         www/apache2
php5                           @5.2.8          www/php5
mysql5                         @5.0.75         databases/mysql5

build command:
install php5 +mysql5 +apache2 +macosx

Everything compiles and installs correctly. The issue is in the usage. Namely when I use "owl intranet" http://owl.anytimecomm.com/.

What happens? I installed owl intranet, made the database, created the tables etc etc. Then I log on with the default username/password, and I noticed I had too little text on my page. So after a lot of searching I saw in the apache2 errorlog:

[Thu Jan 15 06:57:21 2009] [error] [client 192.168.178.21] File does not exist: /data/www/favicon.ico
zend_mm_heap corrupted

This zend_mm_heap is reported everytime after I hit a large webpage in owl.

After some time the Apache2 webserver just crashes.

I have been using Apache2 + dav_svn for a really long time now (+- 6 months or so), so I don't think it's an issue in Apache.

If you need more information or if I can test something, please let me know!

-- Steven

Change History (14)

comment:1 Changed 13 years ago by steven@…

Just tried another approach: cd /opt/local/apache2/modules mv libphp5.so libphp5.so.528 cp /usr/libexec/apache2/libphp5.so .

==> Works like a charm! No errors, nothing, and the page is correctly displayed.

comment:2 Changed 13 years ago by blb@…

Cc: jwa@… added
Description: modified (diff)
Owner: changed from macports-tickets@… to ryandesign@…

comment:3 Changed 13 years ago by ryandesign (Ryan Schmidt)

I don't think we can help you with this. It looks like a PHP bug, so the PHP developers would be the ones equipped to help you with it. I see similar problems have been reported to them before but nobody could provide a simple reproduction recipe so I don't see a resolution in any of these bugs:

http://bugs.php.net/bug.php?id=40479

http://bugs.php.net/bug.php?id=40466

http://bugs.php.net/bug.php?id=42809

http://bugs.php.net/bug.php?id=47086

You could try the php5-devel port instead of the php5 port, to see if this is something that has been fixed in PHP 5.3 alpha 3. Some comments also suggested that eAccelerator, APC or other PHP extensions may be implicated; if you're using any, disable them and try again.

comment:4 Changed 13 years ago by steven@…

Thanks Ryan,

I am not using any extensions for PHP except the ones that macports compiles in by default.

I will give php5-devel a shot and report back.

Thanks, Steven

comment:5 Changed 13 years ago by ryandesign (Ryan Schmidt)

I didn't see your other remark before I replied. Interesting that using Apple's PHP module instead of MacPorts works. However there are numerous differences between them, from the version of PHP to the options it's configured with. If you can narrow it down to a particular version of PHP that broke it, or a particular configure option that causes it, and especially a simple recipe in PHP that shows the problem, I'm sure that would go a long way toward helping the PHP developers fix it.

comment:6 Changed 13 years ago by steven@…

Ryan, no such luck. Even with the PHP5-devel port I'm getting the problems. Reverting back to the default Mac one causes everything to work perfectly.

comment:7 Changed 13 years ago by steven@…

What I noticed if I configure php with the command line from macports is this:

Notice: Following unknown configure options were used:
--with-xml

comment:8 Changed 13 years ago by ryandesign (Ryan Schmidt)

That's covered by #14859. If you know what I should do with that option (remove it or change it to something else) please let me know.

comment:9 Changed 13 years ago by steven@…

What I see is "with-xml-dir" and "enable-xml"... So probably it's one of those ;).

I think I got the problem down to it's knees! But more testing tomorrow. I think it's some option in the php.ini file that makes it behave different somehow.

comment:10 Changed 13 years ago by steven@…

Hi Ryan,

I got it down to these 3 php.ini variables:

variables_order
  - NOK: EGPCS
  - OK: GPCS
register_long_arrays
  - NOK: On
  - OK: Off
magic_quotes_gpc
  - NOK: On
  - OK: Off

What I mean:

  • cp /opt/local/etc/php.ini-dist /opt/local/etc/php.ini
  • vim /opt/local/etc/php.ini && /opt/local/apache2/bin/apachectl restart

==> Edit one of those 3 variables, and the behaviour will be ok. ==> No need to even do all those 3, just one of them and the behaviour will be ok. That's the weird thing about it.

Greetings, Steven

comment:11 Changed 13 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:12 Changed 8 years ago by jmroot (Joshua Root)

We no longer have a port for PHP 5.2. Close?

comment:13 Changed 12 months ago by chrstphrchvz (Christopher Chavez)

There is still a php52 port. Who knows whether this issue is still present.

comment:14 Changed 12 months ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added
Note: See TracTickets for help on using tickets.