The script works perfectly from the command line. It turns out to be related directly to Apache 2.0 and the handling of buckets.


gdb gave me a great deal of information. It told me that I have another module trying to read from an apr_bucket of type POOL which is supplied by the PHP module. In my module, I put in a line of code to log the bucket type and also print the contents if it is a POOL type bucket. It appears that every bucket contains the same thing. It also logs a bucket type (bucket->type->name) that I have never seen :


bucket type \x18\x10\n\b\x18\x80\x16\b\x18\xe0\x0e\b\x1c\x10\n\bxB\x16\b

So, is there a special way that PHP is supposed to tell other modules that the brigade is complete (the EOS bucket obviously is not working). Additionally, the gdb output revealed that the service is calling lockname() in the PHP module a great deal. I don't know if this is a normal occurance or not (output snipped below) :

#12 0x284d6363 in lockname () from /usr/local/libexec/apache2/libphp4.so
#13 0x284a6b46 in lockname () from /usr/local/libexec/apache2/libphp4.so
  ... snip a lot of lines that are the same ...
#27 0x28496e26 in lockname () from /usr/local/libexec/apache2/libphp4.so
#28 0x284d7361 in lockname () from /usr/local/libexec/apache2/libphp4.so

Is it normal to call lockname() that much in PHP? The configuration line is :

'./configure' '--enable-versioning' '--enable-memory-limit' '--with-layout=GNU' '--with-zlib-dir=/usr' '--disable-all' '--with-regex=php' '--disable-cli' '--enable-ctype' '--with-mysql=/usr/local' '--enable-overload' '--with-pcre-regex=yes' '--enable-posix' '--enable-session' '--enable-tokenizer' '--with-expat-dir=/usr/local' '--enable-xml' '--with-zlib=yes' '--with-apxs2=/usr/local/sbin/apxs' '--prefix=/usr/local' 'i386-portbld-freebsd5.2'

I've put the query out on the apache-modules development mailing list, but think this is still the more appropriate place to check, because it is directly related to the PHP module. Any suggestions?

Joe Lewis

Curt Zirzow wrote:

* Thus wrote Joe Lewis:

Hello, all.

I've got a problem, and this is the best place I know of to find the solution.

Those log messages are not what I call good. On the phpinfo.php script, the memory usage on the server goes through the roof before the messages get printed to the log file. I'm using FreeBSD5.2-RELEASE, and PHP 4.3.6 running under Apache 2.0.49. I've compiled both apache and mod_php from ports (similar to "rpm -i"), and also directly from the source code, to no avail. Does anyone have any ideas as to what is actually occuring?


first: does this happen if you run the script from the command line?

second:
  How is php configured?  You can get the configure line if you
  isue:
    php -i


And Finally try this:

apachectl stop

Run:

gdb /usr/local/apache/bin/httpd


When your at the prompt:
(gdb) run -X -d /usr/local/apache

Then access your phpinfo page via you're browser.

Back at the (gdb) prompt, if apache crashed you will be able to
issue:
{gdb) bt

Whats the contents of that?

Curt

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to