#31426 [Fbk-Csd]: IIS and mysql_fetch_field
ID: 31426 User updated by: guillaume dot jung at usocome dot com Reported By: guillaume dot jung at usocome dot com -Status: Feedback +Status: Closed Bug Type: MySQL related Operating System: Windows 2000 PHP Version: 5.0.3 New Comment: This solved the problem. Is that a bug of PHP 5.0.3 ? Previous Comments: [2005-01-10 02:24:28] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2005-01-06 13:19:59] guillaume dot jung at usocome dot com I use MySQL 4.0.21 on Windows 2000 SP4 Server. After some minutes I receive this message : a href=tbl_propertiesHTTP/1.1 502 Gateway Error Server: Microsoft-IIS/5.0 Date: Thu, 06 Jan 2005 12:17:47 GMT Connection: close Content-Length: 186 Content-Type: text/html CGI Timeout The specified CGI application exceeded the allowed time for processing. The server has deleted the process. [2005-01-06 11:30:46] [EMAIL PROTECTED] Which mysql client and server version do you use? [2005-01-06 11:08:36] guillaume dot jung at usocome dot com Description: With the last version of PHP5 mysql_fetch_field block and all scripts are timed out. Reproduce code: --- function PMA_DBI_get_fields_meta($result) { $fields = array(); $num_fields = mysql_num_fields($result); for ($i = 1; $i $num_fields; $i++) { $fields[] = PMA_convert_display_charset(mysql_fetch_field($result, $i)); } return $fields; } Expected result: This code come from phpmyadmin and when I execute sql.php file it blocks. Actual result: -- Script timed out. -- Edit this bug report at http://bugs.php.net/?id=31426edit=1
#28006 [Fbk-Opn]: referencing an unset global produces a segfault
ID: 28006 User updated by: per at computer dot org Reported By: per at computer dot org -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: linux, kernel 2.4.26 PHP Version: 4.3.10RC2 New Comment: php4-STABLE-200501100730: segfault. Let me know if you need any further diagnostics or info. Previous Comments: [2005-01-10 01:52:36] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2004-12-13 09:15:15] per at computer dot org Those 3 files simply reproduce a problem I've seen elsewhere. They are in no way closely related to the actual code. What I could or could not use instead is of no importance - the problem is easily reproduced, isn't that what matters? [2004-12-13 00:27:03] [EMAIL PROTECTED] Can't you provide a SINGLE file with a short script in it? Using virtual() in this kind of place is pretty useless, why don't you use include() ?? [2004-07-12 13:15:32] per at computer dot org I believe I am now able to reproduce the problem - I can't say for certain that it *is* the same, but I suspect so. I first saw this with php 434, then 437, and finally php4-STABLE-200407120830, all with apache 2.0.49 on linux 2.4.26. 3 files to reproduce: k1.phtml.en - http://jessen.ch/php-bug28006/k1.txt k2.phtml.en - http://jessen.ch/php-bug28006/k2.txt k3.phtml.en - http://jessen.ch/php-bug28006/k3.txt Load http://server/k1 [2004-04-15 07:36:22] per at computer dot org Description: Hi, I've got a situation where a seemingly innocent statement produces a segfault. I've tried reducing it to a single reproducable testcase, but without success. The problem is however solidly reproducable in the context in which it occurs. I'm certain it is caused by a mistake in my code, but I feel it isn't exactly appropriate for php to segfault because of a user error? Very briefly, this is an excerpt where the segfault occurs: h2?php print $_SESSION['customers'][$customer]; ?/h2 ?php $q=longish SELECT query; $result=mysql_query( $q ) or die(mysql:.mysql_error()); $main_address=mysql_fetch_array( $result, MYSQL_ASSOC ); $q=longish SELECT query; $result=mysql_query( $q ) or die(mysql_error()); $billing_address=mysql_fetch_array( $result, MYSQL_ASSOC ); $q=longish SELECT query; $result=mysql_query( $q ) or die(mysql_error()); $technical_address=mysql_fetch_array( $result, MYSQL_ASSOC ); $editmain=strcasecmp($_REQUEST['contact'],main)==0; // $editbilling=strcasecmp($_REQUEST['contact'],billing)==0; // $edittechnical=strcasecmp($_REQUEST['contact'],technical)==0; ? If I uncomment either of the last 2 commented-out statements, I get a segfault. I'm using php 4.3.4 and apache 2.0.49 on linux 2.4.24. mysql is 4.0.15. --- OK, I've now guarded the above with : if ( isset($_REQUEST['contact']) ) { $editmain=strcmp($_REQUEST['contact'],main)==0; $editbilling=strcmp($_REQUEST['contact'],billing)==0; $edittechnical=strcasecmp($_REQUEST['contact'],technical)==0; } and the segfault is gone. Still, a segfault just because I'm using an unset global? And why only on the 2nd or later statement? Actual result: -- (gdb) run -X -f /etc/httpd/httpd.conf Starting program: /usr/bin/httpd -X -f /etc/httpd/ httpd.conf [New Thread 16384 (LWP 9121)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 9121)] 0x40576622 in zend_get_executed_lineno () at /usr/src/ packages/SOURCES/php-4.3.4/Zend/zend_execute_API.c:271 271 return active_opline-lineno; (gdb) bt #0 0x40576622 in zend_get_executed_lineno () at /usr/src/ packages/SOURCES/php-4.3.4/Zend/zend_execute_API.c:271 #1 0x4057ec6d in zend_error (type=8, format=0x40706ea3 Undefined index: %s) at /usr/src/packages/SOURCES/ php-4.3.4/Zend/zend.c:731 #2 0x405914a0 in zend_fetch_dimension_address_inner (ht=0x81d4bf4, op2=0x821ed34, Ts=0xbfffb34c, type=0) at / usr/src/packages/SOURCES/php-4.3.4/Zend/zend_execute.c:636 #3 0x4058a5f0 in zend_fetch_dimension_address (result=0x821ed14, op1=0x81d4bd4, op2=0x821ed34, Ts=0xbfffb34c, type=0) at /usr/src/packages/SOURCES/ php-4.3.4/Zend/zend_execute.c:787 #4 0x4058f7fe in execute (op_array=0x81d4f2c) at /usr/src/ packages/SOURCES/php-4.3.4/Zend/zend_execute.c:1283 #5 0x4057edbb in
#31464 [Bgs]: session_start() function blocking the script
ID: 31464 User updated by: wildmaple at yahoo dot com Reported By: wildmaple at yahoo dot com Status: Bogus Bug Type: Session related Operating System: Linux PHP Version: 5.0.3 New Comment: Thanx alot [EMAIL PROTECTED] you show me the bright way out, it is the session file's lock blocked the script, and session_write_close() solves it appropriately. but, may i point out another phenomenon, which puzzled me a great. before we received your message about this bogus bug, we made another test, a monitor program(something that transports and inspects data flowing between processes in network environment, running on a third machine) interfered scriptA.php (SoapClient::__call()) and scriptB.php (SoapServer::handle()), and without commenting out session_start() or adding session_write_close(), scriptA.php and scriptB.php both worked out exactly as we expected. can you give some explain about this? i am alittle confused, why php blocks scripts using the same session files as the previous, but does not block them when they ware executed by through monitor by the same previous script. Previous Comments: [2005-01-10 08:13:35] [EMAIL PROTECTED] This is indeed not a bug at all, the session extension needs to lock the session file so that concurrent updates can not corrupt the file. This means that all scripts using the same session file needs to be serialized. To improve performance you can use http://php.net/session_write_close as soon as you are done reading/setting session variables, which will remove the lock of the file. [2005-01-10 04:39:31] wildmaple at yahoo dot com Description: i don't be sure if this is a bug, anyway i don't think it is logically acceptable. * A short script that reproduces the problem. we developed a service structure, using webservice tech(php5.soap). most things went well as we'd expected till we decided to make one service script access another one. we have 3 seperate sites under construction in the same linux box, and maybe more sites coming. some services on one site will contact another on a second site, and we think this schema is easy to understand and develope. scriptA.php makes an SoapClient-__call() to scriptB.php , which serves well using SoapServer class when called from an binary client programmed with c++. then scriptB.php blocked when it got to the line where session_start() resides. when we commented out session_start(), scriptB.php worked out as fast as possible, but we lost support of session tech here, that is not acceptable as we designed. btw, we tried other ways to solve this problem, but all failed at function session_start(). some of the methods are xml-rpc and fsocket(writing and recieving soap envelope handly or xml-rpc structures),pear-xml-rpc(pear's xml-rpc lib). * The list of modules you compiled PHP with (your configure line). './configure' '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php' '--enable-sockets' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-mysql=/usr/local/mysql' '--enable-track-vars' '--enable-static' '--enable-roxen-zts' '--with-gd' '--with-zlib' '--with-xml' '--with-gettext' '--with-ttf' '--enable-gd-native-ttf' '--enable-gd-imgstrttf' '--with-freetype-dir=/usr/local/freetype' '--with-iconv=/usr/local/iconv' '--enable-force-cgi-redirect' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-dom' '--with-ncurses' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-soap=shhared' '--enable-soap' '--with-xmlrpc' * Any other information unique or specific to your setup. nothing special. * Any changes made in your php.ini compared to php.ini-dist (not your whole php.ini!) nothing * A gdb backtrace. none Reproduce code: --- session_name(siteBsessionhash); session_start(); $ServObj = new SoapServer(http://somesite.com/somewsdl,array('encoding'='GB2312')); $ServObj-setClass(SomeServiceClass); $ServObj-setPersistence(SOAP_PERSISTENCE_SESSION); $ServObj-handle(); Expected result: script workout to put some message when called by another script on the same machine using soap method. Actual result: -- blocked at the line where session_start() locates. -- Edit this bug report at http://bugs.php.net/?id=31464edit=1
#31453 [Fbk-Opn]: array_rand() is not returning random values
ID: 31453 User updated by: cdturri at hotmail dot com Reported By: cdturri at hotmail dot com -Status: Feedback +Status: Open Bug Type: Arrays related Operating System: Windows 2000 Advanced Server SP4 PHP Version: 5.0.3 New Comment: Hi Sniper, I just tested it on a different Windows PC with a brand new install of PHP using your CVS link. The bug stills occurs. HTTP headers to verify versions: 3 Server: Apache/2.0.52 (Win32) PHP/5.0.4-dev 4 X-Powered-By: PHP/5.0.4-dev I compared my PHP.ihi with the php.ini-recommended that came with the CVS build. Several differences were found, however using php.ini-recommended as my PHP.ini with no changes still produced the bug. Are you using my test.php with the cache.ini I am using in my sample? I have the impression that is related to the multidimension array function. Regards, Christian Previous Comments: [2005-01-10 02:20:25] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip I can NOT reproduce this. [2005-01-09 15:04:01] cdturri at hotmail dot com Description: Hi guys, array_rand() is not returning random values in my scripts. I am using a multidimension array that is being loaded from an INI file with @parse_ini_file(). Tested under Apache v2.0.52/PHP v5.0.3 on Windows 2000 Advanced Server and a CVS build (php5-win32-200501071130.zip) under Windows as well. Bug appears on both. I don't have a Unix system to test it under PHP 5 (shame on me!) but the problem does NOT occur under Unix/Apache v 1.3.33/PHP v4.3.9. Calling srand() to seed the random number generator seems to fix the problem but the PHP manual clearly says that: Note: As of PHP 4.2.0, there is no need to seed the random number generator with srand() or mt_srand() as this is now done automatically. (http://ie2.php.net/manual/en/function.array-rand.php) mt_rand(), rand() and mt_srand() also contain notes saying that seeding is not required before calling them. Found several related bugs, but this one mentions the same issue: http://bugs.php.net/bug.php?id=26290 [17 Nov 2003 2:12pm CET] [EMAIL PROTECTED] You forgot to call srand() to generate random key. Hence the lack of random data. [17 Nov 2003 2:25pm CET] [EMAIL PROTECTED] Incorrect documentaion I'm afraid. So, it is one or the other. Either the documentation is wrong or the function is not properly calling seeding the random number generator. Could anyone please have a look? Thanks for looking at this bug. Regards, Christian Reproduce code: --- I am using this code to verify the bug: ?php $multiarray = @parse_ini_file('cache.ini',true); for($i=0;$i100;$i++){ $rand_key = array_rand($multiarray); print $rand_key . 'br'; if ($i == 1) { $first_item = $rand_key; } if ($first_item == $rand_key) { echo 'br'; } } ? You can see the bug at: http://www.turribeach.com.ar/downloads/test.php You can download the INI file I am using and the test.php from: http://www.turribeach.com.ar/downloads/PHP_Test.zip Expected result: A random key from the INI file. Actual result: -- A key but that it is not random, it is a subset of the original key array. -- Edit this bug report at http://bugs.php.net/?id=31453edit=1
#31468 [NEW]: Calling sequence getMyUid() - get_current_user() crashes PHP
From: volker at puttrich dot net Operating system: Win2k SP4 PHP version: 5.0.2 PHP Bug Type: Reproducible crash Bug description: Calling sequence getMyUid() - get_current_user() crashes PHP Description: Calling functions getMyUid() followed by get_current_user(), or vice versa, crashes the following environment... Server software as reported by PHP: Apache/2.0.52 (Win32) mod_perl/1.99_16 Perl/v5.8.4 PHP/5.0.2 mod_ssl/2.0.52 OpenSSL/0.9.7d mod_python/3.1.3 Python/2.3.3 The OS used is Win2k SP4 including all available patches. NOTE: The crash also occurs when get_current_user() is used in combination with getMyGid(), getMyPid() and probably other related functions. Reproduce code: --- ?php echo(Crash testbr /\n); $sUser = get_current_user(); $nUID = getmyuid(); echo(Result, get_current_user(): . $sUser . / . $nUID); ? Expected result: Crash test Result, get_current_user(): SYSTEM / 0 -- Edit bug report at http://bugs.php.net/?id=31468edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31468r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31468r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31468r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31468r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31468r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31468r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31468r=needscript Try newer version: http://bugs.php.net/fix.php?id=31468r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31468r=support Expected behavior: http://bugs.php.net/fix.php?id=31468r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31468r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31468r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31468r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31468r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31468r=dst IIS Stability: http://bugs.php.net/fix.php?id=31468r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31468r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31468r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31468r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31468r=mysqlcfg
#31332 [Com]: unserialize() works terribly slow on huge strings compared to 4.3.9
ID: 31332 Comment by: kier at vbulletin dot com Reported By: marekm at apnet dot pl Status: Verified Bug Type: Performance problem Operating System: * PHP Version: 4CVS, 5CVS (2005-01-04) New Comment: I can confirm this problem from my experience with 4.3.10 and 5.0.3. Unserialize() under the latest versions appears to be massively slower than was previously so. We have had wide reports of vBulletin installations running significantly slower since we recommended that customers upgrade to 4.3.10 / 5.0.3. Hoping for a quick resolution to this problem, as it affects so many people so drastically. Previous Comments: [2005-01-09 15:11:39] ralf dot praschak at gmx dot net i use vbulletin 3.0.5. the forumcache is also unserialized. i tracked this with the nusphere profiler. with php 4.3.9 (or 5.0.2) it takes around 300ms. with php 4.3.10 (or 5.0.3) it takes 17s and more !!! the cache is around 2.5 megs big ;( [2004-12-30 10:13:09] chris-php at bolt dot cx Pretty sure we're getting hit by this as well. We use serialize a lot (memcached), and upgrading from PHP 4.3.9 to 4.3.10 tripled our servers' load averages. [2004-12-29 12:30:09] marekm at apnet dot pl Description: I keep big multidimensional arrays serialize()'d into strings in database. After upgrade from 4.3.9 - 4.3.10 I noticed, that unserialize() function on some of them work even 20 times slower. On other the slowdown is minimal. Reproduce code: --- ? function getmicrotime() { list($usec, $sec) = explode( , microtime()); return ((float)$usec + (float)$sec); } $f=fopen(serialized.txt,r); $l1=fgets($f,100); fclose($f); $t1=getmicrotime(); $a=unserialize($l1); echo(getmicrotime()-$t1); ? The tested serialized.txt file can be downloaded from http://ap.aptus.pl/serialized.txt Expected result: The above script working as fast as in 4.3.9 Actual result: -- The script works about 20x slower. -- Edit this bug report at http://bugs.php.net/?id=31332edit=1
#31468 [Opn]: Calling sequence getMyUid() - get_current_user() crashes PHP
ID: 31468 User updated by: volker at puttrich dot net Reported By: volker at puttrich dot net Status: Open Bug Type: Reproducible crash Operating System: Win2k SP4 PHP Version: 5.0.2 New Comment: Sorry, but I made a mistake when I was analyzing this bug. The crash will always happen as soon as the function get_current_user() is called. It doesn't have to do anything with the other functions I mentioned above. The problem I've had seemed to be Apache, which takes forever to restart on my machine. Therefore I got a little bit confused when commenting out certain lines of code. You may close this report if you wish to. I think there is another report regarding the crash with get_current_user() - maybe you should reopen it, if closed, since the bug is still there. Sorry again... Previous Comments: [2005-01-10 12:10:02] volker at puttrich dot net Description: Calling functions getMyUid() followed by get_current_user(), or vice versa, crashes the following environment... Server software as reported by PHP: Apache/2.0.52 (Win32) mod_perl/1.99_16 Perl/v5.8.4 PHP/5.0.2 mod_ssl/2.0.52 OpenSSL/0.9.7d mod_python/3.1.3 Python/2.3.3 The OS used is Win2k SP4 including all available patches. NOTE: The crash also occurs when get_current_user() is used in combination with getMyGid(), getMyPid() and probably other related functions. Reproduce code: --- ?php echo(Crash testbr /\n); $sUser = get_current_user(); $nUID = getmyuid(); echo(Result, get_current_user(): . $sUser . / . $nUID); ? Expected result: Crash test Result, get_current_user(): SYSTEM / 0 -- Edit this bug report at http://bugs.php.net/?id=31468edit=1
#31468 [Opn-Csd]: Calling sequence getMyUid() - get_current_user() crashes PHP
ID: 31468 Updated by: [EMAIL PROTECTED] Reported By: volker at puttrich dot net -Status: Open +Status: Closed Bug Type: Reproducible crash Operating System: Win2k SP4 PHP Version: 5.0.2 New Comment: Thank you for your bug report. This issue has already been fixed in the latest released version of PHP, which you can download at http://www.php.net/downloads.php Previous Comments: [2005-01-10 13:52:55] volker at puttrich dot net Sorry, but I made a mistake when I was analyzing this bug. The crash will always happen as soon as the function get_current_user() is called. It doesn't have to do anything with the other functions I mentioned above. The problem I've had seemed to be Apache, which takes forever to restart on my machine. Therefore I got a little bit confused when commenting out certain lines of code. You may close this report if you wish to. I think there is another report regarding the crash with get_current_user() - maybe you should reopen it, if closed, since the bug is still there. Sorry again... [2005-01-10 12:10:02] volker at puttrich dot net Description: Calling functions getMyUid() followed by get_current_user(), or vice versa, crashes the following environment... Server software as reported by PHP: Apache/2.0.52 (Win32) mod_perl/1.99_16 Perl/v5.8.4 PHP/5.0.2 mod_ssl/2.0.52 OpenSSL/0.9.7d mod_python/3.1.3 Python/2.3.3 The OS used is Win2k SP4 including all available patches. NOTE: The crash also occurs when get_current_user() is used in combination with getMyGid(), getMyPid() and probably other related functions. Reproduce code: --- ?php echo(Crash testbr /\n); $sUser = get_current_user(); $nUID = getmyuid(); echo(Result, get_current_user(): . $sUser . / . $nUID); ? Expected result: Crash test Result, get_current_user(): SYSTEM / 0 -- Edit this bug report at http://bugs.php.net/?id=31468edit=1
#31163 [Opn-Fbk]: exit status 128 on mysqli_connect()
ID: 31163 Updated by: [EMAIL PROTECTED] Reported By: marco-glatz at web dot de -Status: Open +Status: Feedback -Bug Type: Apache2 related +Bug Type: MySQLi related Operating System: WinXP PHP Version: 5.0.2 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Previous Comments: [2004-12-17 23:49:24] marco-glatz at web dot de ups, typo-error: mysql_connect() should be mysqli_connect() of course [2004-12-17 23:47:33] marco-glatz at web dot de Description: Apache: 2.0.52 PHP: 5.0.2 MySQL: 4.1.17 if i try mysql_connect() and the mysql-server is not running my browser (firefox) says document contains no data in my apache-log i found following: child process exited with status 128 the same thing happes if i use an undefined constant Reproduce code: --- mysqli_report(MYSQLI_REPORT_ERROR); // server not running $link = mysqli_connect('localhost', 'username', 'password'); // server running but undefined constant $link = mysql_connect(MYSQL_HOST, 'username', Password'); Expected result: i should be able to fetch the connection error with something like this: if(!$link) { printf(Connect failed: %s\n, mysqli_connect_error()); exit(); } or in the second case php should complain about an undefined constant -- Edit this bug report at http://bugs.php.net/?id=31163edit=1
#31193 [Opn-Fbk]: iconv.c:254 undefined reference to 'libiconv'
ID: 31193 Updated by: [EMAIL PROTECTED] Reported By: david at cubbieco dot com -Status: Open +Status: Feedback Bug Type: Compile Failure Operating System: linux gcc-3.2 PHP Version: 5.0.3 New Comment: What's the actual error? Previous Comments: [2004-12-20 09:12:04] david at cubbieco dot com Description: Using either ./configure with no options or ./configure --prefix=/... --enable-sockets --enable-pcntl --enable-sockets --disable-pear --disable-cgi Fails when building -o sapi/cli/php Reproduce code: --- SOLUTION: Makefile ends up being line 70 EXTRA_LIBS = -lcrypt ... if you add -liconv to the EXTRA_LIBS line in Makefile then Make works just fine. I don't know enough about ./configure to find where to tell it to add this. tried: ./configure -- failed with libiconv error ./configure --enable-sockets --disable-pear --disable-cgi failed with libiconv error ./configure --with-apxs2=/... failed with liniconv error -- Edit this bug report at http://bugs.php.net/?id=31193edit=1
#31334 [Opn-Fbk]: phpinfo() bug when refreshed 2/more times. usually at calendar and mail section
ID: 31334 Updated by: [EMAIL PROTECTED] Reported By: nawi2010 at telkom dot net -Status: Open +Status: Feedback Bug Type: *General Issues Operating System: Windows XP Prof PHP Version: 5.0.3 New Comment: Can you provide the broken phpinfo output in a form of an HTML file somewhere? (on some website and paste the URL here, NOT the broken HTML!!) Previous Comments: [2004-12-31 03:44:41] [EMAIL PROTECTED] Can you provide the broken phpinfo output in a form of an HTML file somewhere? [2004-12-29 14:31:18] nawi2010 at telkom dot net Description: when i execute to test phpinfo() function. the output is get a invalid character at calendar section and mail parameter. when i try to refresh the browser the output is different again, and again. i dont know what it's cause. i used php with apache 2.0.50 with no ssl support Reproduce code: --- phpinfo() -- Edit this bug report at http://bugs.php.net/?id=31334edit=1
#31425 [Opn-Bgs]: $string++ / $string-- ?
ID: 31425 Updated by: [EMAIL PROTECTED] Reported By: gregorschg at web dot de -Status: Open +Status: Bogus Bug Type: Performance problem Operating System: win xp PHP Version: 5.0.3 New Comment: RTFM: http://www.php.net/manual/en/language.operators.increment.php Note that character variables can be incremented but not decremented. Previous Comments: [2005-01-08 20:17:59] gregorschg at web dot de sorry, I mean output of $letter is C and expected output of $letter is B. [2005-01-06 06:35:30] gregorschg at web dot de Description: I have a problem to decreasing strings. Increasing a string works fine. Reproduce code: --- $letter = C; $letter--; echo $letter; Expected result: output of $str B Actual result: -- output of $str C -- Edit this bug report at http://bugs.php.net/?id=31425edit=1
#31465 [Opn-Ver]: Warning: unpack(): Type H: outside of string
ID: 31465 Updated by: [EMAIL PROTECTED] Reported By: php-bug-31247 at ryandesign dot com -Status: Open +Status: Verified -Bug Type: Unknown/Other Function +Bug Type: Strings related -Operating System: N/A +Operating System: * -PHP Version: 5.0.3 +PHP Version: 4CVS, 5CVS (2005-01-10) Previous Comments: [2005-01-10 05:38:02] php-bug-31247 at ryandesign dot com I've analyzed the PHP 5.0.3 source code and believe I have identified the problem. Here's my following of the logic in /etc/standard/pack.c, given an unpack string like H*hex: - On line 540, variable inputpos is set to 0. - On line 564, since the format argument is *, variable arg is set to -1. - On line 601, variable size is set to the same value as arg, so size is now -1. - On line 832, size is added to inputpos, so inputpos decreases by one and is now -1. - On line 833, if inputpos is 0 (which it is) an error is shown. This error display is one of the changes between PHP 4.3.9 and 5.0.3. This error display would seem to be what we're seeing in this case. [2005-01-10 05:07:06] php-bug-31247 at ryandesign dot com Description: I am experiencing the problem reported in bug 31247, which was marked as bogus. The decision was that the user's compiler was broken. I challenge this decision, as I see the problem with the (php.net-endorsed) precompiled Mac OS X version of PHP 5.0.3 (release 1) from www.entropy.ch and also with PHP 4.3.10 installed on a Gentoo server. I don't think all of these compilers are broken. I don't see the problem with Entropy PHP 4.3.9 (release 2) nor with 4.3.9 on a different Gentoo server. I wonder whether the problem really relates to the break-statement-within-the-braces notation, because this notation is already present in PHP 4.3.9 which does not exhibit the problem. Regardless, I consider braces around cases within a switch to be poor form, and encourage developers I work with to not use it, as it gives the false impression to the uninitiated (which is often the person writing the code) that closing the brace closes the case (which of course it doesn't; the break actually does that). Reproduce code: --- php -r print_r(unpack('H*hex', 'data')); Expected result: Array ( [hex] = 64617461 ) Actual result: -- Warning: unpack(): Type H: outside of string in Command line code on line 1 Array ( [hex] = 64617461 ) -- Edit this bug report at http://bugs.php.net/?id=31465edit=1
#31461 [Opn-Bgs]: No libphp5.so created and no errors produced
ID: 31461 Updated by: [EMAIL PROTECTED] Reported By: hendlerman at yahoo dot com -Status: Open +Status: Bogus Bug Type: Compile Failure Operating System: Red Hat 9 PHP Version: 5.0.3 New Comment: ..chmod 755 /usr/local/apache2/modules/libphp5.so [activating module `php5' in /usr/local/apache2/conf/httpd.conf].. IT _IS_ installed. Previous Comments: [2005-01-10 04:21:58] hendlerman at yahoo dot com found this potential solution http://www.fedoraforum.org/forum/archive/index.php/t-23665.html but it didn't work for me I don't have the file libintl.so and the only rpms I could find are for mandrake [2005-01-10 03:51:38] hendlerman at yahoo dot com I tried the same on 5.02 source - same problem. [2005-01-10 03:20:00] hendlerman at yahoo dot com this is the file I am using http://us3.php.net/get/php-5.0.3.tar.gz/from/this/mirror [2005-01-10 03:09:31] hendlerman at yahoo dot com I was able to reproduce the bug with a clean install of the os and the httpd from an rpm. Everythin was gotten from up2date except the libxml2 and libxslt-devel and mysql 4.1-devel [EMAIL PROTECTED] php-5.0.3]# locate libphp5 /root/php-5.0.3/sapi/apache/libphp5.module.in /root/php-5.0.3/sapi/apache_hooks/libphp5.module.in kernel-2.4.20-8 libxml2-devel-2.6.16-1 perl-libxml-perl-0.07-28 libxml2-2.6.16-1 libxml-devel-1.8.17-8 perl-libxml-enno-1.02-29 libxml-1.8.17-8 libxml2-python-2.6.16-1 libxslt-1.0.27-3 libxslt-devel-1.0.27-3 [EMAIL PROTECTED] php-5.0.3]# ./configure --with-apsx2=/usr/sbin/apxs --with-xsl --with-mysql --with-ldap --with-xmlrpc--enable-dio --enable-magic-quote --enable-calendar --enable-sockets --with-zlib --with-openssl --enable-wddx -enable-soap 2 ../php_configure_errors.txt no error messages (return2) I could find there OR in the make or make install :( [2005-01-10 02:27:49] hendlerman at yahoo dot com might this happen if the xml2 library is too new for redhat 9? I had libxml2-2.6.16-1.i386.rpm The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31461 -- Edit this bug report at http://bugs.php.net/?id=31461edit=1
#31419 [Opn-Fbk]: error_log not able to be overridden...
ID: 31419 Updated by: [EMAIL PROTECTED] Reported By: mfoxx at hotmail dot com -Status: Open +Status: Feedback Bug Type: PHP options/info functions Operating System: Debian 3.x PHP Version: 5.0.3 New Comment: What apache version? Previous Comments: [2005-01-05 19:12:11] mfoxx at hotmail dot com Description: FYI: I am running a server where I built from source the apache and PHP binaries, so I am not susceptible to the problems other bugs reported where they might have used a pre-packaged binary with some other unexplained behavior. If I set a value for error_log in my php.ini (to /home/php.errors, for instance), PHP correctly logs any errors encountered (in ANY of my virtualhost sites) there to that single file. However, when I do in a script (because error_log is said in the manual to be modifiable as PHP_INI_ALL, which means i can change it anywhere): ini_set(error_log,/path/to/some.log.file); or when I do: php_value error_log /path/to/some.log.file in my httpd.conf inside a virtualhost, or my .htaccess file for a particular site, the VALUE is apparently changed, but PHP doesn't seem to respect it, when coming across an error later in code. Furthermore, PHP will not even write the errors to the original error_log value set before in the php.ini. It will instead write them to apache's error log for that particular virtualhost. As you can see in my reproduce code i change the error_log variable using ini_set(), then i do phpinfo(), and verify that it DOES IN FACT have the new changed value in its output, overriding the default that I set in my php.ini file. And then I call a function which doesn't exist, which should force a PHP error. The error does occur, and it DOES get logged, just not to the right file, it now gets logged to the APACHE error log file, not even the original php.ini error_log setting, which I find very strange. Reproduce code: --- ?php ini_set(error_log,/path/to/php.err); phpinfo(); echo nonexistent(); ? Expected result: I expected for the value of error_log to be changed, so that when I force a PHP error, calling a nonexistent() function, I should get the error logged into my php.err file as specified in ini.set. Actual result: -- the error (call to undefined function) DOES get logged, but to the wrong file... it gets logged to the Apache error file for that particular virtualhost. It doesn't even get logged to the original php.ini file's setting for error_log. But, as I stated before, if I just set the value in php.ini, and DON'T try to modify it in code (or httpd.conf), then the error gets logged to the location I specified in php.ini. So, basically, when you try to modify the error_log setting at runtime, it irreversibly starts the PHP error logging to the Apache error log, no matter what you specify. -- Edit this bug report at http://bugs.php.net/?id=31419edit=1
#31453 [Opn]: array_rand() is not returning random values
ID: 31453 Updated by: [EMAIL PROTECTED] Reported By: cdturri at hotmail dot com Status: Open Bug Type: Arrays related Operating System: Windows 2000 Advanced Server SP4 PHP Version: 5.0.3 New Comment: I'm using Linux.. :) Previous Comments: [2005-01-10 11:21:46] cdturri at hotmail dot com Hi Sniper, I just tested it on a different Windows PC with a brand new install of PHP using your CVS link. The bug stills occurs. HTTP headers to verify versions: 3 Server: Apache/2.0.52 (Win32) PHP/5.0.4-dev 4 X-Powered-By: PHP/5.0.4-dev I compared my PHP.ihi with the php.ini-recommended that came with the CVS build. Several differences were found, however using php.ini-recommended as my PHP.ini with no changes still produced the bug. Are you using my test.php with the cache.ini I am using in my sample? I have the impression that is related to the multidimension array function. Regards, Christian [2005-01-10 02:20:25] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip I can NOT reproduce this. [2005-01-09 15:04:01] cdturri at hotmail dot com Description: Hi guys, array_rand() is not returning random values in my scripts. I am using a multidimension array that is being loaded from an INI file with @parse_ini_file(). Tested under Apache v2.0.52/PHP v5.0.3 on Windows 2000 Advanced Server and a CVS build (php5-win32-200501071130.zip) under Windows as well. Bug appears on both. I don't have a Unix system to test it under PHP 5 (shame on me!) but the problem does NOT occur under Unix/Apache v 1.3.33/PHP v4.3.9. Calling srand() to seed the random number generator seems to fix the problem but the PHP manual clearly says that: Note: As of PHP 4.2.0, there is no need to seed the random number generator with srand() or mt_srand() as this is now done automatically. (http://ie2.php.net/manual/en/function.array-rand.php) mt_rand(), rand() and mt_srand() also contain notes saying that seeding is not required before calling them. Found several related bugs, but this one mentions the same issue: http://bugs.php.net/bug.php?id=26290 [17 Nov 2003 2:12pm CET] [EMAIL PROTECTED] You forgot to call srand() to generate random key. Hence the lack of random data. [17 Nov 2003 2:25pm CET] [EMAIL PROTECTED] Incorrect documentaion I'm afraid. So, it is one or the other. Either the documentation is wrong or the function is not properly calling seeding the random number generator. Could anyone please have a look? Thanks for looking at this bug. Regards, Christian Reproduce code: --- I am using this code to verify the bug: ?php $multiarray = @parse_ini_file('cache.ini',true); for($i=0;$i100;$i++){ $rand_key = array_rand($multiarray); print $rand_key . 'br'; if ($i == 1) { $first_item = $rand_key; } if ($first_item == $rand_key) { echo 'br'; } } ? You can see the bug at: http://www.turribeach.com.ar/downloads/test.php You can download the INI file I am using and the test.php from: http://www.turribeach.com.ar/downloads/PHP_Test.zip Expected result: A random key from the INI file. Actual result: -- A key but that it is not random, it is a subset of the original key array. -- Edit this bug report at http://bugs.php.net/?id=31453edit=1
#31453 [Opn]: array_rand() is not returning random values
ID: 31453 User updated by: cdturri at hotmail dot com Reported By: cdturri at hotmail dot com Status: Open Bug Type: Arrays related Operating System: Windows 2000 Advanced Server SP4 PHP Version: 5.0.3 New Comment: OK guys, I just had the chance to test it under Linux and PHP 5 and the bug does NOT occur. Here are the headers to confirm product versions: 3 Server: Apache/2.0.52 (Unix) mod_perl/1.99_17 Perl/v5.8.4 mod_ssl/2.0.52 Open SSL/0.9.7d PHP/5.0.3 DAV/2 Could anyone from the Dev team be so kindly to test it under Windows? Thanks, Christian Previous Comments: [2005-01-10 14:41:14] [EMAIL PROTECTED] I'm using Linux.. :) [2005-01-10 11:21:46] cdturri at hotmail dot com Hi Sniper, I just tested it on a different Windows PC with a brand new install of PHP using your CVS link. The bug stills occurs. HTTP headers to verify versions: 3 Server: Apache/2.0.52 (Win32) PHP/5.0.4-dev 4 X-Powered-By: PHP/5.0.4-dev I compared my PHP.ihi with the php.ini-recommended that came with the CVS build. Several differences were found, however using php.ini-recommended as my PHP.ini with no changes still produced the bug. Are you using my test.php with the cache.ini I am using in my sample? I have the impression that is related to the multidimension array function. Regards, Christian [2005-01-10 02:20:25] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip I can NOT reproduce this. [2005-01-09 15:04:01] cdturri at hotmail dot com Description: Hi guys, array_rand() is not returning random values in my scripts. I am using a multidimension array that is being loaded from an INI file with @parse_ini_file(). Tested under Apache v2.0.52/PHP v5.0.3 on Windows 2000 Advanced Server and a CVS build (php5-win32-200501071130.zip) under Windows as well. Bug appears on both. I don't have a Unix system to test it under PHP 5 (shame on me!) but the problem does NOT occur under Unix/Apache v 1.3.33/PHP v4.3.9. Calling srand() to seed the random number generator seems to fix the problem but the PHP manual clearly says that: Note: As of PHP 4.2.0, there is no need to seed the random number generator with srand() or mt_srand() as this is now done automatically. (http://ie2.php.net/manual/en/function.array-rand.php) mt_rand(), rand() and mt_srand() also contain notes saying that seeding is not required before calling them. Found several related bugs, but this one mentions the same issue: http://bugs.php.net/bug.php?id=26290 [17 Nov 2003 2:12pm CET] [EMAIL PROTECTED] You forgot to call srand() to generate random key. Hence the lack of random data. [17 Nov 2003 2:25pm CET] [EMAIL PROTECTED] Incorrect documentaion I'm afraid. So, it is one or the other. Either the documentation is wrong or the function is not properly calling seeding the random number generator. Could anyone please have a look? Thanks for looking at this bug. Regards, Christian Reproduce code: --- I am using this code to verify the bug: ?php $multiarray = @parse_ini_file('cache.ini',true); for($i=0;$i100;$i++){ $rand_key = array_rand($multiarray); print $rand_key . 'br'; if ($i == 1) { $first_item = $rand_key; } if ($first_item == $rand_key) { echo 'br'; } } ? You can see the bug at: http://www.turribeach.com.ar/downloads/test.php You can download the INI file I am using and the test.php from: http://www.turribeach.com.ar/downloads/PHP_Test.zip Expected result: A random key from the INI file. Actual result: -- A key but that it is not random, it is a subset of the original key array. -- Edit this bug report at http://bugs.php.net/?id=31453edit=1
#28074 [Asn-Csd]: Fast CGI standard compliance : stderr should be written in a FCGI stderr stream
ID: 28074 Updated by: [EMAIL PROTECTED] Reported By: bogus_idp at yahoo dot fr -Status: Assigned +Status: Closed Bug Type: CGI related -Operating System: any +Operating System: * -PHP Version: 5.0.0RC1 +PHP Version: 4CVS, 5CVS (2005-01-10) Assigned To: shane New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2005-01-10 16:01:29] chris at ex-parrot dot com This one turns out to be easy to fix, thus: --- cgi_main.c.orig Mon Jan 10 14:57:04 2005 +++ cgi_main.c Mon Jan 10 14:53:44 2005 @@ -481,7 +481,14 @@ static void sapi_cgi_log_message(char *message) { - fprintf(stderr, %s\n, message); +#if PHP_FASTCGI +if (!FCGX_IsCGI()) { +FCGX_Request *request = (FCGX_Request *)SG(server_context); +FCGX_FPrintF( request-err, %s\n, message ); +/* ignore return code */ +} else +#endif /* PHP_FASTCGI */ + fprintf(stderr, %s\n, message); } static int sapi_cgi_deactivate(TSRMLS_D) However, there is another similar bug, which is that a stream opened on php://stderr should also direct its output to the FCGI error stream (rather than just to file descriptor #2). -- Chris Lightfoot [2004-04-20 15:55:00] [EMAIL PROTECTED] Assigning to Shane, the maintainer of this SAPI module. [2004-04-20 12:03:30] bogus_idp at yahoo dot fr Description: The Fast CGI standard require that error be reported through the FastCGI connection as a Stderr data stream. But PHP Fast CGI processes still write errors to original stderr (file handle 3) which prevent from clean standard centralized FCGI logging, especially when the Fast CGI PHP process is not started by the web server (remote Fast CGI). In most cases, it makes debugging PHP scripts impossible. -- Edit this bug report at http://bugs.php.net/?id=28074edit=1
#31138 [Opn-Fbk]: Invalid config check for libxml2 when enabling SOAP
ID: 31138 Updated by: [EMAIL PROTECTED] Reported By: tim dot dewees at mtginfo dot com -Status: Open +Status: Feedback -Bug Type: Compile Failure +Bug Type: SOAP related Operating System: Red Hat Enterprise PHP Version: 5.0.3 New Comment: libxml2 2.5.10 is the minimum version required. Please paste the errors you got here when compiling. Previous Comments: [2004-12-21 15:47:36] tim dot dewees at mtginfo dot com Okay here is the skinny: I'm using Red Hat Enterprise 3.0 which comes with libxml2 1.5.11. I ran the configure script for php 5.0.3 and it succeeded; however, the build failed. To resolve the issue I had to upgrade to libxml2 1.6.x ( I chose 1.6.16). My complaint is that the configure script should check for 1.6.x version of libxml2? [2004-12-16 22:21:00] tim dot dewees at mtginfo dot com Description: I get compilation errors when I try to build PHP 5.0.3 with SOAP support. I found a few bugs with this and was able to resolve the issue by updating my libxml2 library; however, if PHP requires a newer version, shouldn't the configure fail? -- Edit this bug report at http://bugs.php.net/?id=31138edit=1
#31091 [Opn-Fbk]: Apache2 crash with SimpleXML and XPath
ID: 31091 Updated by: [EMAIL PROTECTED] Reported By: cpuidle at gmx dot de -Status: Open +Status: Feedback -Bug Type: Reproducible crash +Bug Type: SimpleXML related Operating System: WinXP SP1 PHP Version: 5.0.2 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: [2004-12-14 17:31:54] cpuidle at gmx dot de The same code, but without the xpath expression does not crash (and of course not work...): foreach ($xml-ListOfRepositoryWorkflowProcess-RepositoryWorkflowProcess-ListOfRepositoryWfStep-RepositoryWfStep-ListOfRepositoryWfStepIOArgument-RepositoryWfStepIOArgument as $wfArg) [2004-12-14 17:26:19] cpuidle at gmx dot de Description: I'm using xpath to retrieve a child node from an xml structure, then loop over subelements of this node. This crashes reproducibly at the foreach loop (apache log file: child process exited with status 3221225477 -- Restarting) Same happens with latest 5.0.3RC2 Reproduce code: --- $step = 'FindThisNode'; $node = $xml-xpath('ListOfRepositoryWorkflowProcess/RepositoryWorkflowProcess/ListOfRepositoryWfStep/RepositoryWfStep[Name3='.$step.']'); print_r($node); # crash here! foreach ($node-ListOfRepositoryWfStepIOArgument-RepositoryWfStepIOArgument as $wfArg) { } Expected result: no crash?! -- Edit this bug report at http://bugs.php.net/?id=31091edit=1
#31453 [Opn]: array_rand() is not returning random values
ID: 31453 Updated by: [EMAIL PROTECTED] Reported By: cdturri at hotmail dot com Status: Open Bug Type: Arrays related Operating System: Windows 2000 Advanced Server SP4 PHP Version: 5.0.3 New Comment: I can confirm this problem. Maybe the problem is just when running in ZTS mode, as it uses a different seed generator. However I don't time to trace the problem now. Previous Comments: [2005-01-10 16:11:51] cdturri at hotmail dot com OK guys, I just had the chance to test it under Linux and PHP 5 and the bug does NOT occur. Here are the headers to confirm product versions: 3 Server: Apache/2.0.52 (Unix) mod_perl/1.99_17 Perl/v5.8.4 mod_ssl/2.0.52 Open SSL/0.9.7d PHP/5.0.3 DAV/2 Could anyone from the Dev team be so kindly to test it under Windows? Thanks, Christian [2005-01-10 14:41:14] [EMAIL PROTECTED] I'm using Linux.. :) [2005-01-10 11:21:46] cdturri at hotmail dot com Hi Sniper, I just tested it on a different Windows PC with a brand new install of PHP using your CVS link. The bug stills occurs. HTTP headers to verify versions: 3 Server: Apache/2.0.52 (Win32) PHP/5.0.4-dev 4 X-Powered-By: PHP/5.0.4-dev I compared my PHP.ihi with the php.ini-recommended that came with the CVS build. Several differences were found, however using php.ini-recommended as my PHP.ini with no changes still produced the bug. Are you using my test.php with the cache.ini I am using in my sample? I have the impression that is related to the multidimension array function. Regards, Christian [2005-01-10 02:20:25] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip I can NOT reproduce this. [2005-01-09 15:04:01] cdturri at hotmail dot com Description: Hi guys, array_rand() is not returning random values in my scripts. I am using a multidimension array that is being loaded from an INI file with @parse_ini_file(). Tested under Apache v2.0.52/PHP v5.0.3 on Windows 2000 Advanced Server and a CVS build (php5-win32-200501071130.zip) under Windows as well. Bug appears on both. I don't have a Unix system to test it under PHP 5 (shame on me!) but the problem does NOT occur under Unix/Apache v 1.3.33/PHP v4.3.9. Calling srand() to seed the random number generator seems to fix the problem but the PHP manual clearly says that: Note: As of PHP 4.2.0, there is no need to seed the random number generator with srand() or mt_srand() as this is now done automatically. (http://ie2.php.net/manual/en/function.array-rand.php) mt_rand(), rand() and mt_srand() also contain notes saying that seeding is not required before calling them. Found several related bugs, but this one mentions the same issue: http://bugs.php.net/bug.php?id=26290 [17 Nov 2003 2:12pm CET] [EMAIL PROTECTED] You forgot to call srand() to generate random key. Hence the lack of random data. [17 Nov 2003 2:25pm CET] [EMAIL PROTECTED] Incorrect documentaion I'm afraid. So, it is one or the other. Either the documentation is wrong or the function is not properly calling seeding the random number generator. Could anyone please have a look? Thanks for looking at this bug. Regards, Christian Reproduce code: --- I am using this code to verify the bug: ?php $multiarray = @parse_ini_file('cache.ini',true); for($i=0;$i100;$i++){ $rand_key = array_rand($multiarray); print $rand_key . 'br'; if ($i == 1) { $first_item = $rand_key; } if ($first_item == $rand_key) { echo 'br'; } } ? You can see the bug at: http://www.turribeach.com.ar/downloads/test.php You can download the INI file I am using and the test.php from: http://www.turribeach.com.ar/downloads/PHP_Test.zip Expected result: A random key from the INI file. Actual result: -- A key but that it is not random, it is a subset of the original key array. -- Edit this bug report at http://bugs.php.net/?id=31453edit=1
#31472 [NEW]: Opening the php://stderr etc. streams in FastCGI mode should open FCGI streams
From: chris at ex-parrot dot com Operating system: OS-independent PHP version: 4.3.10 PHP Bug Type: CGI related Bug description: Opening the php://stderr etc. streams in FastCGI mode should open FCGI streams Description: Opening the php://stderr stream and writing to it in FastCGI mode writes to the FCGI server's standard error, not the multiplexed request standard error stream. Reproduce code: --- $stderr = fopen(php://stderr, w); fputs($stderr, fish soup is good for you); Expected result: This should log an error message to the server's error log when the script is running in a web server environment. (Note that error_log can't necessarily be used in this context, because it always appends a \n to anything you send, and is also affected by the configuration file.) Actual result: -- Under FastCGI mode, it doesn't log such a message, but instead writes it to the FGGI *server's* standard error stream, which isn't the same thing at all. The message should be written via the multiplexed FastCGI error stream, not to fd #2. (See also a related bug, http://bugs.php.net/bug.php?id=28074 , which I've fixed.) Basically this is simple but a bit messy to fix. In ext/standard/php_fopen_wrapper.c the php://stderr case (and possibly the other ones) need to be treated specially in the FastCGI case, defining new stream output operations for the FastCGI streams. -- Edit bug report at http://bugs.php.net/?id=31472edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31472r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31472r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31472r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31472r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31472r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31472r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31472r=needscript Try newer version: http://bugs.php.net/fix.php?id=31472r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31472r=support Expected behavior: http://bugs.php.net/fix.php?id=31472r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31472r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31472r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31472r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31472r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31472r=dst IIS Stability: http://bugs.php.net/fix.php?id=31472r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31472r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31472r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31472r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31472r=mysqlcfg
#28074 [Com]: Fast CGI standard compliance : stderr should be written in a FCGI stderr stream
ID: 28074 Comment by: chris at ex-parrot dot com Reported By: bogus_idp at yahoo dot fr Status: Assigned Bug Type: CGI related Operating System: any PHP Version: 5.0.0RC1 Assigned To: shane New Comment: This one turns out to be easy to fix, thus: --- cgi_main.c.orig Mon Jan 10 14:57:04 2005 +++ cgi_main.c Mon Jan 10 14:53:44 2005 @@ -481,7 +481,14 @@ static void sapi_cgi_log_message(char *message) { - fprintf(stderr, %s\n, message); +#if PHP_FASTCGI +if (!FCGX_IsCGI()) { +FCGX_Request *request = (FCGX_Request *)SG(server_context); +FCGX_FPrintF( request-err, %s\n, message ); +/* ignore return code */ +} else +#endif /* PHP_FASTCGI */ + fprintf(stderr, %s\n, message); } static int sapi_cgi_deactivate(TSRMLS_D) However, there is another similar bug, which is that a stream opened on php://stderr should also direct its output to the FCGI error stream (rather than just to file descriptor #2). -- Chris Lightfoot Previous Comments: [2004-04-20 15:55:00] [EMAIL PROTECTED] Assigning to Shane, the maintainer of this SAPI module. [2004-04-20 12:03:30] bogus_idp at yahoo dot fr Description: The Fast CGI standard require that error be reported through the FastCGI connection as a Stderr data stream. But PHP Fast CGI processes still write errors to original stderr (file handle 3) which prevent from clean standard centralized FCGI logging, especially when the Fast CGI PHP process is not started by the web server (remote Fast CGI). In most cases, it makes debugging PHP scripts impossible. -- Edit this bug report at http://bugs.php.net/?id=28074edit=1
#31433 [Fbk-Opn]: PHP CGI Core Dumps W/O TERMCAP Assignment
ID: 31433 User updated by: dgrimes at scvl dot com Reported By: dgrimes at scvl dot com -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: SCO OpenServer 5 PHP Version: 4.3.10 New Comment: Actually I did use --enable-debug I just wrote my post to you wrong. I recompiled and it produced the same output: (carn700a:root)[/usr/local/bin] gdb /usr/local/bin/php /usr/local/bin/core GNU gdb 5.2.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i686-pc-sco3.2v5.0.6... Core was generated by `php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libsocket.so.2...done. Loaded symbols for /usr/lib/libsocket.so.2 Reading symbols from /usr/lib/libc.so.1...done. Loaded symbols for /usr/lib/libc.so.1 Reading symbols from /usr/lib/libresolv.so.1...done. Loaded symbols for /usr/lib/libresolv.so.1 #0 0x80021bb2 in getcwd () from /usr/lib/libc.so.1 (gdb) bt #0 0x80021bb2 in getcwd () from /usr/lib/libc.so.1 Cannot access memory at address 0x0 (gdb) I think the problem I'm having right now is getting gdb to work properly. We use the SCO UDK for Unixware debugger and I'm not sure how or even if I can do a back trace with that debugger. I'm working that right now. Also, I'm working on upgrading the server to SCO 5.0.7 and I'll install gdb from the SCO freeware CD once I have it up and running; hopefully later today. Sorry for the confusion, Dean Previous Comments: [2005-01-07 21:00:55] [EMAIL PROTECTED] The configure option is --enable-debug (ENABLE!) And you need to delete config.cache first before reconfigure. [2005-01-07 20:31:25] dgrimes at scvl dot com I configured with --disable-all --with-debug but I guess that doesn't work like I thought it would. Anyway, I am recompiling and will have it to you shortly. TERMCAP was not defined previously. I found the issue during testing. When I log on with at telnet session I get coredumps but when I use an X session it would work. So compared the environments and found the difference to be the TERMCAP setting. I decided to set the TERMCAP variable to the value used in the X session for the telnet session and PHP then worked. Dean [2005-01-07 18:51:49] [EMAIL PROTECTED] You need to configure with --enable-debug to get meaningful backtrace. Exactly WHAT was TERMCAP set to when this crash happens..? [2005-01-07 15:19:11] dgrimes at scvl dot com (carn700a:root)[/usr/local/bin] gdb /usr/local/bin/php /usr/local/bin/core GNU gdb 5.2.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i686-pc-sco3.2v5.0.6... Core was generated by `php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libsocket.so.2...done. Loaded symbols for /usr/lib/libsocket.so.2 Reading symbols from /usr/lib/libc.so.1...done. Loaded symbols for /usr/lib/libc.so.1 Reading symbols from /usr/lib/libresolv.so.1...done. Loaded symbols for /usr/lib/libresolv.so.1 #0 0x80021bb2 in getcwd () from /usr/lib/libc.so.1 (gdb) bt #0 0x80021bb2 in getcwd () from /usr/lib/libc.so.1 Cannot access memory at address 0x0 (gdb) [2005-01-07 07:40:58] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31433 -- Edit this bug report at http://bugs.php.net/?id=31433edit=1
#31419 [Fbk-Opn]: error_log not able to be overridden...
ID: 31419 User updated by: mfoxx at hotmail dot com Reported By: mfoxx at hotmail dot com -Status: Feedback +Status: Open Bug Type: PHP options/info functions Operating System: Debian 3.x PHP Version: 5.0.3 New Comment: Apache 2.0.52, built from source, and PHP 5.0.3 built from source, on a Debian 3.0 woody linux distro (also built from source). Previous Comments: [2005-01-10 14:45:46] [EMAIL PROTECTED] What apache version? [2005-01-05 19:12:11] mfoxx at hotmail dot com Description: FYI: I am running a server where I built from source the apache and PHP binaries, so I am not susceptible to the problems other bugs reported where they might have used a pre-packaged binary with some other unexplained behavior. If I set a value for error_log in my php.ini (to /home/php.errors, for instance), PHP correctly logs any errors encountered (in ANY of my virtualhost sites) there to that single file. However, when I do in a script (because error_log is said in the manual to be modifiable as PHP_INI_ALL, which means i can change it anywhere): ini_set(error_log,/path/to/some.log.file); or when I do: php_value error_log /path/to/some.log.file in my httpd.conf inside a virtualhost, or my .htaccess file for a particular site, the VALUE is apparently changed, but PHP doesn't seem to respect it, when coming across an error later in code. Furthermore, PHP will not even write the errors to the original error_log value set before in the php.ini. It will instead write them to apache's error log for that particular virtualhost. As you can see in my reproduce code i change the error_log variable using ini_set(), then i do phpinfo(), and verify that it DOES IN FACT have the new changed value in its output, overriding the default that I set in my php.ini file. And then I call a function which doesn't exist, which should force a PHP error. The error does occur, and it DOES get logged, just not to the right file, it now gets logged to the APACHE error log file, not even the original php.ini error_log setting, which I find very strange. Reproduce code: --- ?php ini_set(error_log,/path/to/php.err); phpinfo(); echo nonexistent(); ? Expected result: I expected for the value of error_log to be changed, so that when I force a PHP error, calling a nonexistent() function, I should get the error logged into my php.err file as specified in ini.set. Actual result: -- the error (call to undefined function) DOES get logged, but to the wrong file... it gets logged to the Apache error file for that particular virtualhost. It doesn't even get logged to the original php.ini file's setting for error_log. But, as I stated before, if I just set the value in php.ini, and DON'T try to modify it in code (or httpd.conf), then the error gets logged to the location I specified in php.ini. So, basically, when you try to modify the error_log setting at runtime, it irreversibly starts the PHP error logging to the Apache error log, no matter what you specify. -- Edit this bug report at http://bugs.php.net/?id=31419edit=1
#31098 [Opn-Asn]: isset false positive
ID: 31098 Updated by: [EMAIL PROTECTED] Reported By: jyounger at caedic dot com -Status: Open +Status: Assigned Bug Type: Zend Engine 2 problem -Operating System: Slackare Linux Kernel 2.4.26 +Operating System: * -PHP Version: 5.0.3 +PHP Version: 5CVS-2005-01-10 -Assigned To: +Assigned To: dmitry New Comment: Dmitry breaks, Dmitry fixes. :) Previous Comments: [2005-01-03 03:51:38] jkkn at jkkn dot dk I am using PEAR::DB which was the main reason I wrote the patch. The supplied patch should solve all problems with regards to PEAR::DB. Matthew, what do you experience while using the patch? [2004-12-31 18:58:56] mnorth at ucsd dot edu This bug is rather significant to anyone that uses PEAR::DB with DB_DataObject. It effectively breaks the createTables.php script, which in turn effectively makes useless DB_DataObject. The offending code is the first line of function tableInfo in (phproot)/lib/php/DB/mysql.php: * @see DB_common::tableInfo() */ function tableInfo($result, $mode = null) { if (isset($result-result)) { /* * Probably received a result object. The isset() call returns true, regardless of whether $result-result is set, and even if $result is not an object. Note, this affects ALL (phproot)/lib/php/DB/??sql.php files, since they all contain tableInfo() functions. The patch supplied in this bug report doesn't solve the problem, so I had to temporarily change function tableInfo() to call is_object() instead of isset(). Matthew H. North [2004-12-20 02:10:49] jkkn at jkkn dot dk At time patching for bug #2 9883, 'dmitry'not only applied the patch, but also added autocasting for the offset, therefore: isset($simpleString['nonExistentStringProperty']) is currenly autocasted into isset($simpleString[0]) - which is true. Same goes for empty() since this is the same function. This patch should resolve this problem: Index: ZendEngine2/zend_execute.c === RCS file: /repository/ZendEngine2/zend_execute.c,v retrieving revision 1.652.2.11 diff -u -r1.652.2.11 zend_execute.c --- ZendEngine2/zend_execute.c 1 Dec 2004 14:01:58 - 1.652.2.11 +++ ZendEngine2/zend_execute.c 20 Dec 2004 01:08:28 - @@ -4033,26 +4033,20 @@ result = Z_OBJ_HT_P(*container)-has_dimension(*container, offset, (opline-extended_value == ZEND_ISEMPTY) TSRMLS_CC); } } else if ((*container)-type == IS_STRING) { /* string offsets */ - zval tmp_offset; - - if (Z_TYPE_P(offset) != IS_LONG) { - tmp_offset = *offset; - zval_copy_ctor(tmp_offset); - convert_to_long(tmp_offset); - offset = tmp_offset; - } - switch (opline-extended_value) { - case ZEND_ISSET: - if (offset-value.lval = 0 offset-value.lval Z_STRLEN_PP(container)) { - result = 1; - } - break; - case ZEND_ISEMPTY: - if (offset-value.lval = 0 offset-value.lval Z_STRLEN_PP(container) Z_STRVAL_PP(container)[offset-value.lval] != '0') { - result = 1; - } - break; - } + if (Z_TYPE_P(offset) == IS_LONG) { + switch (opline-extended_value) { + case ZEND_ISSET: + if (offset-value.lval = 0 offset-value.lval Z_STRLEN_PP(container)) { + result = 1; + } + break; + case ZEND_ISEMPTY: + if (offset-value.lval = 0 offset-value.lval Z_STRLEN_PP(container) Z_STRVAL_PP(container)[offset-value.lval] != '0') { + result = 1; + } + break; + } +} } } Besides this the files zend_vm_execute.h and zend_vm_execute.h seem to have been messed up in CVS HEAD at the same commit?!.
#31471 [NEW]: PHP.net Website Problem
From: support at ion dot lu Operating system: PHP version: Irrelevant PHP Bug Type: Unknown/Other Function Bug description: PHP.net Website Problem Description: Luxembourg PHP Mirrors DOWN AGAIN!!! We did report this a while back, no actions taken, for a 450k ppl country this is unacceptable, please take ACTIONS! lu2.php.net lu.php.net If needed I am willing to share REAL ressources to get a proper mirror up and running with out any troubles!!! Thanks, a concerned php hacker. Reproduce code: --- http://lu.php.net http://lu2.php.net Expected result: A site :) Actual result: -- .. Z . Nothing but idleness not even an errorr -- Edit bug report at http://bugs.php.net/?id=31471edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31471r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31471r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31471r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31471r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31471r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31471r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31471r=needscript Try newer version: http://bugs.php.net/fix.php?id=31471r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31471r=support Expected behavior: http://bugs.php.net/fix.php?id=31471r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31471r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31471r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31471r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31471r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31471r=dst IIS Stability: http://bugs.php.net/fix.php?id=31471r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31471r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31471r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31471r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31471r=mysqlcfg
#31449 [Com]: Comparison of class with recursive references causes fatal
ID: 31449 Comment by: nospam at nospam dot com Reported By: marcus at lastcraft dot com Status: No Feedback Bug Type: Class/Object related Operating System: Linux PHP Version: 5.0.1 New Comment: C:\downloads\php5.0-win32-latestphp -v PHP 5.0.4-dev (cli) (built: Jan 10 2005 10:20:12) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies C:\downloads\php5.0-win32-latestphp recursive.php Fatal error: Nesting level too deep - recursive dependency? in C:\downloads\php5 .0-win32-latest\recursive.php on line 10 C:\downloads\php5.0-win32-latest Previous Comments: [2005-01-10 08:14:17] [EMAIL PROTECTED] If you don't want to test the latest version, we can't help. [2005-01-10 04:25:49] marcus at lastcraft dot com Hi... Well thanks for the standard response in an attempt to stall. I had enough trouble getting version 5.01 onto my Mandrake 9 box without going through the whole thing again with an experimental version, and then having to uninstall it. It would take several hours (possibly days) out of my time, but for a developer with a CVS snapshot installed it would take seconds. I could hardly have made the code shorter. So in short, no thanks. Unless perhaps you have information that this part of the code base has been worked on with respect to this issue? yours, Marcus [2005-01-10 02:24:43] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip [2005-01-08 05:31:19] marcus at lastcraft dot com Description: Hi... The script below causes a fatal error. This is just the simplest example I could find of a whole class of these problems. Makes comparing any object problematical. yours, Marcus Reproduce code: --- ?php class Recursive { private $me; function __construct() { $this-me = $this; } } new Recursive() != new Recursive(); ? Expected result: Nothing as the comparison is not output. Actual result: -- Fatal error with nesting too deep. -- Edit this bug report at http://bugs.php.net/?id=31449edit=1
#28106 [Opn-Fbk]: New object model fails where old style works fine
ID: 28106 Updated by: [EMAIL PROTECTED] Reported By: kupka at learninglab dot de -Status: Open +Status: Feedback Bug Type: Zend Engine 2 problem Operating System: Mac OS X PHP Version: 5.0.0RC3 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: [2004-07-12 20:00:38] antonr at game dot permonline dot ru to kupka at learninglab dot de: please check your script with last php5 snapshots... i suppose this bug was corrected [2004-06-10 12:23:31] kupka at learninglab dot de In PHP 5 Release Candidate 3 the problem still exists. [2004-05-08 10:32:19] antonr at game dot permonline dot ru So, there is a problem with serialization and deserialization of objects with references to others objects. [2004-05-08 10:27:17] antonr at game dot permonline dot ru 5.0.0 RC2, Win32 -- ?php class MyClass { public $number; function EchoNum() { echo $this-number; echo br; } } $a = new MyClass; $a-number = 1; $b = $a; $b-number = 2; $a-EchoNum(); $b-EchoNum(); ? outputs: 2 2 -- but... ?php class MyClass1 { public $myclass2; } class MyClass2 { public $myclass1; } $a = new MyClass1; $a-myclass2 = new MyClass2; $a-myclass2-myclass1 = $a; $a-number = 1; echo $a-myclass2-myclass1-number; echo br; $c = serialize($a); echo $c; echo brbr; $b = unserialize($c); $b-number = 2; echo $b-number; echo br; echo $b-myclass2-myclass1-number; echo br; echo br; ? outputs: 1 O:8:MyClass1:2:{s:8:myclass2;O:8:MyClass2:1:{s:8:myclass1;O:8:MyClass1:2:{s:8:myclass2;r:2;s:6:number;i:1;}}s:6:number;i:1;} 2 1 -- while: ?php class MyClass1 { public $myclass2; } class MyClass2 { public $myclass1; } $a = new MyClass1; $a-myclass2 = new MyClass2; $a-myclass2-myclass1 = $a; --- ampersand symbol added $a-number = 1; echo $a-myclass2-myclass1-number; echo br; $c = serialize($a); echo $c; echo brbr; $b = unserialize($c); $b-number = 2; echo $b-number; echo br; echo $b-myclass2-myclass1-number; echo br; echo br; ? works fine and outputs: 1 O:8:MyClass1:2:{s:8:myclass2;O:8:MyClass2:1:{s:8:myclass1;r:1;}s:6:number;i:1;} 2 2 [2004-04-26 10:31:19] kupka at learninglab dot de In PHP 5 Release Candidate 2 the problem still exists. The second script generates three different CStore objects, but there should only be one CStore objec and the two CHello objects should have a pointer to the same CStore object. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/28106 -- Edit this bug report at http://bugs.php.net/?id=28106edit=1
#31436 [Ver-Bgs]: isset incorrectly returning true when passed a bad type
ID: 31436 Updated by: [EMAIL PROTECTED] Reported By: joshdf at gmail dot com -Status: Verified +Status: Bogus Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS-2004-01-10 New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. See bug #31098 Previous Comments: [2005-01-07 02:09:37] joshdf at gmail dot com Description: isset may return true to a $string-member being passed in. Clearly, a string can not have a member variable; therefore, isset is expected to always return false in this case. The actual result of the reproduced code for us is incorrect when using php 5.0.3, while the expected correct result is produced in php 5.0.0. Reproduce code: --- ?php class Car { var $mpg; } $car = new Car(); $car-mpg = 30; //the normal case, should work if( isset($car-mpg) ) echo mpg is set...this is normalbr; //the case that may not work right: $some_random_string = this is some random string, it has no mpg member; if( isset($some_random_string-mpg) ) echo ERROR: This line should never be displayedbr; ? Expected result: mpg is set...this is normal Actual result: -- mpg is set...this is normal ERROR: This line should never be displayed -- Edit this bug report at http://bugs.php.net/?id=31436edit=1
#27815 [Opn-Fbk]: SourceForge XPath.class.php 3.4 Testsuite crashes Apache 2.0.49
ID: 27815 Updated by: [EMAIL PROTECTED] Reported By: wf at bitplan dot com -Status: Open +Status: Feedback -Bug Type: Reproducible crash +Bug Type: DOM XML related Operating System: WindowsXP PHP Version: 5.0.0RC1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: [2004-03-31 15:09:54] wf at bitplan dot com Description: We are using PHP5.0RC1 with Apache 2.0.49 and are heavily relying to XPath.Class.php which you'll find on sourceforge.net. We now tried to use the testsuite for XPath.Class.php to trace down the problem and it reproducibly crashes Apache any time you run it. The environment is 1 GByte MainMemory machine with a 64 MByte limit for PHP Scripts. max_execution_time = 90 ; Maximum execution time of memory_limit = 64M ; Maximum amount of memory a script may consume (8MB) extension=php_mysql.dll The apache error log shows: [Wed Mar 31 22:15:16 2004] [notice] Parent: child process exited with status 128 -- Restarting. Reproduce code: --- Download XClass.path.php and Testsuite from http://sourceforge.net/projects/phpxpath/ change line 4614 in XPatch.class.php to avoid a PHP5 fatal error: //$this = FALSE; // PHP5 incompatible !!! unset($this); run testsuite with http://localhost/XPath/testBench/validationTests/index.php and click on Run XPath tests Expected result: testsuite should run without crash Actual result: -- Apache crashes immediately -- Edit this bug report at http://bugs.php.net/?id=27815edit=1
#28015 [Opn-Bgs]: HTTP POST file uploads do not give error when canceled
ID: 28015 Updated by: [EMAIL PROTECTED] Reported By: kevin_winahradsky at hotmail dot com -Status: Open +Status: Bogus Bug Type: HTTP related Operating System: Linux 2.4.18 PHP Version: 5.0.0RC1 New Comment: See bug #19556 Previous Comments: [2004-10-07 11:48:51] pieter at frenssen dot be This also happens in PHP 4.3.x, but the bug report has been closed. Check bug #19556. [2004-04-15 20:09:50] kevin_winahradsky at hotmail dot com Description: When doing an HTTP POST upload of a file, if the upload is canceled by closing the browser, $_FILES['userfile']['error'] will be equal to UPLOAD_ERR_OK. Reproduce code: --- html head /head body p ?php if (isset($_FILES['userfile'])) { error_log(error = . $_FILES['userfile']['error']); error_log(size = . $_FILES['userfile']['size']); print(br . $_FILES['userfile']['error']); error_log(completed!); } ? /p pform enctype=multipart/form-data action=fileuploadtest.php method=post input type=hidden name=MAX_FILE_SIZE value=5000 input name='userfile' type=file size=30 br input type=submit /form/p /body/html Expected result: I would expect $_FILES['userfile']['error'] to be set to UPLOAD_ERR_PARTIAL. Actual result: -- $_FILES['userfile']['error'] is set to UPLOAD_ERR_OK. -- Edit this bug report at http://bugs.php.net/?id=28015edit=1
#28114 [Opn-Asn]: Reflection API doesn't return parameter data for built-in methods
ID: 28114 Updated by: [EMAIL PROTECTED] Reported By: adam at trachtenberg dot com -Status: Open +Status: Assigned Bug Type: Zend Engine 2 problem Operating System: * -PHP Version: 5CVS-2004-04-29 +PHP Version: 5CVS-2005-01-10 -Assigned To: +Assigned To: helly New Comment: Still an issue? Previous Comments: [2004-04-23 05:49:55] adam at trachtenberg dot com Your example is shorter, but I wanted to make it clear that things worked okay for user defined classes. BTW, I didn't know this was a known issue. [2004-04-23 01:50:29] [EMAIL PROTECTED] This is a known issue for several internal classes. Btw, why don't you use: php -r 'ReflectionClass::export($argv[1]);' ? [2004-04-23 01:42:41] adam at trachtenberg dot com Description: The Reflection API doesn't return parameter information for built-in classes, like it does for user-defined classes. Reproduce code: --- // userland class class ReflectionTest { function test($foo, $bar) {} } Reflection::export( new ReflectionClass('ReflectionTest')); // example of a system class Reflection::export(new ReflectionClass('Exception')); Expected result: The methods section of Exception should look like similar to the methods section of ReflectionTest In other words, there should be a Parameters block for methods, like __construct(), that take parameters. This doesn't just apply to Exception, but all classes written in C. Actual result: -- ReflectionTest: - Methods [1] { Method [ user public method test ] { @@ /www/reflection.php 9 - 9 - Parameters [2] { Parameter #0 [ $foo ] Parameter #1 [ $bar ] } } Exception: - Methods [9] { Method [ internal final private method __clone ] { } Method [ internal ctor method __construct ] { } Method [ internal final public method getMessage ] { } Method [ internal final public method getCode ] { } Method [ internal final public method getFile ] { } Method [ internal final public method getLine ] { } Method [ internal final public method getTrace ] { } Method [ internal final public method getTraceAsString ] { } Method [ internal public method __toString ] { } -- Edit this bug report at http://bugs.php.net/?id=28114edit=1
#28422 [Opn-Fbk]: Apache Crash with segmentation fault (11)
ID: 28422 Updated by: [EMAIL PROTECTED] Reported By: Enrico dot Simetti at ingegneria dot studenti dot unige -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Linux/WinXP PHP Version: 5.0.0RC2 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: [2004-05-17 17:41:33] Enrico dot Simetti at ingegneria dot studenti dot unige Description: OS: Linux 2.6.0 Apache: Apache/1.3.29 (Unix) PHP:5.0.0RC2 (compiled with --with-mysql --with-debug) The following script makes my apache crash with this error: [notice] child pid 13748 exit signal Segmentation fault (11) OS: Windows XP SP1 Apache: Apache/2.0.49 (and 1.3.31 too) PHP:5.0.0RC2 The same script makes my apache crash with this error: [notice] Parent: child process exited with status 3221225477 -- Restarting. Reproduce code: --- http://matfors.net/tupac/exception.php.txt Expected result: A few notes... If i dont use my error_class, everything works fine, and PHP gives me this warning Warning: call_user_func_array() [function.call-user-func-array]: Unable to call my_class::throw_exception() in C:\Programmi\Apache Group\Apache2\htdocs\testfield\exception.php on line 40 problably since i threw an exception in that function. If i use my error_class and i dont use the call_user_func_array, but instead i call $test-throw_exception() everything works fine again (because no Warning is generated?) If i use my error class and call call_user_func_array then everything blows up Actual result: -- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 13800)] 0x in ?? () (gdb) bt #0 0x in ?? () #1 0x403d2fb5 in execute (op_array=0xbfffcca0) at /root/php-5.0.0RC2/Zend/zend_execute.c:1391 #2 0x403ac282 in zend_call_function (fci=0xbfffcca0, fci_cache=0x0) at /root/php-5.0.0RC2/Zend/zend_execute_API.c:835 #3 0x403abbb5 in call_user_function_ex (function_table=0x80c8f78, object_pp=0x80c8f78, function_name=0x80c8f78, retval_ptr_ptr=0x80c8f78, param_count=135040888, params=0x80c8f78, no_separation=135040888, symbol_table=0x80c8f78) at /root/php-5.0.0RC2/Zend/zend_execute_API.c:550 #4 0x403b5f63 in zend_error (type=2, format=0x403fbb8e %s) at /root/php-5.0.0RC2/Zend/zend.c:975 #5 0x4037f6a8 in php_verror (docref=0x80c3f4c , params=0x403e0774 , type=2, format=0x403ecdcf Unable to call %s(), args=0xbfffce0c \214[EMAIL PROTECTED]) at /root/php-5.0.0RC2/main/main.c:544 #6 0x4037f9df in php_error_docref0 (docref=0x0, type=2, format=0x403ecdcf Unable to call %s()) at /root/php-5.0.0RC2/main/main.c:564 #7 0x40327d55 in zif_call_user_func_array (ht=2, return_value=0x80c3e6c, this_ptr=0x0, return_value_used=0) at /root/php-5.0.0RC2/ext/standard/basic_functions.c:1949 #8 0x403d6660 in zend_do_fcall_common_helper (execute_data=0xbfffd090, opline=0x80c3ac0, op_array=0x80c30e4) at /root/php-5.0.0RC2/Zend/zend_execute.c:2699 #9 0x403d67da in zend_do_fcall_handler (execute_data=0xbfffd090, opline=0x80c3ac0, op_array=0x80c30e4) at /root/php-5.0.0RC2/Zend/zend_execute.c:2828 #10 0x403d2fb5 in execute (op_array=0x80c30e4) at /root/php-5.0.0RC2/Zend/zend_execute.c:1391 #11 0x403b629d in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php-5.0.0RC2/Zend/zend.c:1058 #12 0x403817c8 in php_execute_script (primary_file=0xb3f0) at /root/php-5.0.0RC2/main/main.c:1630 #13 0x403dd1ae in apache_php_module_main (r=0x8178af4, display_source_mode=0) at /root/php-5.0.0RC2/sapi/apache/sapi_apache.c:54 #14 0x403ddcda in send_php (r=0x8178af4, display_source_mode=0, filename=0x0) at /root/php-5.0.0RC2/sapi/apache/mod_php5.c:621 #15 0x403dde83 in send_parsed_php (r=0x8178af4) at /root/php-5.0.0RC2/sapi/apache/mod_php5.c:636 #16 0x080548df in ap_invoke_handler () #17 0x080698a7 in ap_some_auth_required () #18 0x08069906 in ap_process_request () #19 0x0806093d in ap_child_terminate () #20 0x08060b0b in ap_child_terminate () #21 0x08060c71 in ap_child_terminate () #22 0x08061317 in ap_child_terminate () #23 0x08061b4f in main () #24 0x400bed06 in __libc_start_main () from /lib/libc.so.6 (gdb) frame 1 #1 0x403d2fb5 in execute (op_array=0xbfffcca0) at /root/php-5.0.0RC2/Zend/zend_execute.c:1391 1391if (EX(opline)-handler(execute_data, EX(opline), op_array TSRMLS_CC)) { (gdb) print (char *)(executor_globals.function_state_ptr-function)-common.function_name $2 = 0x80c80f4 handler -- Edit this bug report at http://bugs.php.net/?id=28422edit=1
#19556 [Opn-Bgs]: UPLOAD_ERR_PARTIAL when uploading files does not work, the error stays zero
ID: 19556 Updated by: [EMAIL PROTECTED] Reported By: tal at netoncourse dot com -Status: Open +Status: Bogus Bug Type: HTTP related Operating System: win2k server proffesional PHP Version: 4.3.8 New Comment: Not PHP bug. Previous Comments: [2004-10-09 16:19:04] pieter at frenssen dot be I have solved this problem, it appears to be caused by the installation of Gzip 1.3.26.1a I recompiled Apache without Gzip and when I now retry the error does not occur anymore. In effect the script is not executed at all which is probably the default behaviour. [2004-10-09 15:04:44] pieter at frenssen dot be I've upgraded to PHP 4.3.9 and still have this problem. [2004-10-07 13:57:30] tal at netoncourse dot com pieter at frenssen dot be says it is still happening [2004-10-07 11:46:50] pieter at frenssen dot be This bug has been closed but isn't fixed yet. I'm experiencing the same problem. It is very easy to test, just do a post upload to a file containing the script ?php $message = print_r( $_FILES, TRUE ); mail('[EMAIL PROTECTED]','test',$message); ? upload a large file, press stop during the upload and check the email. It will contain the text '[error] = 0' I'm using PHP 4.3.8 on Apache 1.3.31. [2002-10-30 11:43:42] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/19556 -- Edit this bug report at http://bugs.php.net/?id=19556edit=1
#27868 [Opn-Ver]: segfault on apache and php5 cli (only with --disable-debug!)
ID: 27868 Updated by: [EMAIL PROTECTED] Reported By: blackei2k at gmx dot de -Status: Open +Status: Verified Bug Type: Zend Engine 2 problem Operating System: * -PHP Version: 5CVS-2004-04-07 +PHP Version: 5CVS-2005-01-10 Previous Comments: [2004-08-02 12:10:11] kostko at unimatrix-one dot org I can also confirm this problem. Tried version 5.0.0 final and it segfaults. It segfaults also on the latest 5.1.0-dev version. [2004-07-25 21:23:39] blackei2k at gmx dot de Still there the segfault. error.log of apache: [Sun Jul 25 21:28:17 2004] [notice] child pid 11664 exit signal Segmentation fault (11) php configured like: './configure' '--disable-debug' '--disable-cli' '--with-apxs=/usr/bin/apxs' '--disable-pear' System tested on: Linux baggy 2.4.21 #1 Fri Jun 27 21:24:38 CEST 2003 i686 PHP Version 5.1.0-dev PHP API 20031224 PHP Extension 20040718 Zend Extension 220040718 Sorry stas, but this is still happening. [2004-07-19 16:51:45] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip can't reproduce with new PHP5, probably fixed [2004-04-07 08:05:28] [EMAIL PROTECTED] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 20934)] 0x082a972d in zend_std_get_method (object=0x40e420bc, method_name=0x40e4213c zar, method_len=3) at /usr/src/web/php/php5/Zend/zend_object_handlers.c:673 673 if (zend_hash_find(zobj-ce-function_table, lc_method_name, method_len+1, (void **)fbc) == FAILURE) { (gdb) bt #0 0x082a972d in zend_std_get_method (object=0x40e420bc, method_name=0x40e4213c zar, method_len=3) at /usr/src/web/php/php5/Zend/zend_object_handlers.c:673 #1 0x082b72c7 in zend_init_method_call_handler (execute_data=0xbfffd800, opline=0x40e40420, op_array=0x40e35e54) at /usr/src/web/php/php5/Zend/zend_execute.c:2505 #2 0x082b4a07 in execute (op_array=0x40e35e54) at /usr/src/web/php/php5/Zend/zend_execute.c:1391 #3 0x0829a699 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/web/php/php5/Zend/zend.c:1057 #4 0x082686f6 in php_execute_script (primary_file=0xbbd0) at /usr/src/web/php/php5/main/main.c:1630 #5 0x082c7a92 in main (argc=2, argv=0xbc54) at /usr/src/web/php/php5/sapi/cli/php_cli.c:943 [2004-04-05 07:47:01] blackei2k at gmx dot de I got a working (segfaulting) test-case here: ?php class foo { function __construct() { $a = 0 ; if ($a == 0) throw new Exception ('$a == 0 in foo::_constructor'); } function zar() { return 0; } } class bar extends foo { function __construct() { try { parent::__construct(); } catch (Exception $e) { echo $e-getMessage() . \n; } return true; } } $o = new bar; $o-zar(); ? Hope that helps The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/27868 -- Edit this bug report at http://bugs.php.net/?id=27868edit=1
#27891 [Opn-Fbk]: Bad behavior of require() function
ID: 27891 Updated by: [EMAIL PROTECTED] Reported By: faraco dot phpbugs at mailnull dot com -Status: Open +Status: Feedback Bug Type: Zend Engine 2 problem Operating System: Windows NT4 SP6 PHP Version: 5CVS-2004-04-15 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: [2004-09-24 18:35:46] kj at legalizer dot dk What if you turn off ISAPI caching? [2004-04-06 15:21:29] faraco dot phpbugs at mailnull dot com Here is the confirmation of the bug. Changing index.php to: ? echo realpath(../lib/functions.php).br; echo realpath(lib/functions.php); ? Expected result is: E:\docroot\lib\functions.php E:\docroot\subroot\lib\functions.php While actual result is: E:\docroot\lib\functions.php E:\docroot\lib\functions.php [2004-04-06 15:10:20] faraco dot phpbugs at mailnull dot com The same script runs perfectly on PHP 4.3.4. [2004-04-06 14:55:53] faraco dot phpbugs at mailnull dot com Sorry. I mistyped the Actual Result. The correct message is: PHP Fatal error: Cannot redeclare anyfunction() (previously declared in E:\docroot\lib\functions.php:4) in E:\docroot\lib\functions.php on line 7 [2004-04-06 14:54:18] faraco dot phpbugs at mailnull dot com Description: I have the following file structure (folders in uppercase for better understanding): DOCROOT | +- LIB | | | +- functions.php | +- SUBROOT | +- index.php | +- LIB | +- functions.php The 'index.php' file uses the require() function to include both 'functions.php' files (that have different contents). When running 'index.php', a Cannot redeclare function error occurs. Pay attention at the error message: the compiler says that the same function is redeclared in the same file on different lines! Reproduce code: --- DOC_ROOT/LIB/functions.php -- ? echo Here is DOCROOT\\LIB\\functions.phpbr; function anyfunction($param) { return $param; } ? DOCROOT/SUBROOT/LIB/functions.php - ? echo Here is DOCROOT\\SUBROOT\\LIB\\functions.phpbr; ? DOC_ROOT/SUBROOT/LIB/index.php -- ? require(../lib/functions.php); require(lib/functions.php); echo anyfunction(Hello World!); ? Expected result: Here is DOCROOT\LIB\functions.php Here is DOCROOT\SUBROOT\LIB\functions.php Hello World! Actual result: -- Here is DOCROOT\LIB\functions.php PHP Fatal error: Cannot redeclare anyfunction() (previously declared in C:\doc_root\lib\functions.php:4) in E:\doc_root\lib\functions.php on line 7 -- Edit this bug report at http://bugs.php.net/?id=27891edit=1
#28025 [Opn-Ver]: function redeclared when return before its declaration
ID: 28025 Updated by: [EMAIL PROTECTED] Reported By: Christian dot Lefebvre at atosorigin dot com -Status: Open +Status: Verified -Bug Type: Scripting Engine problem +Bug Type: Zend Engine 2 problem -Operating System: linux +Operating System: * -PHP Version: 5.0.0RC1 +PHP Version: 5CVS-2005-01-10 Previous Comments: [2004-07-10 16:49:55] patrice at lazareff dot com Same behavior if exit is used instead of return, i.e: if(defined(MY_CONSTANT)) exit; define(MY_CONSTANT, 1); function foo() {} The only workaround seems to be using an else statement: if(defined(MY_CONSTANT) return; else { function foo() {} } how sad... [2004-04-16 11:04:31] Christian dot Lefebvre at atosorigin dot com Description: lot of php3 codes begin include files by a if(defined(..)) return; define(..) to simulate include_once behavior it works fine with php4, but with php5, functions declared after this return raise cannot redeclare error when the file is included twice. Reproduce code: --- t1.php : ?php include(t2.php); toto(); include(t2.php); toto(); ? t2.php : ?php error_log(in t2); if (defined(_T2_INCLUDED)) { error_log(already went there); return; } define(_T2_INCLUDED, 1); error_log(still in t2); function toto() { echo Here am I !!\n; } ? Expected result: with php4 : in t2 still in t2 Here am I !! in t2 already went there Here am I !! Actual result: -- with php5 : in t2 still in t2 Here am I !! Fatal error: Cannot redeclare toto() (previously declared in t2.php:13) in t2.php on line 14 -- Edit this bug report at http://bugs.php.net/?id=28025edit=1
#31474 [NEW]: calling of the parent class method leads to recursion and segmentation fault
From: public at grik dot net Operating system: linux PHP version: 5.0.3 PHP Bug Type: Class/Object related Bug description: calling of the parent class method leads to recursion and segmentation fault Description: When I moved my classes hierarchy code from the PHP 4 to the PHP 5 and renamed costructors from the class names to __construct, I faced a segmentation fault. The constructor calls the parent's constructor. Parent's constructor calls another method, overloaded in the child's class. That overloaded method from the child's class calls the constructor that calls the parent's constructor again. But instead of the endless loop I get the segfault. Reproduce code: --- class A{ function a1(){ echo ' class a '; } function a2(){ $this-a1(); } } class B extends A { function a1(){ $this-a2(); } function __construct(){ parent::a2(); } } $a= new B(); Expected result: Really, I would like to see the output of class a string, cause it's not convenient to rewrite all occurences of $this-method() to self::method in the base classes. But I understand there is a new paradigm of final methods now and I will use it. I would like to see the endless loop until script execution time expires: B::a1() calls A::a2() and vice versa Actual result: -- Segmentation fault -- Edit bug report at http://bugs.php.net/?id=31474edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31474r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31474r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31474r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31474r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31474r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31474r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31474r=needscript Try newer version: http://bugs.php.net/fix.php?id=31474r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31474r=support Expected behavior: http://bugs.php.net/fix.php?id=31474r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31474r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31474r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31474r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31474r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31474r=dst IIS Stability: http://bugs.php.net/fix.php?id=31474r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31474r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31474r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31474r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31474r=mysqlcfg
#31475 [NEW]: calling of the parent class method leads to recursion and segmentation fault
From: public at grik dot net Operating system: linux PHP version: 5.0.3 PHP Bug Type: Class/Object related Bug description: calling of the parent class method leads to recursion and segmentation fault Description: When I moved my classes hierarchy code from the PHP 4 to the PHP 5 and renamed costructors from the class names to __construct, I faced a segmentation fault. The constructor calls the parent's constructor. Parent's constructor calls another method, overloaded in the child's class. That overloaded method from the child's class calls the constructor that calls the parent's constructor again. But instead of the endless loop I get the segfault. Reproduce code: --- class A{ function a1(){ echo ' class a '; } function a2(){ $this-a1(); } } class B extends A { function a1(){ $this-a2(); } function __construct(){ parent::a2(); } } $a= new B(); Expected result: The endless loop until script execution time expires: B::a1() calls A::a2() and vice versa Actual result: -- Segmentation fault -- Edit bug report at http://bugs.php.net/?id=31475edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31475r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31475r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31475r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31475r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31475r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31475r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31475r=needscript Try newer version: http://bugs.php.net/fix.php?id=31475r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31475r=support Expected behavior: http://bugs.php.net/fix.php?id=31475r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31475r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31475r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31475r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31475r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31475r=dst IIS Stability: http://bugs.php.net/fix.php?id=31475r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31475r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31475r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31475r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31475r=mysqlcfg
[suspicious - maybe spam] [suspicious - maybe spam] #31451 [Opn-Fbk]: __call can not work with __get
ID: 31451 Updated by: [EMAIL PROTECTED] Reported By: syre at citiz dot net -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: win2k pro sp4 PHP Version: 4.3.10 New Comment: Please, provide a short but complete reproduce script with expected and actual results. Your code works fine for me with latest PHP 4.3 snapshot. Previous Comments: [2005-01-08 13:28:01] syre at citiz dot net the code will ok on the recent snapshot but if add a new overload method into class ObjectShell, function func1($a, $b){ echo func1() called. ; return $this-_target-func1($a, $b); } the programme will crashed [2005-01-08 13:06:17] syre at citiz dot net the code is ?php /** * add a shell on an object */ class ObjectShell { var $_target; function ObjectShell($target) { $this-_target=$target; overload('ObjectShell'); } function __get($name, $value) { $value=$this-_target-$name; return true; } function __set($name, $value) { $this-_target-$name=$value; return true; } function __call($func, $args, $return) { if(method_exists($this-_target, $func)) { $return =call_user_func_array(array($this-_target, $func), $args); return true; }else{ return false; } } } class Test { var $var1=1024; function func1($a,$b) { return $a + $b; } } $t=new Test; $p=new ObjectShell($t); //this will work echo $p-var1; echo br\n; echo $p-func1(9,7); //this will result script time out on php4.3.10 //but it is ok on 4.3.8 / 4.3.2 //if remove __get, __set£¬it will also work ok echo $p-func1(9,7); echo br\n; echo $p-var1; ? [2005-01-08 12:59:28] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ..and there is no code in the given url that we could run with our own PHP builds.. [2005-01-08 12:18:49] syre at citiz dot net Description: //that will ok echo $p-var1; echo br\n; echo $p-func1(9,7); //that will cost script time out //the same code will ok on 4.3.8 / 4.3.2 echo $p-func1(9,7); echo br\n; echo $p-var1; Reproduce code: --- http://community.csdn.net/Expert/topic/3707/3707113.xml?temp=.141308 Expected result: 1024br 16br 16br 1024 Actual result: -- script time out -- Edit this bug report at http://bugs.php.net/?id=31451edit=1
#30726 [Opn-Ctl]: Negative floats 1 as strings don't work in calculations
ID: 30726 Updated by: [EMAIL PROTECTED] Reported By: degusta at yahoo dot com -Status: Open +Status: Critical Bug Type: Math related Operating System: * -PHP Version: 4.3.10 +PHP Version: 4CVS, 5CVS (2005-01-10) New Comment: See also bug #30069 This works fine with e.g. PHP 4.2.2 :) Previous Comments: [2004-11-09 01:10:54] degusta at yahoo dot com Description: Strings that are between 0 and -1 and don't have a leading zero, e.g. -.2, -.95, etc, do not get cast to floats. This is a variant of bug 30069 which was closed with 4.3.9. That fix did solve the problem for positive floats (.1, .4, etc), but apparently not for negative floats. The bug is still present in CVS as of 11/8/04 (php4-STABLE-200411082130). I haven't checked the 5 branch yet, but my guess is that it's wrong there too since 30069 also existed in the 5 branch. Every past version of PHP has cast this properly (up through and including 4.3.8). Reproduce code: --- echo '-.1' * 2; Expected result: -0.2 Actual result: -- 0 -- Edit this bug report at http://bugs.php.net/?id=30726edit=1
#31476 [NEW]: oci_connect fails if NLS_LANG != default
From: msquillace at sogei dot it Operating system: Red Hat Enterprise Linux AS 3.0 PHP version: 5CVS-2005-01-10 (dev) PHP Bug Type: OCI8 related Bug description: oci_connect fails if NLS_LANG != default Description: We normally set NLS_LANG=ITALIAN_ITALY.WE8ISO8859P1 in the Apache startup script, mirroring the setting used on the Oracle server, and this has always worked flawlessly with PHP up to version 4.3.0, the one we still run in production. For a new project though we installed PHP 5.0.3 with Oracle 10g (client only; the RDBMS is on another machine) and found that the only way to successfully connect to Oracle from a PHP script is to comment out the NLS_LANG export and go back to the default (American_America.something), otherwise one gets: PHP Warning: oci_connect(): OCISessionBegin: ORA-00604: error occurred at recursive SQL level 1 ORA-00911: invalid character in /opt/web/php/prova_oracle.php on line 2 Here is the minimal script reproducing the error (the credentials have been modified for security reasons, but we tried several with identical results): ?php $conn = oci_connect(user, passwd, db1); ? It may be useful to note that if any one of the arguments is invalid (wrong username and/or password, or non-existant db instance) the OCI8 extensions works as expected, reporting the correct Oracle errors; so the problem happens after the user is authenticated, when it is time to create a connection to the DB server. Today we downloaded the 09:30 CVS snapshot of PHP 5 and upgraded the OCI8 extension, but the problem remains (this was somewhat expected, as the oci8.c diff didn't show extensive modifications). If confirmed, I believe this is a serious bug affecting most non-English speaking PHP users. Reproduce code: --- ?php $conn = oci_connect(user, passwd, db1); ? -- Edit bug report at http://bugs.php.net/?id=31476edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31476r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31476r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31476r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31476r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31476r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31476r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31476r=needscript Try newer version: http://bugs.php.net/fix.php?id=31476r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31476r=support Expected behavior: http://bugs.php.net/fix.php?id=31476r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31476r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31476r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31476r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31476r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31476r=dst IIS Stability: http://bugs.php.net/fix.php?id=31476r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31476r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31476r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31476r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31476r=mysqlcfg
#28114 [Asn]: Reflection API doesn't return parameter data for built-in methods
ID: 28114 User updated by: adam at trachtenberg dot com Reported By: adam at trachtenberg dot com Status: Assigned Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS-2005-01-10 Assigned To: helly New Comment: Yes. For example: php -r 'ReflectionClass::export(ReflectionClass);' None of the methods have parameters, and I know some of them (__construct, export, etc.) definitely do. Previous Comments: [2005-01-10 15:23:00] [EMAIL PROTECTED] Still an issue? [2004-04-23 05:49:55] adam at trachtenberg dot com Your example is shorter, but I wanted to make it clear that things worked okay for user defined classes. BTW, I didn't know this was a known issue. [2004-04-23 01:50:29] [EMAIL PROTECTED] This is a known issue for several internal classes. Btw, why don't you use: php -r 'ReflectionClass::export($argv[1]);' ? [2004-04-23 01:42:41] adam at trachtenberg dot com Description: The Reflection API doesn't return parameter information for built-in classes, like it does for user-defined classes. Reproduce code: --- // userland class class ReflectionTest { function test($foo, $bar) {} } Reflection::export( new ReflectionClass('ReflectionTest')); // example of a system class Reflection::export(new ReflectionClass('Exception')); Expected result: The methods section of Exception should look like similar to the methods section of ReflectionTest In other words, there should be a Parameters block for methods, like __construct(), that take parameters. This doesn't just apply to Exception, but all classes written in C. Actual result: -- ReflectionTest: - Methods [1] { Method [ user public method test ] { @@ /www/reflection.php 9 - 9 - Parameters [2] { Parameter #0 [ $foo ] Parameter #1 [ $bar ] } } Exception: - Methods [9] { Method [ internal final private method __clone ] { } Method [ internal ctor method __construct ] { } Method [ internal final public method getMessage ] { } Method [ internal final public method getCode ] { } Method [ internal final public method getFile ] { } Method [ internal final public method getLine ] { } Method [ internal final public method getTrace ] { } Method [ internal final public method getTraceAsString ] { } Method [ internal public method __toString ] { } -- Edit this bug report at http://bugs.php.net/?id=28114edit=1
#31091 [Fbk-Opn]: Apache2 crash with SimpleXML and XPath
ID: 31091 User updated by: cpuidle at gmx dot de Reported By: cpuidle at gmx dot de -Status: Feedback +Status: Open Bug Type: SimpleXML related Operating System: WinXP SP1 PHP Version: 5.0.2 New Comment: No, still crashes :( Previous Comments: [2005-01-10 16:29:51] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2004-12-14 17:31:54] cpuidle at gmx dot de The same code, but without the xpath expression does not crash (and of course not work...): foreach ($xml-ListOfRepositoryWorkflowProcess-RepositoryWorkflowProcess-ListOfRepositoryWfStep-RepositoryWfStep-ListOfRepositoryWfStepIOArgument-RepositoryWfStepIOArgument as $wfArg) [2004-12-14 17:26:19] cpuidle at gmx dot de Description: I'm using xpath to retrieve a child node from an xml structure, then loop over subelements of this node. This crashes reproducibly at the foreach loop (apache log file: child process exited with status 3221225477 -- Restarting) Same happens with latest 5.0.3RC2 Reproduce code: --- $step = 'FindThisNode'; $node = $xml-xpath('ListOfRepositoryWorkflowProcess/RepositoryWorkflowProcess/ListOfRepositoryWfStep/RepositoryWfStep[Name3='.$step.']'); print_r($node); # crash here! foreach ($node-ListOfRepositoryWfStepIOArgument-RepositoryWfStepIOArgument as $wfArg) { } Expected result: no crash?! -- Edit this bug report at http://bugs.php.net/?id=31091edit=1
#31201 [Bgs]: COM functionality broken in PHP 4.3.10
ID: 31201 User updated by: borbarad at gmxpro dot net Reported By: borbarad at gmxpro dot net Status: Bogus Bug Type: COM related Operating System: Windows 2000 Server PHP Version: 4.3.10 New Comment: Problem seems to be solved in the current stable CVS snapshot. Previous Comments: [2004-12-23 02:42:16] [EMAIL PROTECTED] Dupe of #31159 [2004-12-22 14:55:33] borbarad at gmxpro dot net I can also confirm, the bug is still persistent. Have only tried on command-line though, because I cannot afford downtime for our server. [2004-12-22 13:11:15] kir at post dot kg I have installed CVS snapshot. Same result. [2004-12-21 15:33:46] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2004-12-21 11:26:52] borbarad at gmxpro dot net Are you sure you upgraded correctly and have no stale DLLs? Yes. I can rule out, that there are any older DLLs in the %PATH% which may be loaded earlier. From Apache I load the php4ts.dll giving the complete path and at command-line there's no place where such a DLL could hide. Maybe it's the symptom of another change :-/ We are going to upgrade to PHP 5 anyway, but we'll have to review all our scripts. Therefore we are still using 4.3.10. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31201 -- Edit this bug report at http://bugs.php.net/?id=31201edit=1
#31444 [Opn-Asn]: Memory leak in zend_language_scanner.c
ID: 31444 Updated by: [EMAIL PROTECTED] Reported By: hexer at studentcenter dot org -Status: Open +Status: Assigned -Bug Type: Scripting Engine problem +Bug Type: Zend Engine 2 problem Operating System: Linux 2.4 -PHP Version: 4.3.10 +PHP Version: 5CVS (2005-01-10) -Assigned To: +Assigned To: andi New Comment: hexer at studentcenter dot org: You should probably patch zend_language_scanner.l instead of .c Andi, this problem is reproducible with all branches. Index: zend_language_scanner.l === RCS file: /repository/ZendEngine2/zend_language_scanner.l,v retrieving revision 1.118 diff -u -r1.118 zend_language_scanner.l --- zend_language_scanner.l 3 Jan 2005 10:01:03 - 1.118 +++ zend_language_scanner.l 10 Jan 2005 16:33:35 - @@ -145,6 +145,10 @@ efree(CG(heredoc)); CG(heredoc_len)=0; } + if (SCNG(yy_start_stack)) { + yy_flex_free(SCNG(yy_start_stack)); + SCNG(yy_start_stack) = NULL; + } RESET_DOC_COMMENT(); #ifdef ZEND_MULTIBYTE Previous Comments: [2005-01-07 21:16:34] hexer at studentcenter dot org Description: A memory leak happens with any script that contains curly brackets { } The global variable yy_start_stack in zend_language_scanner.c is not freed at the end of the php program execution. Reproduce code: --- Test script (test.php): ?php { } ? Php was compiled with: ./configure --with-mysql \ --with-xml \ --with-apache=../apache_1.3.33 \ --enable-track-vars \ --with-gd \ --enable-discard-path \ --enable-bcmath \ --enable-gd-native-tt \ --with-freetype-dir=/usr/local \ --with-png-dir=/usr/local \ --with-jpeg-dir=/usr/local \ --with-zlib=/usr/local Actual result: -- Valgrind detects and reports the leak: valgrind --tool=memcheck --leak-check=yes --show-reachable=yes php test.php ==31180== 100 bytes in 1 blocks are still reachable in loss record 1 of 1 ==31180==at 0x1B900D20: malloc (vg_replace_malloc.c:131) ==31180==by 0x8125199: yy_push_state (Zend/zend_language_scanner.c:5805) ==31180==by 0x8122DA7: lex_scan (Zend/zend_language_scanner.c:4252) ==31180==by 0x812B2AD: zendlex (/usr/local/src/php-4.3.10/Zend/zend_compile.c:2472) ==31180== ==31180== LEAK SUMMARY: ==31180==definitely lost: 0 bytes in 0 blocks. ==31180==possibly lost: 0 bytes in 0 blocks. ==31180==still reachable: 100 bytes in 1 blocks. ==31180== suppressed: 0 bytes in 0 blocks. Code in question is at zend_language_scanner.c:4252 In the above scenario the yy_start_stack does not get freed at the end of the program execution. Proposed patch frees it under shutdown_scanner() Possible patch below: (Note: The following patch fixed the problem but has not yet been tested under server load / real world conditions. Will post real world test results next week) Apply to zend_language_scanner.c: *** 2874,2892 --- 2874,2899 { if (CG(heredoc)) { efree(CG(heredoc)); CG(heredoc_len)=0; } + if (SCNG(yy_start_stack)) { + yy_flex_free(SCNG(yy_start_stack)); + SCNG(yy_start_stack) = NULL; + } + #ifdef ZEND_MULTIBYTE if (SCNG(code)) { efree(SCNG(code)); SCNG(code) = NULL; } if (SCNG(current_code)) { efree(SCNG(current_code)); SCNG(current_code) = NULL; } #endif /* ZEND_MULTIBYTE */ } END_EXTERN_C() -- Edit this bug report at http://bugs.php.net/?id=31444edit=1
#31475 [Opn-Bgs]: calling of the parent class method leads to recursion and segmentation fault
ID: 31475 Updated by: [EMAIL PROTECTED] Reported By: public at grik dot net -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: linux PHP Version: 5.0.3 New Comment: Submitted twice. Previous Comments: [2005-01-10 17:24:23] public at grik dot net Description: When I moved my classes hierarchy code from the PHP 4 to the PHP 5 and renamed costructors from the class names to __construct, I faced a segmentation fault. The constructor calls the parent's constructor. Parent's constructor calls another method, overloaded in the child's class. That overloaded method from the child's class calls the constructor that calls the parent's constructor again. But instead of the endless loop I get the segfault. Reproduce code: --- class A{ function a1(){ echo ' class a '; } function a2(){ $this-a1(); } } class B extends A { function a1(){ $this-a2(); } function __construct(){ parent::a2(); } } $a= new B(); Expected result: The endless loop until script execution time expires: B::a1() calls A::a2() and vice versa Actual result: -- Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=31475edit=1
#31475 [Bgs]: calling of the parent class method leads to recursion and segmentation fault
ID: 31475 User updated by: public at grik dot net Reported By: public at grik dot net Status: Bogus Bug Type: Class/Object related Operating System: linux PHP Version: 5.0.3 New Comment: Sorry, this is a repost from the #31474, caused by my problem of the internet connection. Sorry. Previous Comments: [2005-01-10 17:31:06] [EMAIL PROTECTED] Submitted twice. [2005-01-10 17:24:23] public at grik dot net Description: When I moved my classes hierarchy code from the PHP 4 to the PHP 5 and renamed costructors from the class names to __construct, I faced a segmentation fault. The constructor calls the parent's constructor. Parent's constructor calls another method, overloaded in the child's class. That overloaded method from the child's class calls the constructor that calls the parent's constructor again. But instead of the endless loop I get the segfault. Reproduce code: --- class A{ function a1(){ echo ' class a '; } function a2(){ $this-a1(); } } class B extends A { function a1(){ $this-a2(); } function __construct(){ parent::a2(); } } $a= new B(); Expected result: The endless loop until script execution time expires: B::a1() calls A::a2() and vice versa Actual result: -- Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=31475edit=1
#31476 [Opn-Fbk]: oci_connect fails if NLS_LANG != default
ID: 31476 Updated by: [EMAIL PROTECTED] Reported By: msquillace at sogei dot it -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: Red Hat Enterprise Linux AS 3.0 PHP Version: 5CVS-2005-01-10 (dev) New Comment: I'm non-English speaking user too and I use different NLS_LANGs without any problems. Are you able to reproduce it with other versions of Oracle client and/or server? Previous Comments: [2005-01-10 18:10:27] msquillace at sogei dot it Description: We normally set NLS_LANG=ITALIAN_ITALY.WE8ISO8859P1 in the Apache startup script, mirroring the setting used on the Oracle server, and this has always worked flawlessly with PHP up to version 4.3.0, the one we still run in production. For a new project though we installed PHP 5.0.3 with Oracle 10g (client only; the RDBMS is on another machine) and found that the only way to successfully connect to Oracle from a PHP script is to comment out the NLS_LANG export and go back to the default (American_America.something), otherwise one gets: PHP Warning: oci_connect(): OCISessionBegin: ORA-00604: error occurred at recursive SQL level 1 ORA-00911: invalid character in /opt/web/php/prova_oracle.php on line 2 Here is the minimal script reproducing the error (the credentials have been modified for security reasons, but we tried several with identical results): ?php $conn = oci_connect(user, passwd, db1); ? It may be useful to note that if any one of the arguments is invalid (wrong username and/or password, or non-existant db instance) the OCI8 extensions works as expected, reporting the correct Oracle errors; so the problem happens after the user is authenticated, when it is time to create a connection to the DB server. Today we downloaded the 09:30 CVS snapshot of PHP 5 and upgraded the OCI8 extension, but the problem remains (this was somewhat expected, as the oci8.c diff didn't show extensive modifications). If confirmed, I believe this is a serious bug affecting most non-English speaking PHP users. Reproduce code: --- ?php $conn = oci_connect(user, passwd, db1); ? -- Edit this bug report at http://bugs.php.net/?id=31476edit=1
#26332 [Com]: Using curl_multi_exec with curl_multi_fdset doesnt work
ID: 26332 Comment by: dtorop933 at gmail dot com Reported By: foxkill at gmx dot de Status: Open Bug Type: cURL related Operating System: Linux PHP Version: 5.0.0RC1-dev New Comment: This appears related to the version of libcurl installed. Running libcurl 7.12.3, foxkill's code works properly for me. Trying curl 7.12.0, 7.12.1, and 7.12.2, I see the same endless loop as foxkill. (This with PHP 5.0.3 on Linux machines running either Debian sarge w/2.6.10 kernel or redhat 9 w/2.4.27 kernel.) The key revision to libcurl seems to be a change to how curl handles file descriptors on 2004/11/19 08:52:33 UTC. Using curl source from CVS before this date I get the endless loop, after this things work. I don't understand ramifications of the patch, though, clearly isn't all or nothing, as sniper saw no problem on 3/15/04, well before the patch or libcurl 7.12.3. Previous Comments: [2004-03-17 06:07:57] foxkill at gmx dot de I did try the latest snapshots. But the problem is still existent. Perhaps I should have mentioned that I use a debug version of php-cli and the php curl library as shared module. In a realease build with compiled in curl it seems to work as expected. Did you read my additional comments that I provided with the example script on http://www.secnow.de/websearch/websearch.txt? The problem seems to be related to the fd_set variables that are set in curl_multi_perform. When curl_multi_exec is called these fd_set variables are no longer available. [2004-03-15 10:48:48] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Works fine for me with latest CVS snapshot. [2004-02-25 05:08:08] foxkill at gmx dot de You'll find the script to reproduce the error under: http://www.secnow.de/websearch/websearch.txt The script runs either in an endless loop or if it terminates it prints: Last leak repeated 2 times /opt/local/src/lamp/php5-src/ext/curl/multi.c(62) : Freeing 0x40291A34 (8 bytes), script=websearch.php === Total 4 memory leaks detected === [2003-11-20 09:48:05] foxkill at gmx dot de Description: I try to use curl_multi_fdset() together with curl_multi_exec() in php5. But this doesn't work. I modelled my php code after the sample (multi-app.c) which is provided by the curl-src package. Reproduce code: --- this is the code I use for php5 (three single curl handles were added): while (CURLM_CALL_MULTI_PERFORM == curl_multi_exec($m, $still_running)) ; while ($still_running) { $fd = curl_multi_select($m, 1); switch($fd) { case -1: break; case 0: default: while (CURLM_CALL_MULTI_PERFORM == curl_multi_exec($m, $still_running)) ; } } Expected result: The code should behave like the multi-app.c sample. See [curl-src]/docs/examples/multi-app.c. Actual result: -- The code runs in an endless loop. Because curl_multi_exec() (alias curl_multi_perform()) needs to reference the variables readfds, writefds which were set by a previous call to curl_multi_fdset(). But these fdsets have gone out of scope. The C Code works because the fdsets are still present on the stack. See man 3 curl_multi_fdset for further details. curl --version gives: curl 7.10.8 (i686-pc-linux-gnu) libcurl/7.10.8 OpenSSL/0.9.7c zlib/1.1.4 Protocols: ftp gopher ldap http file https ftps Features: SSL libz NTLM -- Edit this bug report at http://bugs.php.net/?id=26332edit=1
#28114 [Asn-WFx]: Reflection API doesn't return parameter data for built-in methods
ID: 28114 Updated by: [EMAIL PROTECTED] Reported By: adam at trachtenberg dot com -Status: Assigned +Status: Wont fix Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS-2005-01-10 Assigned To: helly New Comment: It is impossible to get the values of the default parameters. Getting the types for the parameters depends on the developers of the classes. The classes i did should all have that information. For the rest i set the report to won't fix because i don't suppose you can convince the developers to add that information. Or you do it yourself :-) Previous Comments: [2005-01-10 18:08:28] adam at trachtenberg dot com Yes. For example: php -r 'ReflectionClass::export(ReflectionClass);' None of the methods have parameters, and I know some of them (__construct, export, etc.) definitely do. [2005-01-10 15:23:00] [EMAIL PROTECTED] Still an issue? [2004-04-23 05:49:55] adam at trachtenberg dot com Your example is shorter, but I wanted to make it clear that things worked okay for user defined classes. BTW, I didn't know this was a known issue. [2004-04-23 01:50:29] [EMAIL PROTECTED] This is a known issue for several internal classes. Btw, why don't you use: php -r 'ReflectionClass::export($argv[1]);' ? [2004-04-23 01:42:41] adam at trachtenberg dot com Description: The Reflection API doesn't return parameter information for built-in classes, like it does for user-defined classes. Reproduce code: --- // userland class class ReflectionTest { function test($foo, $bar) {} } Reflection::export( new ReflectionClass('ReflectionTest')); // example of a system class Reflection::export(new ReflectionClass('Exception')); Expected result: The methods section of Exception should look like similar to the methods section of ReflectionTest In other words, there should be a Parameters block for methods, like __construct(), that take parameters. This doesn't just apply to Exception, but all classes written in C. Actual result: -- ReflectionTest: - Methods [1] { Method [ user public method test ] { @@ /www/reflection.php 9 - 9 - Parameters [2] { Parameter #0 [ $foo ] Parameter #1 [ $bar ] } } Exception: - Methods [9] { Method [ internal final private method __clone ] { } Method [ internal ctor method __construct ] { } Method [ internal final public method getMessage ] { } Method [ internal final public method getCode ] { } Method [ internal final public method getFile ] { } Method [ internal final public method getLine ] { } Method [ internal final public method getTrace ] { } Method [ internal final public method getTraceAsString ] { } Method [ internal public method __toString ] { } -- Edit this bug report at http://bugs.php.net/?id=28114edit=1
#31193 [Fbk-Opn]: iconv.c:254 undefined reference to 'libiconv'
ID: 31193 User updated by: david at cubbieco dot com Reported By: david at cubbieco dot com -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: linux gcc-3.2 PHP Version: 5.0.3 New Comment: sorry... here is the pertanent info ./configure make ... gcc -Iext/dom/ -I/home/david/php-5.0.3/ext/dom/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c /home/david/php-5.0.3/ext/dom/userdatahandler.c -o ext/dom/userdatahandler.o echo ext/dom/userdatahandler.lo gcc -I/usr/include -Iext/iconv/ -I/home/david/php-5.0.3/ext/iconv/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c /home/david/php-5.0.3/ext/iconv/iconv.c -o ext/iconv/iconv.o echo ext/iconv/iconv.lo cc1: warning: changing search order for system directory /usr/include cc1: warning: as it has already been specified as a non-system directory /home/david/php-5.0.3/ext/iconv/iconv.c: In function `_php_iconv_appendl': /home/david/php-5.0.3/ext/iconv/iconv.c:254: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c: In function `_php_iconv_strlen': /home/david/php-5.0.3/ext/iconv/iconv.c:528: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c: In function `_php_iconv_substr': /home/david/php-5.0.3/ext/iconv/iconv.c:628: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c: In function `_php_iconv_strpos': /home/david/php-5.0.3/ext/iconv/iconv.c:759: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c: In function `_php_iconv_mime_encode': /home/david/php-5.0.3/ext/iconv/iconv.c:1012: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c:1112: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c: In function `php_iconv_stream_filter_append_bucket': /home/david/php-5.0.3/ext/iconv/iconv.c:2365: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c:2444: warning: passing arg 2 of `libiconv' from incompatible pointer type gcc -DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -I/home/david/php-5.0.3/ext/pcre/pcrelib -Iext/pcre/ -I/home/david/php-5.0.3/ext/pcre/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c /home/david/php-5.0.3/ext/pcre/pcrelib/maketables.c -o ext/pcre/pcrelib/maketables.o echo ext/pcre/pcrelib/maketables.lo gcc -DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -I/home/david/php-5.0.3/ext/pcre/pcrelib -Iext/pcre/ -I/home/david/php-5.0.3/ext/pcre/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c /home/david/php-5.0.3/ext/pcre/pcrelib/get.c -o ext/pcre/pcrelib/get.o echo ext/pcre/pcrelib/get.lo ... gcc -Isapi/cgi/ -I/home/david/php-5.0.3/sapi/cgi/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c /home/david/php-5.0.3/sapi/cgi/getopt.c -o sapi/cgi/getopt.o echo sapi/cgi/getopt.lo gcc -Imain/ -I/home/david/php-5.0.3/main/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c main/internal_functions.c -o main/internal_functions.o echo main/internal_functions.lo /bin/sh /home/david/php-5.0.3/libtool --silent --preserve-dup-deps --mode=link gcc -export-dynamic -g -O2 ext/libxml/libxml.lo ext/ctype/ctype.lo ext/dom/php_dom.lo ext/dom/attr.lo ext/dom/document.lo ext/dom/domerrorhandler.lo ext/dom/domstringlist.lo ext/dom/domexception.lo ext/dom/namelist.lo ext/dom/processinginstruction.lo ext/dom/cdatasection.lo ext/dom/documentfragment.lo ext/dom/domimplementation.lo ext/dom/element.lo ext/dom/node.lo ext/dom/string_extend.lo ext/dom/characterdata.lo ext/dom/documenttype.lo ext/dom/domimplementationlist.lo ext/dom/entity.lo ext/dom/nodelist.lo ext/dom/text.lo ext/dom/comment.lo ext/dom/domconfiguration.lo ext/dom/domimplementationsource.lo ext/dom/entityreference.lo ext/dom/notation.lo ext/dom/xpath.lo ext/dom/dom_iterators.lo ext/dom/typeinfo.lo ext/dom/domerror.lo ext/dom/domlocator.lo
#30726 [Ctl-Asn]: Negative floats 1 as strings don't work in calculations
ID: 30726 Updated by: [EMAIL PROTECTED] Reported By: degusta at yahoo dot com -Status: Critical +Status: Assigned Bug Type: Math related Operating System: * PHP Version: 4CVS, 5CVS (2005-01-10) -Assigned To: +Assigned To: iliaa New Comment: Assigned to Ilia per his request. Previous Comments: [2005-01-10 17:00:49] [EMAIL PROTECTED] See also bug #30069 This works fine with e.g. PHP 4.2.2 :) [2004-11-09 01:10:54] degusta at yahoo dot com Description: Strings that are between 0 and -1 and don't have a leading zero, e.g. -.2, -.95, etc, do not get cast to floats. This is a variant of bug 30069 which was closed with 4.3.9. That fix did solve the problem for positive floats (.1, .4, etc), but apparently not for negative floats. The bug is still present in CVS as of 11/8/04 (php4-STABLE-200411082130). I haven't checked the 5 branch yet, but my guess is that it's wrong there too since 30069 also existed in the 5 branch. Every past version of PHP has cast this properly (up through and including 4.3.8). Reproduce code: --- echo '-.1' * 2; Expected result: -0.2 Actual result: -- 0 -- Edit this bug report at http://bugs.php.net/?id=30726edit=1
#31474 [Opn-Bgs]: calling of the parent class method leads to recursion and segmentation fault
ID: 31474 Updated by: [EMAIL PROTECTED] Reported By: public at grik dot net -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: linux PHP Version: 5.0.3 New Comment: :: and - are not equivalent operators, please read the manual. This is not a bug. Previous Comments: [2005-01-10 17:23:54] public at grik dot net Description: When I moved my classes hierarchy code from the PHP 4 to the PHP 5 and renamed costructors from the class names to __construct, I faced a segmentation fault. The constructor calls the parent's constructor. Parent's constructor calls another method, overloaded in the child's class. That overloaded method from the child's class calls the constructor that calls the parent's constructor again. But instead of the endless loop I get the segfault. Reproduce code: --- class A{ function a1(){ echo ' class a '; } function a2(){ $this-a1(); } } class B extends A { function a1(){ $this-a2(); } function __construct(){ parent::a2(); } } $a= new B(); Expected result: Really, I would like to see the output of class a string, cause it's not convenient to rewrite all occurences of $this-method() to self::method in the base classes. But I understand there is a new paradigm of final methods now and I will use it. I would like to see the endless loop until script execution time expires: B::a1() calls A::a2() and vice versa Actual result: -- Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=31474edit=1
#31433 [Opn-Fbk]: PHP CGI Core Dumps W/O TERMCAP Assignment
ID: 31433 Updated by: [EMAIL PROTECTED] Reported By: dgrimes at scvl dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: SCO OpenServer 5 PHP Version: 4.3.10 New Comment: Ok, awaiting that feedback then (as this back trace is quite useless) Previous Comments: [2005-01-10 15:55:03] dgrimes at scvl dot com Actually I did use --enable-debug I just wrote my post to you wrong. I recompiled and it produced the same output: (carn700a:root)[/usr/local/bin] gdb /usr/local/bin/php /usr/local/bin/core GNU gdb 5.2.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i686-pc-sco3.2v5.0.6... Core was generated by `php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libsocket.so.2...done. Loaded symbols for /usr/lib/libsocket.so.2 Reading symbols from /usr/lib/libc.so.1...done. Loaded symbols for /usr/lib/libc.so.1 Reading symbols from /usr/lib/libresolv.so.1...done. Loaded symbols for /usr/lib/libresolv.so.1 #0 0x80021bb2 in getcwd () from /usr/lib/libc.so.1 (gdb) bt #0 0x80021bb2 in getcwd () from /usr/lib/libc.so.1 Cannot access memory at address 0x0 (gdb) I think the problem I'm having right now is getting gdb to work properly. We use the SCO UDK for Unixware debugger and I'm not sure how or even if I can do a back trace with that debugger. I'm working that right now. Also, I'm working on upgrading the server to SCO 5.0.7 and I'll install gdb from the SCO freeware CD once I have it up and running; hopefully later today. Sorry for the confusion, Dean [2005-01-07 21:00:55] [EMAIL PROTECTED] The configure option is --enable-debug (ENABLE!) And you need to delete config.cache first before reconfigure. [2005-01-07 20:31:25] dgrimes at scvl dot com I configured with --disable-all --with-debug but I guess that doesn't work like I thought it would. Anyway, I am recompiling and will have it to you shortly. TERMCAP was not defined previously. I found the issue during testing. When I log on with at telnet session I get coredumps but when I use an X session it would work. So compared the environments and found the difference to be the TERMCAP setting. I decided to set the TERMCAP variable to the value used in the X session for the telnet session and PHP then worked. Dean [2005-01-07 18:51:49] [EMAIL PROTECTED] You need to configure with --enable-debug to get meaningful backtrace. Exactly WHAT was TERMCAP set to when this crash happens..? [2005-01-07 15:19:11] dgrimes at scvl dot com (carn700a:root)[/usr/local/bin] gdb /usr/local/bin/php /usr/local/bin/core GNU gdb 5.2.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i686-pc-sco3.2v5.0.6... Core was generated by `php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libsocket.so.2...done. Loaded symbols for /usr/lib/libsocket.so.2 Reading symbols from /usr/lib/libc.so.1...done. Loaded symbols for /usr/lib/libc.so.1 Reading symbols from /usr/lib/libresolv.so.1...done. Loaded symbols for /usr/lib/libresolv.so.1 #0 0x80021bb2 in getcwd () from /usr/lib/libc.so.1 (gdb) bt #0 0x80021bb2 in getcwd () from /usr/lib/libc.so.1 Cannot access memory at address 0x0 (gdb) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31433 -- Edit this bug report at http://bugs.php.net/?id=31433edit=1
#31449 [NoF-Asn]: Comparison of class with recursive references causes fatal
ID: 31449 Updated by: [EMAIL PROTECTED] Reported By: marcus at lastcraft dot com -Status: No Feedback +Status: Assigned Bug Type: Class/Object related Operating System: Linux PHP Version: 5.0.1 -Assigned To: +Assigned To: andi New Comment: This one is for the Zend mastahs... but I'm not sure if this is very easy to fix. Previous Comments: [2005-01-10 15:30:11] nospam at nospam dot com C:\downloads\php5.0-win32-latestphp -v PHP 5.0.4-dev (cli) (built: Jan 10 2005 10:20:12) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies C:\downloads\php5.0-win32-latestphp recursive.php Fatal error: Nesting level too deep - recursive dependency? in C:\downloads\php5 .0-win32-latest\recursive.php on line 10 C:\downloads\php5.0-win32-latest [2005-01-10 08:14:17] [EMAIL PROTECTED] If you don't want to test the latest version, we can't help. [2005-01-10 04:25:49] marcus at lastcraft dot com Hi... Well thanks for the standard response in an attempt to stall. I had enough trouble getting version 5.01 onto my Mandrake 9 box without going through the whole thing again with an experimental version, and then having to uninstall it. It would take several hours (possibly days) out of my time, but for a developer with a CVS snapshot installed it would take seconds. I could hardly have made the code shorter. So in short, no thanks. Unless perhaps you have information that this part of the code base has been worked on with respect to this issue? yours, Marcus [2005-01-10 02:24:43] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip [2005-01-08 05:31:19] marcus at lastcraft dot com Description: Hi... The script below causes a fatal error. This is just the simplest example I could find of a whole class of these problems. Makes comparing any object problematical. yours, Marcus Reproduce code: --- ?php class Recursive { private $me; function __construct() { $this-me = $this; } } new Recursive() != new Recursive(); ? Expected result: Nothing as the comparison is not output. Actual result: -- Fatal error with nesting too deep. -- Edit this bug report at http://bugs.php.net/?id=31449edit=1
#31474 [Bgs]: calling of the parent class method leads to recursion and segmentation fault
ID: 31474 Updated by: [EMAIL PROTECTED] Reported By: public at grik dot net Status: Bogus Bug Type: Class/Object related Operating System: linux PHP Version: 5.0.3 New Comment: And for the record, you're nesting many levels of function calls, which exhaust the stack. That's why you get a segfault - the only case where it is acceptable in PHP. Previous Comments: [2005-01-10 21:08:21] [EMAIL PROTECTED] :: and - are not equivalent operators, please read the manual. This is not a bug. [2005-01-10 17:23:54] public at grik dot net Description: When I moved my classes hierarchy code from the PHP 4 to the PHP 5 and renamed costructors from the class names to __construct, I faced a segmentation fault. The constructor calls the parent's constructor. Parent's constructor calls another method, overloaded in the child's class. That overloaded method from the child's class calls the constructor that calls the parent's constructor again. But instead of the endless loop I get the segfault. Reproduce code: --- class A{ function a1(){ echo ' class a '; } function a2(){ $this-a1(); } } class B extends A { function a1(){ $this-a2(); } function __construct(){ parent::a2(); } } $a= new B(); Expected result: Really, I would like to see the output of class a string, cause it's not convenient to rewrite all occurences of $this-method() to self::method in the base classes. But I understand there is a new paradigm of final methods now and I will use it. I would like to see the endless loop until script execution time expires: B::a1() calls A::a2() and vice versa Actual result: -- Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=31474edit=1
#31308 [Fbk-Opn]: php_network_getaddresses fails with localhost
ID: 31308 User updated by: the_deppchef at hotmail dot com Reported By: the_deppchef at hotmail dot com -Status: Feedback +Status: Open Bug Type: Sockets related Operating System: Linux 2.4.27 (Debian) PHP Version: 5.0.3 New Comment: works as expected now Previous Comments: [2005-01-10 02:23:01] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2004-12-27 12:18:54] the_deppchef at hotmail dot com Description: fsockopen fails when connecting to localhost (which worked with earlier versions e.g. 5.0.2). connection to 127.0.0.1 still works Reproduce code: --- ?php echo 'brlocalhostbr'; $fp = fsockopen (localhost, , $errno, $errstr, 30); if (!$fp) { echo $errstr ($errno)br /\n; } else { fputs ($fp, GET / HTTP/1.0\r\n\r\n); while (!feof($fp)) { echo fgets($fp,128); } fclose($fp); } echo 'br127.0.0.1br'; $fp = fsockopen (127.0.0.1, , $errno, $errstr, 30); if (!$fp) { echo $errstr ($errno)br /\n; } else { fputs ($fp, GET / HTTP/1.0\r\n\r\n); while (!feof($fp)) { echo fgets($fp,128); } fclose($fp); } ? Expected result: Connection refused in both examples, not php_network_getaddresses: getaddrinfo failed when connecting to localhost Actual result: -- ocalhost Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /www/html/tcl.test.php on line 7 Warning: fsockopen() [function.fsockopen]: unable to connect to localhost: (Unknown error) in /www/html/tcl.test.php on line 7 (1077539444) 127.0.0.1 Warning: fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1: (Connection refused) in /www/html/tcl.test.php on line 18 Connection refused (111) -- Edit this bug report at http://bugs.php.net/?id=31308edit=1
#31474 [Bgs]: calling of the parent class method leads to recursion and segmentation fault
ID: 31474 User updated by: public at grik dot net Reported By: public at grik dot net Status: Bogus Bug Type: Class/Object related Operating System: linux PHP Version: 5.0.3 New Comment: I do not claim the :: and - are thre same. The bug is the segfault. Could you please be more careful? Previous Comments: [2005-01-10 21:12:41] [EMAIL PROTECTED] And for the record, you're nesting many levels of function calls, which exhaust the stack. That's why you get a segfault - the only case where it is acceptable in PHP. [2005-01-10 21:08:21] [EMAIL PROTECTED] :: and - are not equivalent operators, please read the manual. This is not a bug. [2005-01-10 17:23:54] public at grik dot net Description: When I moved my classes hierarchy code from the PHP 4 to the PHP 5 and renamed costructors from the class names to __construct, I faced a segmentation fault. The constructor calls the parent's constructor. Parent's constructor calls another method, overloaded in the child's class. That overloaded method from the child's class calls the constructor that calls the parent's constructor again. But instead of the endless loop I get the segfault. Reproduce code: --- class A{ function a1(){ echo ' class a '; } function a2(){ $this-a1(); } } class B extends A { function a1(){ $this-a2(); } function __construct(){ parent::a2(); } } $a= new B(); Expected result: Really, I would like to see the output of class a string, cause it's not convenient to rewrite all occurences of $this-method() to self::method in the base classes. But I understand there is a new paradigm of final methods now and I will use it. I would like to see the endless loop until script execution time expires: B::a1() calls A::a2() and vice versa Actual result: -- Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=31474edit=1
#31474 [Bgs]: calling of the parent class method leads to recursion and segmentation fault
ID: 31474 User updated by: public at grik dot net Reported By: public at grik dot net Status: Bogus Bug Type: Class/Object related Operating System: linux PHP Version: 5.0.3 New Comment: you're nesting many levels of function calls exactly which exhaust the stack. why don't I get the stack overflow error? or any error at all? That's why you get a segfault - the only case where it is acceptable in PHP. I just think the blank page is not the best way to reflect errors :-) Previous Comments: [2005-01-10 21:23:22] public at grik dot net I do not claim the :: and - are thre same. The bug is the segfault. Could you please be more careful? [2005-01-10 21:12:41] [EMAIL PROTECTED] And for the record, you're nesting many levels of function calls, which exhaust the stack. That's why you get a segfault - the only case where it is acceptable in PHP. [2005-01-10 21:08:21] [EMAIL PROTECTED] :: and - are not equivalent operators, please read the manual. This is not a bug. [2005-01-10 17:23:54] public at grik dot net Description: When I moved my classes hierarchy code from the PHP 4 to the PHP 5 and renamed costructors from the class names to __construct, I faced a segmentation fault. The constructor calls the parent's constructor. Parent's constructor calls another method, overloaded in the child's class. That overloaded method from the child's class calls the constructor that calls the parent's constructor again. But instead of the endless loop I get the segfault. Reproduce code: --- class A{ function a1(){ echo ' class a '; } function a2(){ $this-a1(); } } class B extends A { function a1(){ $this-a2(); } function __construct(){ parent::a2(); } } $a= new B(); Expected result: Really, I would like to see the output of class a string, cause it's not convenient to rewrite all occurences of $this-method() to self::method in the base classes. But I understand there is a new paradigm of final methods now and I will use it. I would like to see the endless loop until script execution time expires: B::a1() calls A::a2() and vice versa Actual result: -- Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=31474edit=1
#31304 [Opn-Fbk]: Exceptions in destructor cause non descript fatal
ID: 31304 Updated by: [EMAIL PROTECTED] Reported By: jhargis at gmail dot com -Status: Open +Status: Feedback -Bug Type: Output Control +Bug Type: Zend Engine 2 problem Operating System: Debian Linux 2.4.27-1-386 PHP Version: 5.0.3 New Comment: Throwing an exception is fatal error by it's nature. The error message clearly says what's wrong. Why do you expect warning or anything else ? Previous Comments: [2004-12-26 17:06:23] jhargis at gmail dot com Description: When the destructor issues an exception, it goes unhandled (obviously), however tossing a fatal does not seem like the appropriate course of action. Fatal error: Exception thrown without a stack frame in Unknown on line 0 Reproduce code: --- ?php class MyClass { function __destruct(){ throw new Exception('fail'); } } $n = new MyClass(); ? Expected result: A warning? Something other than a non descriptive fatal. -- Edit this bug report at http://bugs.php.net/?id=31304edit=1
#31453 [Opn]: array_rand() is not returning random values
ID: 31453 Updated by: [EMAIL PROTECTED] Reported By: cdturri at hotmail dot com Status: Open Bug Type: Arrays related Operating System: Windows 2000 Advanced Server SP4 PHP Version: 5.0.3 New Comment: Present in my Web configuration. http://jed.homedns.org/test.php Apache/2.0.52, PHP/5.0.3 Microsoft Windows XP [Version 5.1.2600] However, *NOT* present in command line. (ZTS?) Previous Comments: [2005-01-10 16:29:27] [EMAIL PROTECTED] I can confirm this problem. Maybe the problem is just when running in ZTS mode, as it uses a different seed generator. However I don't time to trace the problem now. [2005-01-10 16:11:51] cdturri at hotmail dot com OK guys, I just had the chance to test it under Linux and PHP 5 and the bug does NOT occur. Here are the headers to confirm product versions: 3 Server: Apache/2.0.52 (Unix) mod_perl/1.99_17 Perl/v5.8.4 mod_ssl/2.0.52 Open SSL/0.9.7d PHP/5.0.3 DAV/2 Could anyone from the Dev team be so kindly to test it under Windows? Thanks, Christian [2005-01-10 14:41:14] [EMAIL PROTECTED] I'm using Linux.. :) [2005-01-10 11:21:46] cdturri at hotmail dot com Hi Sniper, I just tested it on a different Windows PC with a brand new install of PHP using your CVS link. The bug stills occurs. HTTP headers to verify versions: 3 Server: Apache/2.0.52 (Win32) PHP/5.0.4-dev 4 X-Powered-By: PHP/5.0.4-dev I compared my PHP.ihi with the php.ini-recommended that came with the CVS build. Several differences were found, however using php.ini-recommended as my PHP.ini with no changes still produced the bug. Are you using my test.php with the cache.ini I am using in my sample? I have the impression that is related to the multidimension array function. Regards, Christian [2005-01-10 02:20:25] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip I can NOT reproduce this. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31453 -- Edit this bug report at http://bugs.php.net/?id=31453edit=1
#31314 [Opn-Bgs]: wrong translation
ID: 31314 Updated by: [EMAIL PROTECTED] Reported By: yury at gorodok dot net -Status: Open +Status: Bogus Bug Type: ICONV related Operating System: Windows PHP Version: 5.0.2 New Comment: iconv() stops on illegal character. That's not PHP problem, it's usual behaviour of libiconv. Previous Comments: [2004-12-29 14:46:55] yury at gorodok dot net Here is the full script: (the files on which I've experienced the bug, I've pointed earlier) ?php //UTF-WIN if ( count($argv) 2) { echo \n2 arguments needed!\n; exit; } $fns=$argv[1]; $fnts=$argv[2]; $f=fopen($fns, rb); $ff=fopen($fnts, wb); $flen=filesize($fns); $fstr=fread($f, $flen); echo $flen.\n; $ffstr=iconv(UTF-8,windows-1251,$fstr); echo strlen($ffstr).\n; echo fwrite($ff,$ffstr/*,strlen($ffstr)*/).\n; fclose($ff); fclose($f); ? [2004-12-28 22:07:59] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. [2004-12-28 16:17:20] yury at gorodok dot net Just not using third parameter in fwrite() _doesn't_help_ a bit! All lines with mbstring were (and are) commented out; I cann't see it in my phpinfo()-- so, I cann't say what value mbstring.func_overload has. Here is the code, that doesn't work now: $f=fopen($fns, rb); $ff=fopen($fnts, wb); $flen=filesize($fns); $fstr=fread($f, $flen); echo $flen.\n; $ffstr=iconv(UTF-8,windows-1251,$fstr); echo strlen($ffstr).\n; echo fwrite($ff,$ffstr/*,strlen($ffstr)*/).\n; fclose($ff); fclose($f); Also, for some other files (that translated good), there was no problem with length. [2004-12-27 19:40:02] [EMAIL PROTECTED] You have mbstring.func_overload turned On, thus strlen() returns number of characters, not bytes. Turn it off or just don't use third parameter of fwrite(). [2004-12-27 18:24:32] yury at gorodok dot net Description: The code must translate UTF-8 to windows-1251, but it truncates output! May be old compiled in version of libiconv? examples follow: UTF-8: http://yury.gorodok.net/temp/test_.html result: http://yury.gorodok.net/temp/test_1.html (the content is not essential, I suppose) Reproduce code: --- $fstr=fread($f, $flen); $ffstr=iconv( windows-1251, UTF-8,$fstr); echo fwrite($ff,$ffstr, strlen($ffstr)).\n; -- Edit this bug report at http://bugs.php.net/?id=31314edit=1
#31311 [Opn-Asn]: getting all rectangles instead of text in some true type fonts
ID: 31311 Updated by: [EMAIL PROTECTED] Reported By: informatica at diputacionavila dot es -Status: Open +Status: Assigned Bug Type: GD related Operating System: Fedora core 2 PHP Version: 5.0.3 -Assigned To: +Assigned To: pajoye Previous Comments: [2004-12-27 13:42:12] informatica at diputacionavila dot es Description: After updating from php-5.0.2 to php-5.0.3 some true type fonts show rectangles instead of text My configure command is: './configure' '--with-apxs=/apache/bin/apxs' '--with-gd' '--with-zlib-dir=/usr/local' '--with-png-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-freetype-dir=/usr/local' '--enable-track-vars' '--enable-calendar' '--enable-exif' '--with-imagick' '--with-unixODBC' '--with-mysql=/usr/local/mysql' Reproduce code: --- ?php Header(Content-type: image/png); $gif = ImageCreate(200,200); $bg = ImageColorAllocate($gif,22,222,2); $ellipse = ImageColorAllocate($gif,2,200,200); $tx = ImageColorAllocate($gif,255,255,128); ImageFilledRectangle($gif,0,0,200,200,$bg); //ImageString($gif,113,70,90,it works !,$tx); $black = imagecolorallocate($gif, 0,0,0); ImageTtfText ($gif, 20, 0, 0, 90, $black, /font/weather.ttf,123ABCabc...); ImagePNG($gif); ? Expected result: Expected result is what you can see at my server with php-5.0.2 http://www.diputacionavila.es/xgarbage/gif3.php Actual result: -- Actual result is what you can see at my server with php-5.0.3 http://rh.homelinux.net/xgarbage/gif3.php -- Edit this bug report at http://bugs.php.net/?id=31311edit=1
#31377 [Opn-Fbk]: is_dir function
ID: 31377 Updated by: [EMAIL PROTECTED] Reported By: intro at intro dot one dot pl -Status: Open +Status: Feedback Bug Type: Directory function related Operating System: linux PHP Version: 5CVS-2005-01-02 New Comment: Try is_dir($directorytoread.'/'.$file) first. Previous Comments: [2005-01-02 19:00:41] intro at intro dot one dot pl H i've done something else. Function filetype. And after use filetype on some folder i have many warnings that Lstat failed for file. And the same way i think works is_dir. Only a few files and folders are with no this warning and is showing as dir or file etc. The same is on other functions as is_file etc. My last code in tests: ?php $directorytoread = /home $files=scandir($directorytoread); $listdirindir = array(); // var_dump($files); // all files are listing which is in folder /home foreach ($files as $file) { if ( filetype($file) == dir ) echo File \$file\ is dir and ; if (is_dir($file)) { array_push($listdirindir,$file); echo dir \$file\ addedbr/; } } print_r($listdirindir); ? ...and my examples result is: many of warnings + File . is dir and dir . added File .. is dir and dir .. added + many of warnings + File c is dir and dir c added + many of warnings + Array ( [0] = . [1] = .. [2] = c ) [2005-01-02 12:14:33] intro at intro dot one dot pl by var_dump($files); after scandir everything are listing good. Permissions etc. is ok and files and folders are readable. I checked some others dirs and sometimes files is showing as dir (for example .directory and others hidden files). Please try using this CVS snapshot: still doesn't work correctly. [2005-01-02 07:45:53] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Also, add 'var_dump($files);' after the scandir() line and check the output. (permissions..?) [2005-01-02 00:18:27] intro at intro dot one dot pl Description: For example i have 4 folders in /home directory on unix platform (a,b,c,d) and php5. The script: I have strange thing that function is_dir not always shows every dirs as it is dir. In my example script is_dir returned only c as dir and the rest (a,b,d) as file. Reproduce code: --- ?php $files=scandir(/home); foreach ($files as $file) { if (is_dir($file)) { echo dir: $file; } } ? Expected result: dir: a dir: b dir: c dir: d Actual result: -- dir: c -- Edit this bug report at http://bugs.php.net/?id=31377edit=1
#31421 [Opn-Fbk]: get_current_user call crashes with Access Violation at 01CE1DAD
ID: 31421 Updated by: [EMAIL PROTECTED] Reported By: steve dot gilbreth at autodesk dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Win 2000 SP4 PHP Version: 4.3.9 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: [2005-01-05 23:50:03] steve dot gilbreth at autodesk dot com Description: Call to get_current_user crashes when page is refreshed. I have to restart IIS 5.0 and the call will work 1st time only. If I refresh the page then ...ka-boom! Reproduce code: --- ?php echo html head titletest/title /head body; echo DEBUG: before call to get_current_user ...; $cu = get_current_user(); echo brDEBUG: after call. $cu; echo /body /html; ? Expected result: DEBUG: before call to get_current_user ... DEBUG: after call. userXX Actual result: -- PHP has encountered an Access Violation at 02271DAD DEBUG: before call to get_current_user ... -- Edit this bug report at http://bugs.php.net/?id=31421edit=1
#31453 [Opn-Ver]: array_rand() is not returning random values
ID: 31453 Updated by: [EMAIL PROTECTED] Reported By: cdturri at hotmail dot com -Status: Open +Status: Verified Bug Type: Arrays related Operating System: Windows 2000 Advanced Server SP4 PHP Version: 5.0.3 Previous Comments: [2005-01-10 22:04:06] [EMAIL PROTECTED] Present in my Web configuration. http://jed.homedns.org/test.php Apache/2.0.52, PHP/5.0.3 Microsoft Windows XP [Version 5.1.2600] However, *NOT* present in command line. (ZTS?) [2005-01-10 16:29:27] [EMAIL PROTECTED] I can confirm this problem. Maybe the problem is just when running in ZTS mode, as it uses a different seed generator. However I don't time to trace the problem now. [2005-01-10 16:11:51] cdturri at hotmail dot com OK guys, I just had the chance to test it under Linux and PHP 5 and the bug does NOT occur. Here are the headers to confirm product versions: 3 Server: Apache/2.0.52 (Unix) mod_perl/1.99_17 Perl/v5.8.4 mod_ssl/2.0.52 Open SSL/0.9.7d PHP/5.0.3 DAV/2 Could anyone from the Dev team be so kindly to test it under Windows? Thanks, Christian [2005-01-10 14:41:14] [EMAIL PROTECTED] I'm using Linux.. :) [2005-01-10 11:21:46] cdturri at hotmail dot com Hi Sniper, I just tested it on a different Windows PC with a brand new install of PHP using your CVS link. The bug stills occurs. HTTP headers to verify versions: 3 Server: Apache/2.0.52 (Win32) PHP/5.0.4-dev 4 X-Powered-By: PHP/5.0.4-dev I compared my PHP.ihi with the php.ini-recommended that came with the CVS build. Several differences were found, however using php.ini-recommended as my PHP.ini with no changes still produced the bug. Are you using my test.php with the cache.ini I am using in my sample? I have the impression that is related to the multidimension array function. Regards, Christian The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31453 -- Edit this bug report at http://bugs.php.net/?id=31453edit=1
#31377 [Fbk-Opn]: is_dir function
ID: 31377 User updated by: intro at intro dot one dot pl Reported By: intro at intro dot one dot pl -Status: Feedback +Status: Open Bug Type: Directory function related Operating System: linux PHP Version: 5CVS-2005-01-02 New Comment: Try is_dir($directorytoread.'/'.$file) first. ... yes it is true, i could try it earlier :-). This works correctly, but with one thing: does is_dir function schould display a symbolic links (but only to some directory) as dir ?? Doesn't do it is_link function (where it shows symbolic links to directory too) ?? when function filetype works in any way correctly. Regards Previous Comments: [2005-01-10 21:34:49] [EMAIL PROTECTED] Try is_dir($directorytoread.'/'.$file) first. [2005-01-02 19:00:41] intro at intro dot one dot pl H i've done something else. Function filetype. And after use filetype on some folder i have many warnings that Lstat failed for file. And the same way i think works is_dir. Only a few files and folders are with no this warning and is showing as dir or file etc. The same is on other functions as is_file etc. My last code in tests: ?php $directorytoread = /home $files=scandir($directorytoread); $listdirindir = array(); // var_dump($files); // all files are listing which is in folder /home foreach ($files as $file) { if ( filetype($file) == dir ) echo File \$file\ is dir and ; if (is_dir($file)) { array_push($listdirindir,$file); echo dir \$file\ addedbr/; } } print_r($listdirindir); ? ...and my examples result is: many of warnings + File . is dir and dir . added File .. is dir and dir .. added + many of warnings + File c is dir and dir c added + many of warnings + Array ( [0] = . [1] = .. [2] = c ) [2005-01-02 12:14:33] intro at intro dot one dot pl by var_dump($files); after scandir everything are listing good. Permissions etc. is ok and files and folders are readable. I checked some others dirs and sometimes files is showing as dir (for example .directory and others hidden files). Please try using this CVS snapshot: still doesn't work correctly. [2005-01-02 07:45:53] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Also, add 'var_dump($files);' after the scandir() line and check the output. (permissions..?) [2005-01-02 00:18:27] intro at intro dot one dot pl Description: For example i have 4 folders in /home directory on unix platform (a,b,c,d) and php5. The script: I have strange thing that function is_dir not always shows every dirs as it is dir. In my example script is_dir returned only c as dir and the rest (a,b,d) as file. Reproduce code: --- ?php $files=scandir(/home); foreach ($files as $file) { if (is_dir($file)) { echo dir: $file; } } ? Expected result: dir: a dir: b dir: c dir: d Actual result: -- dir: c -- Edit this bug report at http://bugs.php.net/?id=31377edit=1
#31453 [Ver]: array_rand() is not returning random values
ID: 31453 Updated by: [EMAIL PROTECTED] Reported By: cdturri at hotmail dot com Status: Verified Bug Type: Arrays related -Operating System: Windows 2000 Advanced Server SP4 +Operating System: Win32 -PHP Version: 5.0.3 +PHP Version: 5CVS (2005-01-12) New Comment: Also, is this a Windows-only problem with ZTS? Because apparently, it works under Apache 2 on Linux without a problem. Can someone reproduce this bug on anything but Win32? Is this limited to Apache2, or is it present in IIS as well? Previous Comments: [2005-01-10 22:04:06] [EMAIL PROTECTED] Present in my Web configuration. http://jed.homedns.org/test.php Apache/2.0.52, PHP/5.0.3 Microsoft Windows XP [Version 5.1.2600] However, *NOT* present in command line. (ZTS?) [2005-01-10 16:29:27] [EMAIL PROTECTED] I can confirm this problem. Maybe the problem is just when running in ZTS mode, as it uses a different seed generator. However I don't time to trace the problem now. [2005-01-10 16:11:51] cdturri at hotmail dot com OK guys, I just had the chance to test it under Linux and PHP 5 and the bug does NOT occur. Here are the headers to confirm product versions: 3 Server: Apache/2.0.52 (Unix) mod_perl/1.99_17 Perl/v5.8.4 mod_ssl/2.0.52 Open SSL/0.9.7d PHP/5.0.3 DAV/2 Could anyone from the Dev team be so kindly to test it under Windows? Thanks, Christian [2005-01-10 14:41:14] [EMAIL PROTECTED] I'm using Linux.. :) [2005-01-10 11:21:46] cdturri at hotmail dot com Hi Sniper, I just tested it on a different Windows PC with a brand new install of PHP using your CVS link. The bug stills occurs. HTTP headers to verify versions: 3 Server: Apache/2.0.52 (Win32) PHP/5.0.4-dev 4 X-Powered-By: PHP/5.0.4-dev I compared my PHP.ihi with the php.ini-recommended that came with the CVS build. Several differences were found, however using php.ini-recommended as my PHP.ini with no changes still produced the bug. Are you using my test.php with the cache.ini I am using in my sample? I have the impression that is related to the multidimension array function. Regards, Christian The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31453 -- Edit this bug report at http://bugs.php.net/?id=31453edit=1
#31478 [NEW]: SegFault/Memory Leak
From: the_deppchef at hotmail dot com Operating system: Linux 2.4.27 (Debian) PHP version: 5CVS-2005-01-10 (dev) PHP Bug Type: Reproducible crash Bug description: SegFault/Memory Leak Description: Well, reading the manual about empty() you should think it checks whether the given variable is set before it checks whether it is empty. (Given example there: if (empty($var)) { echo '$var is either 0, empty, or not set at all'; }) However, when $var really is not set, i get a Memory Leak (in a big script). I reduced the script to the code below and now even get a Segmentation fault. Reproduce code: --- ?php if(empty($foo)){ echo 'empty'; }else{ echo 'not empty'; } ? Expected result: Echoing empty and nothing else. Actual result: -- Echoing empty Valgrind says: http://tdc.medieval-wars.de/valgrind.txt.pid27963 Probably most important: ==27963== Process terminating with default action of signal 11 (SIGSEGV) ==27963== Access not within mapped region at address 0xF45 ==27963==at 0x81EDD17: zend_execute_scripts (/home/necmon/php5-200501101930/Zend/zend.c:1059) ==27963==by 0x819E50D: php_execute_script (/home/necmon/php5-200501101930/main/main.c:1636) ==27963==by 0x8277DAE: main (/home/necmon/php5-200501101930/sapi/cli/php_cli.c:944) (Note: this does NOT only happen with the cli version!) -- Edit bug report at http://bugs.php.net/?id=31478edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31478r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31478r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31478r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31478r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31478r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31478r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31478r=needscript Try newer version: http://bugs.php.net/fix.php?id=31478r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31478r=support Expected behavior: http://bugs.php.net/fix.php?id=31478r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31478r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31478r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31478r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31478r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31478r=dst IIS Stability: http://bugs.php.net/fix.php?id=31478r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31478r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31478r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31478r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31478r=mysqlcfg
#31193 [Opn]: iconv.c:254 undefined reference to 'libiconv'
ID: 31193 Updated by: [EMAIL PROTECTED] Reported By: david at cubbieco dot com Status: Open Bug Type: Compile Failure Operating System: linux gcc-3.2 PHP Version: 5.0.3 New Comment: similar to #31263. I can reproduce the first part (pointers warnings) on Solaris 9. The link part has worked on my test box. Previous Comments: [2005-01-10 20:50:08] david at cubbieco dot com sorry... here is the pertanent info ./configure make ... gcc -Iext/dom/ -I/home/david/php-5.0.3/ext/dom/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c /home/david/php-5.0.3/ext/dom/userdatahandler.c -o ext/dom/userdatahandler.o echo ext/dom/userdatahandler.lo gcc -I/usr/include -Iext/iconv/ -I/home/david/php-5.0.3/ext/iconv/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c /home/david/php-5.0.3/ext/iconv/iconv.c -o ext/iconv/iconv.o echo ext/iconv/iconv.lo cc1: warning: changing search order for system directory /usr/include cc1: warning: as it has already been specified as a non-system directory /home/david/php-5.0.3/ext/iconv/iconv.c: In function `_php_iconv_appendl': /home/david/php-5.0.3/ext/iconv/iconv.c:254: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c: In function `_php_iconv_strlen': /home/david/php-5.0.3/ext/iconv/iconv.c:528: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c: In function `_php_iconv_substr': /home/david/php-5.0.3/ext/iconv/iconv.c:628: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c: In function `_php_iconv_strpos': /home/david/php-5.0.3/ext/iconv/iconv.c:759: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c: In function `_php_iconv_mime_encode': /home/david/php-5.0.3/ext/iconv/iconv.c:1012: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c:1112: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c: In function `php_iconv_stream_filter_append_bucket': /home/david/php-5.0.3/ext/iconv/iconv.c:2365: warning: passing arg 2 of `libiconv' from incompatible pointer type /home/david/php-5.0.3/ext/iconv/iconv.c:2444: warning: passing arg 2 of `libiconv' from incompatible pointer type gcc -DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -I/home/david/php-5.0.3/ext/pcre/pcrelib -Iext/pcre/ -I/home/david/php-5.0.3/ext/pcre/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c /home/david/php-5.0.3/ext/pcre/pcrelib/maketables.c -o ext/pcre/pcrelib/maketables.o echo ext/pcre/pcrelib/maketables.lo gcc -DSUPPORT_UTF8 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -I/home/david/php-5.0.3/ext/pcre/pcrelib -Iext/pcre/ -I/home/david/php-5.0.3/ext/pcre/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c /home/david/php-5.0.3/ext/pcre/pcrelib/get.c -o ext/pcre/pcrelib/get.o echo ext/pcre/pcrelib/get.lo ... gcc -Isapi/cgi/ -I/home/david/php-5.0.3/sapi/cgi/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c /home/david/php-5.0.3/sapi/cgi/getopt.c -o sapi/cgi/getopt.o echo sapi/cgi/getopt.lo gcc -Imain/ -I/home/david/php-5.0.3/main/ -DPHP_ATOM_INC -I/home/david/php-5.0.3/include -I/home/david/php-5.0.3/main -I/home/david/php-5.0.3 -I/home/david/php-5.0.3/Zend -I/usr/include/libxml2 -I/home/david/php-5.0.3/TSRM -g -O2 -c main/internal_functions.c -o main/internal_functions.o echo main/internal_functions.lo /bin/sh /home/david/php-5.0.3/libtool --silent --preserve-dup-deps --mode=link gcc -export-dynamic -g -O2 ext/libxml/libxml.lo ext/ctype/ctype.lo ext/dom/php_dom.lo ext/dom/attr.lo ext/dom/document.lo ext/dom/domerrorhandler.lo ext/dom/domstringlist.lo ext/dom/domexception.lo ext/dom/namelist.lo ext/dom/processinginstruction.lo ext/dom/cdatasection.lo ext/dom/documentfragment.lo ext/dom/domimplementation.lo ext/dom/element.lo ext/dom/node.lo ext/dom/string_extend.lo ext/dom/characterdata.lo ext/dom/documenttype.lo ext/dom/domimplementationlist.lo ext/dom/entity.lo ext/dom/nodelist.lo ext/dom/text.lo
#31453 [Ver-Fbk]: array_rand() is not returning random values
ID: 31453 Updated by: [EMAIL PROTECTED] Reported By: cdturri at hotmail dot com -Status: Verified +Status: Feedback Bug Type: Arrays related Operating System: Win32 PHP Version: 5CVS (2005-01-10) New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: [2005-01-10 22:28:57] cdturri at hotmail dot com Hi, Tested under IIS 5.0 and the bug is indeed present. Headers: 1 HTTP/1.1 200 OK 2 Server: Microsoft-IIS/5.0 3 Date: Mon, 10 Jan 2005 21:36:20 GMT 4 X-Powered-By: ASP.NET 5 Content-type: text/html 6 X-Powered-By: PHP/5.0.3 Thanks, Christian [2005-01-10 22:20:05] [EMAIL PROTECTED] Also, is this a Windows-only problem with ZTS? Because apparently, it works under Apache 2 on Linux without a problem. Can someone reproduce this bug on anything but Win32? Is this limited to Apache2, or is it present in IIS as well? [2005-01-10 22:04:06] [EMAIL PROTECTED] Present in my Web configuration. http://jed.homedns.org/test.php Apache/2.0.52, PHP/5.0.3 Microsoft Windows XP [Version 5.1.2600] However, *NOT* present in command line. (ZTS?) [2005-01-10 16:29:27] [EMAIL PROTECTED] I can confirm this problem. Maybe the problem is just when running in ZTS mode, as it uses a different seed generator. However I don't time to trace the problem now. [2005-01-09 15:04:01] cdturri at hotmail dot com Description: Hi guys, array_rand() is not returning random values in my scripts. I am using a multidimension array that is being loaded from an INI file with @parse_ini_file(). Tested under Apache v2.0.52/PHP v5.0.3 on Windows 2000 Advanced Server and a CVS build (php5-win32-200501071130.zip) under Windows as well. Bug appears on both. I don't have a Unix system to test it under PHP 5 (shame on me!) but the problem does NOT occur under Unix/Apache v 1.3.33/PHP v4.3.9. Calling srand() to seed the random number generator seems to fix the problem but the PHP manual clearly says that: Note: As of PHP 4.2.0, there is no need to seed the random number generator with srand() or mt_srand() as this is now done automatically. (http://ie2.php.net/manual/en/function.array-rand.php) mt_rand(), rand() and mt_srand() also contain notes saying that seeding is not required before calling them. Found several related bugs, but this one mentions the same issue: http://bugs.php.net/bug.php?id=26290 [17 Nov 2003 2:12pm CET] [EMAIL PROTECTED] You forgot to call srand() to generate random key. Hence the lack of random data. [17 Nov 2003 2:25pm CET] [EMAIL PROTECTED] Incorrect documentaion I'm afraid. So, it is one or the other. Either the documentation is wrong or the function is not properly calling seeding the random number generator. Could anyone please have a look? Thanks for looking at this bug. Regards, Christian Reproduce code: --- I am using this code to verify the bug: ?php $multiarray = @parse_ini_file('cache.ini',true); for($i=0;$i100;$i++){ $rand_key = array_rand($multiarray); print $rand_key . 'br'; if ($i == 1) { $first_item = $rand_key; } if ($first_item == $rand_key) { echo 'br'; } } ? You can see the bug at: http://www.turribeach.com.ar/downloads/test.php You can download the INI file I am using and the test.php from: http://www.turribeach.com.ar/downloads/PHP_Test.zip Expected result: A random key from the INI file. Actual result: -- A key but that it is not random, it is a subset of the original key array. -- Edit this bug report at http://bugs.php.net/?id=31453edit=1
#28006 [Opn]: referencing an unset global produces a segfault
ID: 28006 Updated by: [EMAIL PROTECTED] Reported By: per at computer dot org Status: Open Bug Type: Reproducible crash Operating System: linux, kernel 2.4.26 -PHP Version: 4.3.10RC2 +PHP Version: 4CVS-2005-01-10 New Comment: A simpler test case would be nice.. Previous Comments: [2005-01-10 09:43:16] per at computer dot org php4-STABLE-200501100730: segfault. Let me know if you need any further diagnostics or info. [2005-01-10 01:52:36] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2004-12-13 09:15:15] per at computer dot org Those 3 files simply reproduce a problem I've seen elsewhere. They are in no way closely related to the actual code. What I could or could not use instead is of no importance - the problem is easily reproduced, isn't that what matters? [2004-12-13 00:27:03] [EMAIL PROTECTED] Can't you provide a SINGLE file with a short script in it? Using virtual() in this kind of place is pretty useless, why don't you use include() ?? [2004-07-12 13:15:32] per at computer dot org I believe I am now able to reproduce the problem - I can't say for certain that it *is* the same, but I suspect so. I first saw this with php 434, then 437, and finally php4-STABLE-200407120830, all with apache 2.0.49 on linux 2.4.26. 3 files to reproduce: k1.phtml.en - http://jessen.ch/php-bug28006/k1.txt k2.phtml.en - http://jessen.ch/php-bug28006/k2.txt k3.phtml.en - http://jessen.ch/php-bug28006/k3.txt Load http://server/k1 The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/28006 -- Edit this bug report at http://bugs.php.net/?id=28006edit=1
#28006 [Opn-Fbk]: referencing an unset global produces a segfault
ID: 28006 Updated by: [EMAIL PROTECTED] Reported By: per at computer dot org -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: linux, kernel 2.4.26 PHP Version: 4CVS-2005-01-10 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. Or Previous Comments: [2005-01-10 22:43:37] [EMAIL PROTECTED] A simpler test case would be nice.. [2005-01-10 09:43:16] per at computer dot org php4-STABLE-200501100730: segfault. Let me know if you need any further diagnostics or info. [2005-01-10 01:52:36] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2004-12-13 09:15:15] per at computer dot org Those 3 files simply reproduce a problem I've seen elsewhere. They are in no way closely related to the actual code. What I could or could not use instead is of no importance - the problem is easily reproduced, isn't that what matters? [2004-12-13 00:27:03] [EMAIL PROTECTED] Can't you provide a SINGLE file with a short script in it? Using virtual() in this kind of place is pretty useless, why don't you use include() ?? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/28006 -- Edit this bug report at http://bugs.php.net/?id=28006edit=1
#31453 [Ver]: array_rand() is not returning random values
ID: 31453 User updated by: cdturri at hotmail dot com Reported By: cdturri at hotmail dot com Status: Verified Bug Type: Arrays related Operating System: Win32 PHP Version: 5CVS (2005-01-10) New Comment: Hi, Tested under IIS 5.0 and the bug is indeed present. Headers: 1 HTTP/1.1 200 OK 2 Server: Microsoft-IIS/5.0 3 Date: Mon, 10 Jan 2005 21:36:20 GMT 4 X-Powered-By: ASP.NET 5 Content-type: text/html 6 X-Powered-By: PHP/5.0.3 Thanks, Christian Previous Comments: [2005-01-10 22:20:05] [EMAIL PROTECTED] Also, is this a Windows-only problem with ZTS? Because apparently, it works under Apache 2 on Linux without a problem. Can someone reproduce this bug on anything but Win32? Is this limited to Apache2, or is it present in IIS as well? [2005-01-10 22:04:06] [EMAIL PROTECTED] Present in my Web configuration. http://jed.homedns.org/test.php Apache/2.0.52, PHP/5.0.3 Microsoft Windows XP [Version 5.1.2600] However, *NOT* present in command line. (ZTS?) [2005-01-10 16:29:27] [EMAIL PROTECTED] I can confirm this problem. Maybe the problem is just when running in ZTS mode, as it uses a different seed generator. However I don't time to trace the problem now. [2005-01-10 16:11:51] cdturri at hotmail dot com OK guys, I just had the chance to test it under Linux and PHP 5 and the bug does NOT occur. Here are the headers to confirm product versions: 3 Server: Apache/2.0.52 (Unix) mod_perl/1.99_17 Perl/v5.8.4 mod_ssl/2.0.52 Open SSL/0.9.7d PHP/5.0.3 DAV/2 Could anyone from the Dev team be so kindly to test it under Windows? Thanks, Christian [2005-01-10 14:41:14] [EMAIL PROTECTED] I'm using Linux.. :) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31453 -- Edit this bug report at http://bugs.php.net/?id=31453edit=1
#31300 [Opn-Ver]: ArrayAccess and __get crash when using string concat in key
ID: 31300 Updated by: [EMAIL PROTECTED] Reported By: gardan at gmx dot com -Status: Open +Status: Verified -Bug Type: Reproducible crash +Bug Type: SPL related -Operating System: Windows XP SP2 +Operating System: * -PHP Version: 5.0.2 +PHP Version: 5CVS-2005-01-10 Previous Comments: [2004-12-26 22:40:38] gardan at gmx dot com Still crashing with cvs snapshot (Windows). [2004-12-26 12:24:08] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip [2004-12-26 07:32:35] Beater at orgalan dot de I can partially confirm this for 5.0.3 running on Windows XP. The behaviour is very unpredictable. Following you'll find some test cases and the behaviour on my system. class arr implements ArrayAccess { public $x = array(ab_cd = hello); function offsetExists($offset) { return isset($this-x[$offset]); } function offsetSet($offset, $value) { $this-x[$offset] = $value; } function offsetGet($offset) { return $this-x[$offset]; } function offsetUnset($offset) { unset($this-x[$offset]); } function __get($offset) { return $this-x[$offset]; } } $test = new arr; case 1: echo($test[ab._cd]);// crashs case 2: echo($test[ab_cd]); // works echo($test[ab._cd]);// works case 3: echo($test[ab_cd]); // works echo($test-{ab_cd}); // works echo($test[ab._cd]);// crashs sounds stupid, but you'll confirm it, i guess [2004-12-26 07:06:45] gardan at gmx dot com Description: When executing the posted code, PHP 5.0.2 and 5.0.3rc-2 crash and kill apache on the first echo. When uncommenting the first echo, it crashes on the second one. Like this echo($test[ab_cd]); echo($test-{ab_cd}); it works. Reproduce code: --- class arr implements ArrayAccess { public $x = array(ab_cd = hello); function offsetExists($offset) { return isset($this-x[$offset]); } function offsetSet($offset, $value) { $this-x[$offset] = $value; } function offsetGet($offset) { return $this-x[$offset]; } function offsetUnset($offset) { unset($this-x[$offset]); } function __get($offset) { return $this-x[$offset]; } } $test = new arr; echo($test[ab_cd]); // works echo($test-{ab_cd}); // works echo($test[ab._cd]);// crash echo($test-{ab._cd}); // crash Expected result: hellohellohellohello Actual result: -- hellohello crash Windows Apache Log: Parent: child process exited with status 3221225477 -- Restarting -- Edit this bug report at http://bugs.php.net/?id=31300edit=1
#31479 [NEW]: chunk_split() segfaults with too high chunklen
From: gz at moonky dot de Operating system: linux PHP version: 4.3.10 PHP Bug Type: Reproducible crash Bug description: chunk_split() segfaults with too high chunklen Description: chunk_split() segfaults when chunklen is too big (possible dos?) Reproduce code: --- ?php chunk_split(., 10); ? Expected result: ehrrm... ;-) Actual result: -- (gdb) bt #0 0xb7d79cef in memcpy () from /lib/tls/libc.so.6 #1 0x080e6c21 in php_chunk_split (src=0x81f4afc , srclen=1, end=0x8180d20 \r\n, endlen=2, chunklen=10, destlen=0xbfffd544) at /home/moonky/src/php-4.3.9/ext/standard/string.c:1521 #2 0x080e6f98 in zif_chunk_split (ht=2, return_value=0x81ef874, this_ptr=0x0, return_value_used=0) at /home/moonky/src/php-4.3.9/ext/standard/string.c:1582 [...] -- Edit bug report at http://bugs.php.net/?id=31479edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31479r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31479r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31479r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31479r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31479r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31479r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31479r=needscript Try newer version: http://bugs.php.net/fix.php?id=31479r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31479r=support Expected behavior: http://bugs.php.net/fix.php?id=31479r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31479r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31479r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31479r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31479r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31479r=dst IIS Stability: http://bugs.php.net/fix.php?id=31479r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31479r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31479r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31479r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31479r=mysqlcfg
#31478 [Opn]: SegFault/Memory Leak with empty()
ID: 31478 User updated by: the_deppchef at hotmail dot com -Summary: SegFault/Memory Leak Reported By: the_deppchef at hotmail dot com Status: Open Bug Type: Reproducible crash Operating System: Linux 2.4.27 (Debian) PHP Version: 5CVS-2005-01-10 (dev) New Comment: forgot to put the name of the function in the summary, sorry :x Previous Comments: [2005-01-10 22:55:24] the_deppchef at hotmail dot com Description: Well, reading the manual about empty() you should think it checks whether the given variable is set before it checks whether it is empty. (Given example there: if (empty($var)) { echo '$var is either 0, empty, or not set at all'; }) However, when $var really is not set, i get a Memory Leak (in a big script). I reduced the script to the code below and now even get a Segmentation fault. Reproduce code: --- ?php if(empty($foo)){ echo 'empty'; }else{ echo 'not empty'; } ? Expected result: Echoing empty and nothing else. Actual result: -- Echoing empty Valgrind says: http://tdc.medieval-wars.de/valgrind.txt.pid27963 Probably most important: ==27963== Process terminating with default action of signal 11 (SIGSEGV) ==27963== Access not within mapped region at address 0xF45 ==27963==at 0x81EDD17: zend_execute_scripts (/home/necmon/php5-200501101930/Zend/zend.c:1059) ==27963==by 0x819E50D: php_execute_script (/home/necmon/php5-200501101930/main/main.c:1636) ==27963==by 0x8277DAE: main (/home/necmon/php5-200501101930/sapi/cli/php_cli.c:944) (Note: this does NOT only happen with the cli version!) -- Edit this bug report at http://bugs.php.net/?id=31478edit=1
#31253 [Opn-Fbk]: child process exited
ID: 31253 Updated by: [EMAIL PROTECTED] Reported By: dcahh at gmx dot de -Status: Open +Status: Feedback Bug Type: DOM XML related Operating System: XP, both Apache 2.0.50 + 2.0.52 PHP Version: 5.0.3 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. Previous Comments: [2004-12-22 18:18:16] dcahh at gmx dot de Description: After updating from PHP 5.0.2 to 5.0.3 I had following strange errors (my code is unchanged and is running as is under PHP 5.0.2.): - I have a class CmsXmlFile which extends DomXmlFile. - DomXmlFile extends DomDocument. When instanciating DomXmlFile I actually only call the function load() and have a new domxpath object instanciated. Within the constructor of CmsXmlFile I call on the very first line parent::__construct. And that's where it crashes. I'm not able to echo Hello; after that anymore. But *I am able* to echo Hello; right after the last line of code in the constructor of DomXmlFile. Apache Log reads (repeated equal entries for every crash): [Wed Dec 22 18:04:34 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Wed Dec 22 18:04:34 2004] [notice] Parent: Created child process 5916 [Wed Dec 22 18:04:34 2004] [notice] Child 5916: Child process is running [Wed Dec 22 18:04:34 2004] [notice] Child 5916: Acquired the start mutex. [Wed Dec 22 18:04:34 2004] [notice] Child 5916: Starting 250 worker threads. Reproduce code: --- class CmsXmlFile extends DomXmlFile { public function __construct($sPath) { $this-sPath = $sPath; if (is_file($sPath)) parent::__construct($sPath); [No echo here anymore] echo 'Hello World 1'; [...] class DomXmlFile extends DomDocument { public function __construct($sPath) { parent::__construct(); $this-sPath = $sPath; $this-load($this-sPath); $this-xPath = new domxpath($this); [Echo here works] echo 'Hello World 1'; } [...] Expected result: Hello World 1 Hello World 2 Actual result: -- Nothing is returned. My browser's page keep's blank. The apache error log is written as stated above. -- Edit this bug report at http://bugs.php.net/?id=31253edit=1
#31480 [NEW]: imap_mail_compose 100% cpu usage
From: gz at moonky dot de Operating system: linux PHP version: 5.0.3 PHP Bug Type: IMAP related Bug description: imap_mail_compose 100% cpu usage Description: imap_mail_compose hangs with 100% cpu usage when started with weird parameters same result with 4.3.10 Reproduce code: --- ?php $a[0] = A; $a[1] = A; $b[0] = moep; imap_mail_compose($b, $a); ? -- Edit bug report at http://bugs.php.net/?id=31480edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31480r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31480r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31480r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31480r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31480r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31480r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31480r=needscript Try newer version: http://bugs.php.net/fix.php?id=31480r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31480r=support Expected behavior: http://bugs.php.net/fix.php?id=31480r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31480r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31480r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31480r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31480r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31480r=dst IIS Stability: http://bugs.php.net/fix.php?id=31480r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31480r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31480r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31480r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31480r=mysqlcfg
#31474 [Bgs]: calling of the parent class method leads to recursion and segmentation fault
ID: 31474 Updated by: [EMAIL PROTECTED] Reported By: public at grik dot net Status: Bogus Bug Type: Class/Object related Operating System: linux PHP Version: 5.0.3 New Comment: Because there is no way to see *when* we're about to overflow the stack, so we leave the handling for that to the operating system. Previous Comments: [2005-01-10 21:25:40] public at grik dot net you're nesting many levels of function calls exactly which exhaust the stack. why don't I get the stack overflow error? or any error at all? That's why you get a segfault - the only case where it is acceptable in PHP. I just think the blank page is not the best way to reflect errors :-) [2005-01-10 21:23:22] public at grik dot net I do not claim the :: and - are thre same. The bug is the segfault. Could you please be more careful? [2005-01-10 21:12:41] [EMAIL PROTECTED] And for the record, you're nesting many levels of function calls, which exhaust the stack. That's why you get a segfault - the only case where it is acceptable in PHP. [2005-01-10 21:08:21] [EMAIL PROTECTED] :: and - are not equivalent operators, please read the manual. This is not a bug. [2005-01-10 17:23:54] public at grik dot net Description: When I moved my classes hierarchy code from the PHP 4 to the PHP 5 and renamed costructors from the class names to __construct, I faced a segmentation fault. The constructor calls the parent's constructor. Parent's constructor calls another method, overloaded in the child's class. That overloaded method from the child's class calls the constructor that calls the parent's constructor again. But instead of the endless loop I get the segfault. Reproduce code: --- class A{ function a1(){ echo ' class a '; } function a2(){ $this-a1(); } } class B extends A { function a1(){ $this-a2(); } function __construct(){ parent::a2(); } } $a= new B(); Expected result: Really, I would like to see the output of class a string, cause it's not convenient to rewrite all occurences of $this-method() to self::method in the base classes. But I understand there is a new paradigm of final methods now and I will use it. I would like to see the endless loop until script execution time expires: B::a1() calls A::a2() and vice versa Actual result: -- Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=31474edit=1
#31109 [Opn-Bgs]: cannot pass result of __get by reference
ID: 31109 Updated by: [EMAIL PROTECTED] Reported By: rampant at gmail dot com -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: WinXP PHP Version: 5.0.1 New Comment: Duplicate of #28444, as was pointed by Dennis. Previous Comments: [2004-12-16 12:46:27] dennis at inmarket dot lviv dot ua This is bug #28444 [2004-12-16 06:27:13] rampant at gmail dot com Description: From outside a class, accessing a variable via a __get is identical to accessing one via a public member: $publ-varr vs. $gets-varr When trying to pass by reference, I would expect the corresponding __set to be called when the value originaly came from a __get. Instead, there is a Fatal error. Reproduce code: --- class PublicVar { public $varr; } class GetSetter { protected $data = array(); function __get($key) { return $this-data[$key]; } function __set($key, $value) { $this-data[$key] = $value; } } function set_by_ref($variable) { $variable = 'has been set, '; } $publ = new PublicVar(); set_by_ref($publ-varr); echo $publ-varr; $gets = new GetSetter(); set_by_ref($gets-varr); echo $gets-varr; Expected result: has been set, has been set, Actual result: -- has been set Fatal error: Cannot access undefined property for object with overloaded property access in C:\eclipse\workspace\tmote\tmp_byref.php on line 27 -- Edit this bug report at http://bugs.php.net/?id=31109edit=1
#31478 [Opn-Ver]: SegFault/Memory Leak with empty()
ID: 31478 Updated by: [EMAIL PROTECTED] Reported By: the_deppchef at hotmail dot com -Status: Open +Status: Verified -Bug Type: Reproducible crash +Bug Type: Zend Engine 2 problem -Operating System: Linux 2.4.27 (Debian) +Operating System: * -PHP Version: 5CVS-2005-01-10 (dev) +PHP Version: 5CVS-2005-01-10 New Comment: Starting program: /usr/src/web/php/php5/sapi/cli/php t.php Program received signal SIGSEGV, Segmentation fault. 0x08143e43 in execute (op_array=0x8221eb4) at zend_vm_execute.h:78 78 if (EX(opline)-handler(execute_data TSRMLS_CC) 0) { (gdb) bt #0 0x08143e43 in execute (op_array=0x8221eb4) at zend_vm_execute.h:78 #1 0x08121053 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/web/php/php5/Zend/zend.c:1058 #2 0x080e1601 in php_execute_script (primary_file=0xbfffd8c0) at /usr/src/web/php/php5/main/main.c:1636 #3 0x08190f51 in main (argc=2, argv=0xbfffd954) at /usr/src/web/php/php5/sapi/cli/php_cli.c:944 #4 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6 Previous Comments: [2005-01-10 22:55:24] the_deppchef at hotmail dot com Description: Well, reading the manual about empty() you should think it checks whether the given variable is set before it checks whether it is empty. (Given example there: if (empty($var)) { echo '$var is either 0, empty, or not set at all'; }) However, when $var really is not set, i get a Memory Leak (in a big script). I reduced the script to the code below and now even get a Segmentation fault. Reproduce code: --- ?php if(empty($foo)){ echo 'empty'; }else{ echo 'not empty'; } ? Expected result: Echoing empty and nothing else. Actual result: -- Echoing empty Valgrind says: http://tdc.medieval-wars.de/valgrind.txt.pid27963 Probably most important: ==27963== Process terminating with default action of signal 11 (SIGSEGV) ==27963== Access not within mapped region at address 0xF45 ==27963==at 0x81EDD17: zend_execute_scripts (/home/necmon/php5-200501101930/Zend/zend.c:1059) ==27963==by 0x819E50D: php_execute_script (/home/necmon/php5-200501101930/main/main.c:1636) ==27963==by 0x8277DAE: main (/home/necmon/php5-200501101930/sapi/cli/php_cli.c:944) (Note: this does NOT only happen with the cli version!) -- Edit this bug report at http://bugs.php.net/?id=31478edit=1
#31185 [Opn-Ver]: Crash when exceptions thrown from ArrayAccess::offsetUnset()
ID: 31185 Updated by: [EMAIL PROTECTED] Reported By: Jason at AMP-design dot net -Status: Open +Status: Verified -Bug Type: Reproducible crash +Bug Type: SPL related -Operating System: Windows 2003 / CentOS 3 +Operating System: * -PHP Version: 5.0.3 +PHP Version: 5CVS-2005-01-10 Previous Comments: [2004-12-19 16:56:06] Jason at AMP-design dot net Description: This crashes both on PHP 5.0.3 on Windows 2003 / Apache 2.0.52 and Centos 3 (Redhat Entperise Linux 3 for cheapskates) with Apache 2.0.48 and PHP 5.0.2 This occurs due to the Exception thrown. Removing the exception will prevent the crash. Reproduce code: --- ?php header('Content-type: text/plain'); class FooBar implements ArrayAccess { private $array = array(); public function offsetExists($index) { return isset($this-array[$index]); } public function offsetGet($index) { return $this-array[$index]; } public function offsetSet($index, $value) { $this-array[$index] = $value; } public function offsetUnset($index) { throw new Exception('Just try and make me crash ya sucker ;-)'); unset($this-array[$index]); } } $i = 0; $foo = new FooBar(); $foo[$i] = $i++; $foo[$i] = $i++; $foo[$i] = $i++; unset($foo[1]); print_R($foo); ? Expected result: $foo would dump out it's array elements which should be 0 and 2 Actual result: -- Apache crash (exists with Parent: child process exited with status 3221225477 -- Restarting on Windows Apache 2 log, dunno about Linux, can't be faffed to mess about in SSH, however I do not get a HTTP reponse, and therefore I assume it segfaults) -- Edit this bug report at http://bugs.php.net/?id=31185edit=1
#31186 [Opn-Fbk]: Inconsistent datatype for offset when using ArrayAccess
ID: 31186 Updated by: [EMAIL PROTECTED] Reported By: Jason at AMP-design dot net -Status: Open +Status: Feedback Bug Type: Zend Engine 2 problem Operating System: Windows 2003 / CentOS 3 PHP Version: 5.0.3 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Please, try CVS snapshot, I can't reproduce it under Linux. Previous Comments: [2004-12-19 17:33:28] Jason at AMP-design dot net Description: On Windows 2003 / PHP 5.0.3 / Apache 2.0.52 I get an invalid data type for the $index parameter for offsetGet (and probably for other offset* methods). As you can see from the result I get, the vardump returns $index as having 'UNKNOWN' as the datatype. It does appear that running this in PHP 5.0.2 / CentOS 3 (RHEL3) / Apache 2.0.48 seems to work OK and give the expected result. I don't know if this is because of a difference caused by the PHP version or the OS it's self. Changing $index == NULL seems to shut PHP up about this werid error, however this is besides the point, as PHP shouldn't be creating variables of an 'UNKNOWN' type, and should be producing consistent results across platforms for this sort of stuff. Reproduce code: --- header('Content-type: text/plain'); class FooBar implements ArrayAccess { private $array = array(); public function offsetExists($index) { return isset($this-array[$index]); } public function offsetGet($index) { /* index is NULL because we are assigning into NULL */ if ($index === NULL) { echo 'Get on NULL'.\r\n; $this-array[] = new self(); return end($this-array); } var_dump($index); return $this-array[$index]; } public function offsetSet($index, $value) { if ($index === NULL) { echo 'Set on NULL'.\r\n; $this-array[] = $value; return; } $this-array[$index] = $value; } public function offsetUnset($index) { unset($this-array[$index]); } } $i = 0; $foo = new FooBar(); $foo[] = $i++; $foo[] = $i++; $foo[] = $i++; /* calls GET on $foo[] before calling set on $foo[]['test'] * as it needs to have some contents in $foo[] for ['test'] to * be set into */ $foo[]['test'] = $i++; print_R($foo); Expected result: Set on NULL Set on NULL Set on NULL Get on NULL FooBar Object ( [array:private] = Array ( [0] = 0 [1] = 1 [2] = 2 [3] = FooBar Object ( [array:private] = Array ( [test] = 3 ) ) ) ) Actual result: -- Set on NULL Set on NULL Set on NULL UNKNOWN:0 br / bWarning/b: Illegal offset type in bD:\Documents\Web Development\spl_test.php/b on line b18/bbr / br / bFatal error/b: Objects used as arrays in post/pre increment/decrement must return values by reference in bD:\Documents\Web Development\spl_test.php/b on line b41/bbr / -- Edit this bug report at http://bugs.php.net/?id=31186edit=1
#31206 [Opn-Fbk]: trigger_error ignores e_user_error
ID: 31206 Updated by: [EMAIL PROTECTED] Reported By: mlovett at morpace dot com -Status: Open +Status: Feedback Bug Type: *General Issues Operating System: Fedora Core 2 PHP Version: 5.0.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip What does this code output for you? ?php trigger_error(my message,E_USER_ERROR); ? Previous Comments: [2004-12-20 17:46:07] mlovett at morpace dot com Description: trigger_error(my message,E_USER_ERROR) reports my message as a PHP Notice, not an error, when used inside an exception handler. Reproduce code: --- ini_set(error_log,/var/www/html/indigo/weblog); ini_set(log_errors,1); ini_set(display_errors,0); function handleException($e) { trigger_error(EXCEPTION THROWN: . $e-getMessage(),E_USER_ERROR); // want exception messages to go to same spot as errors Header(Location: bailout.php); exit; } set_exception_handler(handleException); Expected result: I expected the the error message to be of type E_USER_ERROR, not E_USER_NOTICE. -- Edit this bug report at http://bugs.php.net/?id=31206edit=1
#31308 [Opn-Csd]: php_network_getaddresses fails with localhost
ID: 31308 Updated by: [EMAIL PROTECTED] Reported By: the_deppchef at hotmail dot com -Status: Open +Status: Closed Bug Type: Sockets related Operating System: Linux 2.4.27 (Debian) PHP Version: 5.0.3 New Comment: User reports the bug is fixed, closing then. Previous Comments: [2005-01-10 21:17:32] the_deppchef at hotmail dot com works as expected now [2005-01-10 02:23:01] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2004-12-27 12:18:54] the_deppchef at hotmail dot com Description: fsockopen fails when connecting to localhost (which worked with earlier versions e.g. 5.0.2). connection to 127.0.0.1 still works Reproduce code: --- ?php echo 'brlocalhostbr'; $fp = fsockopen (localhost, , $errno, $errstr, 30); if (!$fp) { echo $errstr ($errno)br /\n; } else { fputs ($fp, GET / HTTP/1.0\r\n\r\n); while (!feof($fp)) { echo fgets($fp,128); } fclose($fp); } echo 'br127.0.0.1br'; $fp = fsockopen (127.0.0.1, , $errno, $errstr, 30); if (!$fp) { echo $errstr ($errno)br /\n; } else { fputs ($fp, GET / HTTP/1.0\r\n\r\n); while (!feof($fp)) { echo fgets($fp,128); } fclose($fp); } ? Expected result: Connection refused in both examples, not php_network_getaddresses: getaddrinfo failed when connecting to localhost Actual result: -- ocalhost Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /www/html/tcl.test.php on line 7 Warning: fsockopen() [function.fsockopen]: unable to connect to localhost: (Unknown error) in /www/html/tcl.test.php on line 7 (1077539444) 127.0.0.1 Warning: fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1: (Connection refused) in /www/html/tcl.test.php on line 18 Connection refused (111) -- Edit this bug report at http://bugs.php.net/?id=31308edit=1
#31453 [Fbk-Opn]: array_rand() is not returning random values
ID: 31453 User updated by: cdturri at hotmail dot com Reported By: cdturri at hotmail dot com -Status: Feedback +Status: Open Bug Type: Arrays related Operating System: Win32 PHP Version: 5CVS (2005-01-10) New Comment: OK, done my homework. Tested under IIS and Apache on Windows with the CVS builds provided by sniper (PHP4). Bug appeared on BOTH cases. Here are the headers: 2 Server: Microsoft-IIS/5.0 3 Date: Mon, 10 Jan 2005 22:45:26 GMT 4 X-Powered-By: ASP.NET 6 X-Powered-By: PHP/4.3.11-dev And: 2 Date: Mon, 10 Jan 2005 22:49:21 GMT 3 Server: Apache/2.0.52 (Win32) PHP/4.3.11-dev 4 X-Powered-By: PHP/4.3.11-dev As my previous comment I saw no needs to test it under PHP4 with the latest CVS builds in Linux since the bug did not appear on PHP 4.3.9 under Linux. So, we have nailed down the issue to this: - Bug appears on a Windows System running either IIS or Apache. - Bug appears on both PHP4 and PHP5 latest CVS builds. Couple of more findings: - The first key that array_rand() returns on the first run after the Web Server is restarted seems to be random. - Decreasing the number of keys on the INI file seems to increase the subset of keys that array_rand() incorrectly returns as random keys. - Inversely, increasing the number of keys on the INI file seems to decrease the subset of keys that array_rand() incorrectly returns as random keys. All yours guys! Previous Comments: [2005-01-10 22:40:50] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2005-01-10 22:28:57] cdturri at hotmail dot com Hi, Tested under IIS 5.0 and the bug is indeed present. Headers: 1 HTTP/1.1 200 OK 2 Server: Microsoft-IIS/5.0 3 Date: Mon, 10 Jan 2005 21:36:20 GMT 4 X-Powered-By: ASP.NET 5 Content-type: text/html 6 X-Powered-By: PHP/5.0.3 Thanks, Christian [2005-01-10 22:20:05] [EMAIL PROTECTED] Also, is this a Windows-only problem with ZTS? Because apparently, it works under Apache 2 on Linux without a problem. Can someone reproduce this bug on anything but Win32? Is this limited to Apache2, or is it present in IIS as well? [2005-01-10 22:04:06] [EMAIL PROTECTED] Present in my Web configuration. http://jed.homedns.org/test.php Apache/2.0.52, PHP/5.0.3 Microsoft Windows XP [Version 5.1.2600] However, *NOT* present in command line. (ZTS?) [2005-01-10 16:29:27] [EMAIL PROTECTED] I can confirm this problem. Maybe the problem is just when running in ZTS mode, as it uses a different seed generator. However I don't time to trace the problem now. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31453 -- Edit this bug report at http://bugs.php.net/?id=31453edit=1
#31481 [NEW]: curl isn't following redirects with a relative path
From: jason at merchant dot to Operating system: Windows XP Pro PHP version: 4.3.10 PHP Bug Type: HTTP related Bug description: curl isn't following redirects with a relative path Description: I am grabbing an https:// page using curl and that page redirects using a relative path like /page1.php. curl is failing to follow this path. I have tried replacing the relative path with an absolute path on the page I'm grabbing and that worked so I know the problem lies in the relative path redirection. -- Edit bug report at http://bugs.php.net/?id=31481edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31481r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31481r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31481r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31481r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31481r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31481r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31481r=needscript Try newer version: http://bugs.php.net/fix.php?id=31481r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31481r=support Expected behavior: http://bugs.php.net/fix.php?id=31481r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31481r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31481r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31481r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31481r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31481r=dst IIS Stability: http://bugs.php.net/fix.php?id=31481r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31481r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31481r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31481r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31481r=mysqlcfg
#31453 [Opn-Ver]: array_rand() is not returning random values
ID: 31453 Updated by: [EMAIL PROTECTED] Reported By: cdturri at hotmail dot com -Status: Open +Status: Verified Bug Type: Arrays related Operating System: Win32 -PHP Version: 5CVS (2005-01-10) +PHP Version: 4CVS, 5CVS (2005-01-10) New Comment: Yep, here too. Previous Comments: [2005-01-10 23:53:49] cdturri at hotmail dot com OK, done my homework. Tested under IIS and Apache on Windows with the CVS builds provided by sniper (PHP4). Bug appeared on BOTH cases. Here are the headers: 2 Server: Microsoft-IIS/5.0 3 Date: Mon, 10 Jan 2005 22:45:26 GMT 4 X-Powered-By: ASP.NET 6 X-Powered-By: PHP/4.3.11-dev And: 2 Date: Mon, 10 Jan 2005 22:49:21 GMT 3 Server: Apache/2.0.52 (Win32) PHP/4.3.11-dev 4 X-Powered-By: PHP/4.3.11-dev As my previous comment I saw no needs to test it under PHP4 with the latest CVS builds in Linux since the bug did not appear on PHP 4.3.9 under Linux. So, we have nailed down the issue to this: - Bug appears on a Windows System running either IIS or Apache. - Bug appears on both PHP4 and PHP5 latest CVS builds. Couple of more findings: - The first key that array_rand() returns on the first run after the Web Server is restarted seems to be random. - Decreasing the number of keys on the INI file seems to increase the subset of keys that array_rand() incorrectly returns as random keys. - Inversely, increasing the number of keys on the INI file seems to decrease the subset of keys that array_rand() incorrectly returns as random keys. All yours guys! [2005-01-10 22:40:50] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2005-01-10 22:28:57] cdturri at hotmail dot com Hi, Tested under IIS 5.0 and the bug is indeed present. Headers: 1 HTTP/1.1 200 OK 2 Server: Microsoft-IIS/5.0 3 Date: Mon, 10 Jan 2005 21:36:20 GMT 4 X-Powered-By: ASP.NET 5 Content-type: text/html 6 X-Powered-By: PHP/5.0.3 Thanks, Christian [2005-01-10 22:20:05] [EMAIL PROTECTED] Also, is this a Windows-only problem with ZTS? Because apparently, it works under Apache 2 on Linux without a problem. Can someone reproduce this bug on anything but Win32? Is this limited to Apache2, or is it present in IIS as well? [2005-01-10 22:04:06] [EMAIL PROTECTED] Present in my Web configuration. http://jed.homedns.org/test.php Apache/2.0.52, PHP/5.0.3 Microsoft Windows XP [Version 5.1.2600] However, *NOT* present in command line. (ZTS?) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31453 -- Edit this bug report at http://bugs.php.net/?id=31453edit=1
#28804 [Com]: [FIX] lex pattern for ini-file sections wrong (affects php.ini/parse_ini_file())
ID: 28804 Comment by: roger at wingetsolutions dot com Reported By: wendland at scan-plus dot de Status: Assigned Bug Type:Scripting Engine problem PHP Version: 4CVS, 5CVS Assigned To: zeev New Comment: This bug does NOT affect PHP 4.3.8 on Fedora Core 3 (linux). Previous Comments: [2004-12-13 01:33:14] [EMAIL PROTECTED] Zeev, please look into this sometime, or at least add a comment if you're not going to do it? [2004-07-06 15:55:43] [EMAIL PROTECTED] Assigned to the author. [2004-06-16 14:20:53] wendland at scan-plus dot de Description: The pattern for section in ini-files (as used in php.ini and each file used with parse_ini_file()) is wrong. It looks like (in Zend/zend_ini_scanner.l:140): INITIAL[[][^[]+[\]][ ]*{NEWLINE}? That means that the following example won't work: [section] var = val var2 = ] var3 = val3 Try to run this through parse_ini_file(). The pattern should look like: INITIAL\[[^\]]+\][ ]*{NEWLINE}? If you'd like to disallow brackets in section name, you could use the following pattern: INITIAL\[[^\]\[]+\][ ]*{NEWLINE}? Kind Regards, Joerg Wendland -- Edit this bug report at http://bugs.php.net/?id=28804edit=1
#31485 [NEW]: php.ini given to --with-config-file-path is not used
From: php at lachoseinteractive dot net Operating system: RedHat 7.2 PHP version: 5.0.3 PHP Bug Type: *Configuration Issues Bug description: php.ini given to --with-config-file-path is not used Description: ./configure --with-mysqli=/usr/bin/mysql_config -- enable-bcmath --enable-sqlite-utf8 --with-apxs2=/usr/ local/apache2/bin/apxs --with-config-file-path=/etc/ php.ini The php.ini is not used. Tried different locations. Similar problem in cli and apache module version. Looks like it is overriden by a previous install ? (php4 is installed as an apache1.3 module in another instance of apache, but removing php4's ini file doesn't resolve the problem). Reproduce code: --- I set magic_quotes_gpc to Off in the php.ini. The change doesn't appear in the phpinfo(); (after apachectl restart of course). Same problem in CLI version : I tried this : php -i | grep magic_quotes_gpc magic_quotes_gpc = On = On But here is the funny part : php -i | grep php.ini Configuration File (php.ini) Path = /etc/php.ini and : php -i -c /etc/php.ini| grep magic_quotes_gpc magic_quotes_gpc = Off = Off Interestingly, ltrace on php CLI gives the following : ltrace -e fopen php fopen(php/php-cli.ini, r) = 0 fopen(/etc/php.ini/php-cli.ini, r)= 0 fopen(php/php.ini, r) = 0 fopen(/etc/php.ini/php.ini, r)= 0 As you can imagine, I tried to compile with --with-config-file-path=/etc but got the same results ! Don't know how to trace fopen in php running as module, but that would be interesting ! -- Edit bug report at http://bugs.php.net/?id=31485edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31485r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31485r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31485r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31485r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31485r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31485r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31485r=needscript Try newer version: http://bugs.php.net/fix.php?id=31485r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31485r=support Expected behavior: http://bugs.php.net/fix.php?id=31485r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31485r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31485r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31485r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31485r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31485r=dst IIS Stability: http://bugs.php.net/fix.php?id=31485r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31485r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31485r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31485r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31485r=mysqlcfg
#31482 [Opn-Bgs]: Crashes when calling method on COM objetct
ID: 31482 Updated by: [EMAIL PROTECTED] Reported By: martin at hmailserver dot com -Status: Open +Status: Bogus -Bug Type: Reproducible crash +Bug Type: COM related Operating System: Windows XP SP2 PHP Version: 4.3.10 New Comment: ..and if you had bothered to search the bug database BEFORE you submitted this report, you'd already know that this has been fixed in CVS. Snapshots can be found at http://snaps.php.net/ Previous Comments: [2005-01-11 00:41:51] martin at hmailserver dot com Description: PHP 4.3.10 crashes every time I try to call an method on an COM object. Several users of my software has reported the same problem. When using PHP 4.3.9 or 5.0.3 it does not crash. To confirm that it was not a bug in my code, I created a small dummy ATL server component in Visual Studio 2003 (containing almost no code) which a exposed dummy method that just created a message box. When I create an instance of it in VBA, PHP4.3.9 and PHP 5.0.3. It crashes in 4.3.10 and the latest available development build. Reproduce code: --- ? $app = new COM(DummyTest.Dummy); $app-Test(); ? You either need to download the DummyTest ATL server from here and compile it yourself (in VS 2003) http://www.hmailserver.com/PHPBug/DummyTest.rar Or download the DLL and register it using regsvr32.exe http://www.hmailserver.com/PHPBug/DummyTest.dll Expected result: The Test() function shows a message with the text OK. Test it in 4.3.9 or 5.0.3 to see expected result. Actual result: -- It crashes every single time I've tried it. On my computer, the following message is shown: An exception 'Unhandled Win32 Exception' has occured in PHP.exe. Couldn't find information on how to turn on backtrace in an win32 environment. -- Edit this bug report at http://bugs.php.net/?id=31482edit=1
#31484 [Opn]: Strage behaviour when looping through a NodeList
ID: 31484 User updated by: clynx at users dot sourceforge dot net Reported By: clynx at users dot sourceforge dot net Status: Open Bug Type: DOM XML related Operating System: FreeBSD 4.11 PHP Version: 5.0.3 New Comment: updated libxml2 to 2.6.16, same error Previous Comments: [2005-01-11 01:30:34] clynx at users dot sourceforge dot net Description: I want to use a complete Namespace to execute self written PHP Classes. My Parser has some Problems with the way PHP handles the Code. It seems like my code handles all dom Functions right, but the Result is not the one I would expect. Reproduce code: --- ?php $dom = new DOMDocument(); $dom-load(http://www.succont.de/php/domxml.xml;); $nodelist=$dom-getElementsByTagNameNS( 'http://test.de/test', '*' ); for($i = 0; $i $nodelist-length; $i++) { $node = $nodelist-item($i); if($node-localName == test) { $node-parentNode-removeChild($node); echo $node-localName . removed \n; } else { echo 'handle: ' . $node-localName . \n; } } echo \nXML File:\n.$dom-saveXML(); ? Expected result: bash-2.05a$ php -q test.php handle: doSomething test removed handle: doSomething XML File: ?xml version=1.0 encoding=utf-8? example xmlns:test=http://test.de/test; test:doSomething/ test:doSomething/ /example Actual result: -- bash-2.05a$ php -q test.php handle: doSomething test removed XML File: ?xml version=1.0 encoding=utf-8? example xmlns:test=http://test.de/test; test:doSomething/ test:doSomething/ /example -- Edit this bug report at http://bugs.php.net/?id=31484edit=1
#31429 [Opn-WFx]: IMAP Version not correct in phpinfo()
ID: 31429 Updated by: [EMAIL PROTECTED] Reported By: slusarz at curecanti dot org -Status: Open +Status: Wont fix Bug Type: IMAP related Operating System: Fedora Core 3 PHP Version: 4.3.10 New Comment: You need to tell the c-client author to put some macro in the header files and/or function which can be used to determine the c-client version in question. At present we just make wild guesses on some know differences between releases. Previous Comments: [2005-01-06 17:10:45] slusarz at curecanti dot org Description: For any version of imap/c-client post-2000, the version information is given as 2000 in phpinfo() (i.e. using imap-2004a still shows the version as 2000 in phpinfo()). -- Edit this bug report at http://bugs.php.net/?id=31429edit=1
#31373 [Fbk-NoF]: Memory Leak with Simplexml leads to segmentation fault
ID: 31373 Updated by: php-bugs@lists.php.net Reported By: drews at dynamicwebpages dot de -Status: Feedback +Status: No Feedback Bug Type: SimpleXML related Operating System: Linux PHP Version: 5.0.3 New Comment: No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. Previous Comments: [2005-01-03 23:05:24] [EMAIL PROTECTED] Please provide the XML file. [2005-01-01 17:52:56] drews at dynamicwebpages dot de this might help further: compiled without --enable-debug it throws the segfault(11) and i have a gdb-bt for it: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 30198)] 0x40117211 in free () from /lib/i686/libc.so.6 (gdb) bt #0 0x40117211 in free () from /lib/i686/libc.so.6 #1 0x4068e3ba in _efree (ptr=0xbffefd20) at /usr/local/src/lamp/php-5.0.3/Zend/zend_alloc.c:287 #2 0x4069fc1e in compare_function (result=0xbfffabf0, op1=0xbffefd20, op2=0x8289964) at /usr/local/src/lamp/php-5.0.3/Zend/zend_operators.c:1279 #3 0x406a0483 in is_equal_function (result=0xbfffabf0, op1=0x837582c, op2=0x8289964) at /usr/local/src/lamp/php-5.0.3/Zend/zend_operators.c:1476 #4 0x406c77ec in zend_is_equal_handler (execute_data=0xbfffaf90, opline=0x8289934, op_array=0x821ec9c) at /usr/local/src/lamp/php-5.0.3/Zend/zend_execute.c:90 #5 0x406c4cec in execute (op_array=0x821ec9c) at /usr/local/src/lamp/php-5.0.3/Zend/zend_execute.c:1400 #6 0x406a3479 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/lamp/php-5.0.3/Zend/zend.c:1069 #7 0x4066b33f in php_execute_script (primary_file=0xbfffd2e0) at /usr/local/src/lamp/php-5.0.3/main/main.c:1628 #8 0x406d85a4 in apache_php_module_main (r=0x81d81cc, display_source_mode=0) at /usr/local/src/lamp/php-5.0.3/sapi/apache/sapi_apache.c:54 #9 0x406d907c in send_php (r=0x81d81cc, display_source_mode=0, filename=0x0) at /usr/local/src/lamp/php-5.0.3/sapi/apache/mod_php5.c:622 #10 0x406d9243 in send_parsed_php (r=0x81d81cc) at /usr/local/src/lamp/php-5.0.3/sapi/apache/mod_php5.c:637 #11 0x080549ff in ap_invoke_handler () #12 0x08069f5d in process_request_internal () #13 0x08069fbc in ap_process_request () #14 0x08060f1a in child_main () #15 0x080610e8 in make_child () #16 0x0806124e in startup_children () #17 0x0806190e in standalone_main () #18 0x08062146 in main () [2005-01-01 17:19:35] drews at dynamicwebpages dot de Hi Derick, the xml is valid and has about 360 lines of config.data, which i first had to clean up before posting. the max depth is four and i would really appreciate not to post it here. In case you really need it, i will clean everything and paste it, but i doubt if it will still help you if it is cleaned ... ? [2005-01-01 16:48:17] [EMAIL PROTECTED] We need the xml file too of course, and never use --enable-versioning in your configure statement! [2005-01-01 15:11:04] drews at dynamicwebpages dot de Description: updating php to 5.0.3 causes php to exit with a segmentation fault(11). configuring with --enable-debug let it run, but throwing errors into the apache error_log (see below). strange: php5.0.0RC3 still works without segfaults and runs happily. === config.nice === './configure' \ '--prefix=/srv/php/5.0.3' \ '--with-apxs=/srv/apache/current/bin/apxs' \ '--with-mysql=/srv/mysql/current' \ '--with-imap' \ '--with-imap-ssl' \ '--with-curl' \ '--with-zlib' \ '--with-ftp' \ '--with-gd=/usr/local' \ '--with-png-dir=/usr' \ '--with-zlib-dir=/usr' \ '--with-freetype-dir=/usr' \ '--with-openssl=/srv/openssl/current' \ '--with-bz2' \ '--with-ldap' \ '--with-jpeg-dir=/usr' \ '--enable-versioning' \ '--enable-sockets' \ '--with-mcrypt' \ '--with-mhash' \ '--with-pear=/srv/pear' \ '--with-config-file-path=/etc' \ '--with-tidy' \ === /config.nice === gdb.backtrace does not work out, because enableing debug with php does not lead to segfault but to memleaks. Reproduce code: --- if (file_exists($_SESSION['cfgfile'])) { $CfgObj = simplexml_load_file($_SESSION['cfgfile']); } else { die(); } (not sure, if this causes the segfault, but it is the only line of code, that makes use of simplexml and could lead to the memleak). Expected result: anything than a segfault ;) Actual result: -- /usr/local/src/lamp/php-5.0.3/ext/simplexml/simplexml.c(970) : Freeing 0x083EBE14 (2 bytes),
#30106 [Com]: SOAP cannot not parse 'ref' element. Causes Uncaught SoapFault exception.
ID: 30106 Comment by: jfxberns at hotmail dot com Reported By: phpcoder at gmx dot at Status: Assigned Bug Type: SOAP related Operating System: Windows XP PHP Version: 5CVS-2004-09-16 (dev) Assigned To: dmitry New Comment: Not to be a nag--but is this bug being worked on or just ignored? I just need to know what kind of priority it has or expected timeframe for resolution so I can make decisions for project planning. I realize that this is maintained by contributors--but it helps everybody if we at least know what is happening Previous Comments: [2004-12-18 22:02:37] jfxberns at hotmail dot com Is there any status on this bug? I see it has been assigned for a quite a while. I just would like to know if there is a solution on the horizon in the near-term. [2004-10-13 20:39:04] jfxberns at hotmail dot com I am having this problem and I am also having problems with PEAR::SOAP on 5.0.2... I can't wait for a fix--I am dead in the water! Is there an earlier version of 5.0.x (I am using 5.0.2) that does not have this issue--or do I have to roll all the way back to PHP 4.3.x? [2004-10-04 05:49:05] jfxberns at hotmail dot com I am using the release version of 5.0.2 on Linux--same bug, same error message: ?php $client = new SoapClient( http://www.precisionreservations.com/PRWebServ/getOtherInformation.asmx?WSDL; ); ? [2004-09-16 10:26:54] phpcoder at gmx dot at note: also happens with PHP Version 5.1.0-dev [2004-09-16 08:59:50] phpcoder at gmx dot at Description: php-soap extension fails to parse wdsl document http://mathe.bg-bab.ac.at/ClassServer/service.asmx?WSDL Returned Error: Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute in c:\Inetpub\class\index.php:2 Stack trace: #0 {main} thrown in c:\Inetpub\class\index.php on line 2 phpinfo() returns: PHP Version 5.0.2-dev (got the dev built from 2004-09-15, 10:30 p.m.) Reproduce code: --- ? $client = new SoapClient('http://mathe.bg-bab.ac.at/ClassServer/service.asmx?WSDL'); ? -- Edit this bug report at http://bugs.php.net/?id=30106edit=1
#31482 [Opn]: Crashes when calling method on COM objetct
ID: 31482 User updated by: martin at hmailserver dot com Reported By: martin at hmailserver dot com Status: Open Bug Type: Reproducible crash Operating System: Windows XP SP2 PHP Version: 4.3.10 New Comment: OK, this is what I ment. Time's much over here in sweden... To confirm that it was not a bug in my code, I created a small dummy ATL server component in Visual Studio 2003 (containing almost no code) which exposed a dummy method that just showed a message box. When I create an instance of it in VBA, PHP4.3.9 and PHP 5.0.3 it works fine. It crashes in 4.3.10 and the latest available development build. Previous Comments: [2005-01-11 00:41:51] martin at hmailserver dot com Description: PHP 4.3.10 crashes every time I try to call an method on an COM object. Several users of my software has reported the same problem. When using PHP 4.3.9 or 5.0.3 it does not crash. To confirm that it was not a bug in my code, I created a small dummy ATL server component in Visual Studio 2003 (containing almost no code) which a exposed dummy method that just created a message box. When I create an instance of it in VBA, PHP4.3.9 and PHP 5.0.3. It crashes in 4.3.10 and the latest available development build. Reproduce code: --- ? $app = new COM(DummyTest.Dummy); $app-Test(); ? You either need to download the DummyTest ATL server from here and compile it yourself (in VS 2003) http://www.hmailserver.com/PHPBug/DummyTest.rar Or download the DLL and register it using regsvr32.exe http://www.hmailserver.com/PHPBug/DummyTest.dll Expected result: The Test() function shows a message with the text OK. Test it in 4.3.9 or 5.0.3 to see expected result. Actual result: -- It crashes every single time I've tried it. On my computer, the following message is shown: An exception 'Unhandled Win32 Exception' has occured in PHP.exe. Couldn't find information on how to turn on backtrace in an win32 environment. -- Edit this bug report at http://bugs.php.net/?id=31482edit=1
#31440 [Opn-Fbk]: GLOBALS array overwritten from GET/POST/COOKIE vars
ID: 31440 Updated by: [EMAIL PROTECTED] Reported By: john at jelsoft dot com -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: All PHP Version: 4.3.10 New Comment: Wow, lot of reproduce votes. What Web server? Tell us more about your configuration as well. Previous Comments: [2005-01-07 23:07:45] john at jelsoft dot com Just to clarify why this is a very serious issue: any scripts using the $GLOBALS array to clear all global variables set when registerglobals is on (in order to simulate registerglobals being off) will run into major problems. So: foreach( $GLOBALS as $key = $val ) { unset( $$key ); } if ( $_GET['expression'] ) { $output = hello; } echo $output; Will fail to unset all the global variables and so $output could have bad values injected into it. It should be impossible to inject data into $output, but this bug allows it to happen. [2005-01-07 13:36:49] john at jelsoft dot com Description: With register_globals on it is possible to overwrite the $GLOBALS array from GET/POST/COOKIE vars. For example, try the script below: script.php (will print the full GLOBALS array) script.php?GLOBALS[php]=error (will print a GLOBALS array with just one entry) _GET, _POST, etc superglobals are no vulnerable. PHP5 does not exhibit this behaviour. Reproduce code: --- a href=script.php?GLOBALS[php]=errorkill GLOBALS/a pre ?php print_r( $GLOBALS ); ? /pre Expected result: Full display of GLOBALS array Actual result: -- GLOBALS array with just one entry -- Edit this bug report at http://bugs.php.net/?id=31440edit=1