|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-12-06 16:57 UTC] kclair at gmail dot com
Description:
------------
SSI files which include php scripts are behaving differently after upgrading from php 4.3.10 to php 4.4.1.
Apache version is 2.0.54.
I tried it with two different configure options:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-debug=no --enable-versioning --enable-track-vars --with-openssl --with-jpeg-dir=/home/sys/src/jpeg-6b --with-expat=/usr/lib --with-mcrypt --with-config-file-path=/home/sys/etc/php-noZend/ --with-png-dir=/usr --with-zlib-dir=/usr --with-ttf --with-freetype-dir=/usr --with-curl --with-mysql=/usr --with-gd --with-sablot --with-xslt-sablot --enable-xslt --disable-zend-memory-manager
./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-debug=no --enable-versioning --enable-track-vars --with-openssl --with-jpeg-dir=/home/sys/src/jpeg-6b --with-expat=/usr/lib --with-mcrypt --with-config-file-path=/home/sys/etc/ --with-png-dir=/usr --with-zlib-dir=/usr --with-ttf --with-freetype-dir=/usr --with-curl --with-mysql=/usr --with-gd --with-sablot --with-xslt-sablot --enable-xslt
I also tried it both with Zend optimizer enabled and with Zend optimizer disabled in php.ini.
Reproduce code:
---------------
The includes from the files which segfault look like:
<!--#include file="eventsdb.php?ID=81&fld=2" -->
The php code is a short db query:
if ($conn == false){
echo mysql_errno() . ": " . mysql_error() . "<BR>";
exit;
}
else {
$rtn = mysql_select_db ("[tablename]");
$sql = "select * from events where ID = ".$ID;
$result = mysql_query ($sql);
if ( ($row = mysql_fetch_row($result)) && ($today<=$row[4]
) ){
mysql_fetch_row($result)) {
[snip echo mysql results]
}
}
}
}
Expected result:
----------------
Results from mysql query should be displayed on page.
Actual result:
--------------
Blank pages.
The backtrace is the same regardless of which compile options I used:
#0 0xb7e095cc in zend_hash_index_update_or_next_insert (ht=0xb7ea29c0, h=0,
pData=0xbfffdc60, nDataSize=12, pDest=0x0, flag=1)
at /home/sys/src/php-4.4.1/Zend/zend_hash.c:390
390 p = ht->arBuckets[nIndex];
(gdb) bt full
#0 0xb7e095cc in zend_hash_index_update_or_next_insert (ht=0xb7ea29c0, h=0,
pData=0xbfffdc60, nDataSize=12, pDest=0x0, flag=1)
at /home/sys/src/php-4.4.1/Zend/zend_hash.c:390
nIndex = 0
p = Variable "p" is not available.
(gdb)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 06:00:02 2025 UTC |
The fix applied for this fixes the segfault for Apache 2.0.54. Apache 2.0.55, however, still segfaults for the same SSI pages. I recompiled php with the same configure options as before. gdb backtrace is: #0 0xb7de28dd in yy_push_state (new_state=1) at Zend/zend_language_scanner.c:5760 5760 yy_start_stack[yy_start_stack_ptr++] = YY_START; (gdb) bt full #0 0xb7de28dd in yy_push_state (new_state=1) at Zend/zend_language_scanner.c:5760 new_size = Variable "new_size" is not available. Thanks! Especially for the first fix!