#30608 [Opn-Bgs]: Fatal error when using require_once
ID: 30608 Updated by: [EMAIL PROTECTED] Reported By: yogistra at msn dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows 2K Pro PHP Version: 5.0.2 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This was also filed as a bug before. Previous Comments: [2004-10-29 04:12:31] yogistra at msn dot com Description: When using require_once to include the same file but using different cases for the file name PHP issues an error. For example in file X I do this require_once('common.inc') require_once('Problem.inc') In 'common.inc' I also have 'Problem.inc' included but like this: require_once('PROBLEM.inc') Now when I run file X I get a redefination problem. On windows case doesnt matter. This is exactly the error I got: Fatal error: Cannot redeclare logactivity() (previously declared in d:\myphplib\WEB_LOGGING.inc:11) in d:\myphplib\WEB_Logging.inc on line 21 Reproduce code: --- require_once('any_file.inc'); require_once('any_FILE.inc'); Expected result: I dont expect errors. Actual result: -- I get errors. -- Edit this bug report at http://bugs.php.net/?id=30608edit=1
#30563 [Bgs]: Apache doesn't start with PHP. No errors reported.
ID: 30563 Updated by: [EMAIL PROTECTED] Reported By: david at donpiso dot com Status: Bogus Bug Type: Reproducible crash Operating System: Linux 2.4.25 PHP Version: 4.3.9 New Comment: The fact that your test: gcc tst-libc6.c -o tst-libc6 -ldb doesn't show up in ldd is dubious on the first machine. It may be necessary to add: extern int db_open(void); to force the db_open symbol to be resolved at initial link time to trigger the same conditions as in PHP. To debug the PHP issue further you could use LD_DEBUG and LD_DEBUG_OUTPUT (see man ld.so) and work out where the db_open() is getting resolved to from nss_db. All the copies of the nss_db library I have use a statically linked copy of Berkeley DB. Previous Comments: [2004-10-28 17:00:51] david at donpiso dot com It doesn't break. Test program is: #include netdb.h #include stdio.h int main(int argc, char *argv) { struct protoent *pe; pe=getprotobyname(tcp); printf(Name: %s, Number: %u\n,pe-p_name,pe-p_proto); } Tests are: -Test 1: gcc tst-libc6.c -o tst-libc6 ldd tst-libc6 libc.so.6 = /lib/libc.so.6 (0x40024000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x4000) ./tst-libc6 Name: tcp, Number: 6 -Test 2: gcc tst-libc6.c -o tst-libc6 -ldb ldd tst-libc6 libc.so.6 = /lib/libc.so.6 (0x40024000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x4000) ./tst-libc6 Name: tcp, Number: 6 -Test 3: gcc tst-libc6.c -o tst-libc6 -lnss_db ldd tst-libc6 libnss_db.so.2 = /lib/libnss_db.so.2 (0x40024000) libc.so.6 = /lib/libc.so.6 (0x4002b000) libnss_files.so.2 = /lib/libnss_files.so.2 (0x4014e000) libdb-3.1.so = /lib/libdb-3.1.so (0x40157000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x4000) ./tst-libc6 Name: tcp, Number: 6 So it works and doesn't segfault. Compared to a machine that works, I notice that the working one has a glibc 2.3.1 against the glibc 2.2.5 that drives the failing one. I will try to upgrade glibc, although it worked well for slightly older Apache+PHP versions and I have to evaluate posible collateral effects on other applications before upgrading glibc from 2.2 to 2.3... On the working machine, test 2 shows different libraries: -Test 2: gcc tst-libc6.c -o tst-libc6 -ldb ldd tst-libc6 libdb-3.3.so = /lib/libdb-3.3.so (0x40025000) libc.so.6 = /lib/libc.so.6 (0x400af000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x4000) ./tst-libc6 Name: tcp, Number: 6 Here it includes libdb (as you may expect), while on the first case Test2 just links against the same libraries as Test1 (both working). Maybe some dependencies in php make libraries to behave bogus and make that call to fail... I will try to upgrade libraries, but if you know a better method to avoid failure without changing them, will be of help (it is a production server, I can test new versions of Apache and PHP in parallel with the production daemons, but upgrading system libraries is a little more dangerous and painful as it is 24/7 service...) Thank you anyway for your time :-) [2004-10-26 16:36:11] [EMAIL PROTECTED] This looks suspiciously like a bad glibc installation: #0 0x in ?? () #1 0x407f9cec in db_open () from /lib/libnss_db.so.2 I doubt there is a PHP or Apache bug here. Try a simple program calling getprotobyname(tcp) to see if that segfaults; try it again when linked against -ldb. [2004-10-26 15:06:19] david at donpiso dot com Yes, you're right. There is a Segmentation Violation: (gdb) run -DSSL -e debug -k start -X Starting program: /uxd/apache-server2/bin/httpd -DSSL -e debug -k start -X [Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded module include_module [Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded module deflate_module [Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded module log_config_module [Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded module env_module [Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded module ssl_module [Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded module status_module [Tue Oct 26 15:03:42 2004] [debug] mod_so.c(247): loaded module info_module [Tue Oct 26 15:03:43 2004] [debug] mod_so.c(247): loaded module negotiation_module [Tue Oct 26 15:03:43 2004] [debug] mod_so.c(247): loaded module dir_module [Tue Oct 26 15:03:43 2004] [debug] mod_so.c(247): loaded module alias_module [Tue Oct 26 15:03:43 2004] [debug] mod_so.c(247): loaded module php4_module Program received signal SIGSEGV, Segmentation fault. 0x in ?? () (gdb) bt #0 0x in ?? () #1 0x407f9cec in db_open () from
#30610 [NEW]: cURL functions bypass open_basedir
From: guillaume dot maes at celeonet dot fr Operating system: Linux PHP version: 4.3.9 PHP Bug Type: cURL related Bug description: cURL functions bypass open_basedir Description: PHP cURL functions bypass open_basedir protection, so users can navigate through filesystem. For example, setting open_basedir in php.ini to /var/www/html anybody can retrieve /etc/parla using cURL functions This vulnerability has been discovered wednesday :http://www.securitytrap.com/mail/bugtraq/2004/Oct/0287.html Reproduce code: --- ?php $ch = curl_init(file:///etc/parla); $file=curl_exec($ch); echo $file ? Expected result: The execution of the file /etc/parla is not allowed because the value of openbase_dir restriction is /var/www/html. Actual result: -- The file /etc/parla is executed. If /etc/parla contents : bodyhtml Test of vulnerability /html/body The execution of this code with cURL functions showns the message. -- Edit bug report at http://bugs.php.net/?id=30610edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30610r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30610r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30610r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30610r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30610r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30610r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30610r=needscript Try newer version: http://bugs.php.net/fix.php?id=30610r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30610r=support Expected behavior: http://bugs.php.net/fix.php?id=30610r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30610r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30610r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30610r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30610r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30610r=dst IIS Stability: http://bugs.php.net/fix.php?id=30610r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30610r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30610r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30610r=mysqlcfg
#30609 [NEW]: cURL functions bypass open_basedir
From: guillaume dot maes at celeonet dot fr Operating system: Linux PHP version: 4.3.9 PHP Bug Type: cURL related Bug description: cURL functions bypass open_basedir Description: PHP cURL functions bypass open_basedir protection, so users can navigate through filesystem. For example, setting open_basedir in php.ini to /var/www/html anybody can retrieve /etc/parla using cURL functions This vulnerability has been discovered wednesday :http://www.securitytrap.com/mail/bugtraq/2004/Oct/0287.html Reproduce code: --- ?php $ch = curl_init(file:///etc/parla); $file=curl_exec($ch); echo $file ? Expected result: The execution of the file /etc/parla is not allowed because the value of openbase_dir restriction is /var/www/html. Actual result: -- The file /etc/parla is executed. If /etc/parla contents : bodyhtml Test of vulnerability /html/body The execution of this code with cURL functions showns the message. -- Edit bug report at http://bugs.php.net/?id=30609edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30609r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30609r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30609r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30609r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30609r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30609r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30609r=needscript Try newer version: http://bugs.php.net/fix.php?id=30609r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30609r=support Expected behavior: http://bugs.php.net/fix.php?id=30609r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30609r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30609r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30609r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30609r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30609r=dst IIS Stability: http://bugs.php.net/fix.php?id=30609r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30609r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30609r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30609r=mysqlcfg
#30609 [Opn-Bgs]: cURL functions bypass open_basedir
ID: 30609 Updated by: [EMAIL PROTECTED] Reported By: guillaume dot maes at celeonet dot fr -Status: Open +Status: Bogus Bug Type: cURL related Operating System: Linux PHP Version: 4.3.9 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. . Previous Comments: [2004-10-29 10:21:17] guillaume dot maes at celeonet dot fr Description: PHP cURL functions bypass open_basedir protection, so users can navigate through filesystem. For example, setting open_basedir in php.ini to /var/www/html anybody can retrieve /etc/parla using cURL functions This vulnerability has been discovered wednesday :http://www.securitytrap.com/mail/bugtraq/2004/Oct/0287.html Reproduce code: --- ?php $ch = curl_init(file:///etc/parla); $file=curl_exec($ch); echo $file ? Expected result: The execution of the file /etc/parla is not allowed because the value of openbase_dir restriction is /var/www/html. Actual result: -- The file /etc/parla is executed. If /etc/parla contents : bodyhtml Test of vulnerability /html/body The execution of this code with cURL functions showns the message. -- Edit this bug report at http://bugs.php.net/?id=30609edit=1
#30610 [Opn-Bgs]: cURL functions bypass open_basedir
ID: 30610 Updated by: [EMAIL PROTECTED] Reported By: guillaume dot maes at celeonet dot fr -Status: Open +Status: Bogus Bug Type: cURL related Operating System: Linux PHP Version: 4.3.9 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. #30609 Previous Comments: [2004-10-29 10:23:16] guillaume dot maes at celeonet dot fr Description: PHP cURL functions bypass open_basedir protection, so users can navigate through filesystem. For example, setting open_basedir in php.ini to /var/www/html anybody can retrieve /etc/parla using cURL functions This vulnerability has been discovered wednesday :http://www.securitytrap.com/mail/bugtraq/2004/Oct/0287.html Reproduce code: --- ?php $ch = curl_init(file:///etc/parla); $file=curl_exec($ch); echo $file ? Expected result: The execution of the file /etc/parla is not allowed because the value of openbase_dir restriction is /var/www/html. Actual result: -- The file /etc/parla is executed. If /etc/parla contents : bodyhtml Test of vulnerability /html/body The execution of this code with cURL functions showns the message. -- Edit this bug report at http://bugs.php.net/?id=30610edit=1
#30609 [Bgs-Opn]: cURL functions bypass open_basedir
ID: 30609 Updated by: [EMAIL PROTECTED] Reported By: guillaume dot maes at celeonet dot fr -Status: Bogus +Status: Open Bug Type: cURL related Operating System: Linux PHP Version: 4.3.9 New Comment: Sorry, this one should be open =) I do think it should be fixed and no, this is not a cURL problem. Previous Comments: [2004-10-29 10:38:02] [EMAIL PROTECTED] 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. . [2004-10-29 10:21:17] guillaume dot maes at celeonet dot fr Description: PHP cURL functions bypass open_basedir protection, so users can navigate through filesystem. For example, setting open_basedir in php.ini to /var/www/html anybody can retrieve /etc/parla using cURL functions This vulnerability has been discovered wednesday :http://www.securitytrap.com/mail/bugtraq/2004/Oct/0287.html Reproduce code: --- ?php $ch = curl_init(file:///etc/parla); $file=curl_exec($ch); echo $file ? Expected result: The execution of the file /etc/parla is not allowed because the value of openbase_dir restriction is /var/www/html. Actual result: -- The file /etc/parla is executed. If /etc/parla contents : bodyhtml Test of vulnerability /html/body The execution of this code with cURL functions showns the message. -- Edit this bug report at http://bugs.php.net/?id=30609edit=1
#30609 [Opn]: cURL functions bypass open_basedir
ID: 30609 User updated by: guillaume dot maes at celeonet dot fr Reported By: guillaume dot maes at celeonet dot fr Status: Open Bug Type: cURL related Operating System: Linux PHP Version: 4.3.9 New Comment: Sorry for the double post. My browser has crashed at this moment of my submit Previous Comments: [2004-10-29 10:43:45] [EMAIL PROTECTED] Sorry, this one should be open =) I do think it should be fixed and no, this is not a cURL problem. [2004-10-29 10:38:02] [EMAIL PROTECTED] 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. . [2004-10-29 10:21:17] guillaume dot maes at celeonet dot fr Description: PHP cURL functions bypass open_basedir protection, so users can navigate through filesystem. For example, setting open_basedir in php.ini to /var/www/html anybody can retrieve /etc/parla using cURL functions This vulnerability has been discovered wednesday :http://www.securitytrap.com/mail/bugtraq/2004/Oct/0287.html Reproduce code: --- ?php $ch = curl_init(file:///etc/parla); $file=curl_exec($ch); echo $file ? Expected result: The execution of the file /etc/parla is not allowed because the value of openbase_dir restriction is /var/www/html. Actual result: -- The file /etc/parla is executed. If /etc/parla contents : bodyhtml Test of vulnerability /html/body The execution of this code with cURL functions showns the message. -- Edit this bug report at http://bugs.php.net/?id=30609edit=1
#29648 [Opn]: cant throw exceptions with __autoload (to catch and handle them - workaround?)
ID: 29648 User updated by: black at scene-si dot org Reported By: black at scene-si dot org Status: Open Bug Type: Scripting Engine problem Operating System: debian -PHP Version: 5.0.0 +PHP Version: 5.0+ New Comment: requesting feedback new versions also dont support this Previous Comments: [2004-08-13 12:49:39] black at scene-si dot org And the result: Fatal error: __autoload(object_wtf) threw an exception of type 'Exception' in /root/monotek/mono/commands/test.php on line 16 (gah) [2004-08-13 12:47:52] black at scene-si dot org ugh, forgot to add if (!class_exists($classname)) { throw new Exception(); } after the first include_once in the example. Ofcourse i'm throwing the exception im trying to catch ;) [2004-08-13 12:30:17] black at scene-si dot org Description: I've tried to create an __autoload() function which would throw an exception if it can't load the class name from a file depending on the classname i request with the php code. I couldnt catch the exception with a try/catch clause, because it always failed (see expected/actual result below). My workaround was to add this after the first include_once statement inside the __autoload: if (!class_exists($classname)) { eval(class .$classname. { }); } Afterwards instead of a try/catch clause i used a method_exist call to see if a general function was defined (one that i require to have). Reproduce code: --- ?php function __autoload($classname) { if (substr($classname,0,7)==object_) { @include_once(include/object..substr($classname,7)..php); return; } @include_once(class..$classname..php); } try { $object = new object_wtf(hello); } catch (Exception $e) { echo __autoload failed ; var_dump($object); } Expected result: Output: __autoload failed NULL Actual result: -- Fatal error: Class 'object_wtf' not found in /root/monotek/mono/commands/test.php on line 15 -- Edit this bug report at http://bugs.php.net/?id=29648edit=1
#27508 [Com]: feof() broken for user-defined streams
ID: 27508 Comment by: cpuidle at gmx dot de Reported By: adam at trachtenberg dot com Status: Assigned Bug Type: Network related Operating System: * PHP Version: 5CVS-2004-03-05 Assigned To: wez New Comment: The issue is still present in PHP 5.0.1- any way to get this fixed? Thanks, Andi Previous Comments: [2004-09-20 21:23:21] contact at zeninteractif dot com I've made my own Streams Wrappers that returns data as xml. I use this streams with W3C include ! When I resolve xinclude using original domDocument class all working well with this method : function stream_eof() { return $this-position = strlen($this-data); } If I resolve xinclude using domDocument extended class (with my own xinclude method) I must use this method In all my streams handlers classes : function stream_eof() { return $this-position strlen($this-data); } My xinclude method use this code : while (!feof($fp)) { $this-data.=fread($fp,1024); } Maybe If I use file_get_contents function all will work well ! It's a performance problem .. file_get_contents function + stream_get_meta_data function = 2 files pointers ! my current method = 1 file pointer ! [2004-04-01 14:09:57] tthiery at yahoo dot de 5.0.0rc1 win32 same error as above custom application on base of manual example. should be return $this-position = strlen($this-data); if I reverse the return value of stream_eof all works fine return $this-position strlen($this-data); Perhaps just a small ! is missing. [2004-03-09 11:32:53] adam at trachtenberg dot com Oops. Wrong file extension. Should be: http://www.trachtenberg.com/patches/bug27508.txt [2004-03-09 11:31:38] adam at trachtenberg dot com Here's an example where the class is just a wrapper around fopen(), fread(), fwrite(), etc. It's at http://www.trachtenberg.com/patches/ bug27508.php. In PHP 4, you get: line1 line2 line3 PHP 5 outputs no data. [2004-03-09 08:47:27] [EMAIL PROTECTED] Wez, the fix didn't quite fix it. Adam, can you please come up with a test case and send it to internals@ ? (The one in manual is a bit long, could it be made any shorter?) 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/27508 -- Edit this bug report at http://bugs.php.net/?id=27508edit=1
#30613 [NEW]: proxy problem in Curl library
From: sergey_s_m at mail dot ru Operating system: Suse9.0 PHP version: 5.0.1 PHP Bug Type: cURL related Bug description: proxy problem in Curl library Description: Infinite looping when I tried to get page through proxy using curl library and option CURLOPT_FOLLOWLOCATION. Without this option all works OK. This bug I saw under curl-7.10.5, curl-7.11.2 curl-7.12.2 Reproduce code: --- $proxy=64.56.118.178:1080; $addr = http://www.yandex.ru/;; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $addr); curl_setopt($ch, CURLOPT_PROXY, $proxy); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_HTTPGET,1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_VERBOSE, TRUE); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3); curl_setopt($ch, CURLOPT_TIMEOUT, 3); $parse = curl_exec($ch); print(OK); Expected result: I've expected printing OK Actual result: -- firstly I sow nothing. when I became use curl_setopt($ch, CURLOPT_VERBOSE, TRUE) I sow lopping next: 64.56.118.178:1080 * About to connect() to 64.56.118.178 port 1080 * Trying 64.56.118.178... * connected * Connected to 64.56.118.178 (64.56.118.178) port 1080 GET http://www.yandex.ru/ HTTP/1.1 Host: www.yandex.ru Pragma: no-cache Accept: */* HTTP/1.0 302 Found Connection: Close Location: http://no-full-proxy-allowed/ * Closing connection #0 * Issue another request to this URL: 'http:// no-full-proxy-allowed/' * About to connect() to 64.56.118.178 port 1080 * Trying 64.56.118.178... * connected * Connected to 64.56.118.178 (64.56.118.178) port 1080 GET http://no-full-proxy-allowed/ HTTP/1.1 Host: no-full-proxy-allowed Pragma: no-cache Accept: */* Notice: when I use $addr = http://www.yandex.ru;; instead $addr = http://www.yandex.ru/;; All works OK! -- Edit bug report at http://bugs.php.net/?id=30613edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30613r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30613r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30613r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30613r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30613r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30613r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30613r=needscript Try newer version: http://bugs.php.net/fix.php?id=30613r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30613r=support Expected behavior: http://bugs.php.net/fix.php?id=30613r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30613r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30613r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30613r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30613r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30613r=dst IIS Stability: http://bugs.php.net/fix.php?id=30613r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30613r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30613r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30613r=mysqlcfg
#30614 [NEW]: Adding floating numbers fails
From: mauricio at elmaster dot com Operating system: Linux PHP version: 5.0.1 PHP Bug Type: Reproducible crash Bug description: Adding floating numbers fails Description: This simple operation fails. We have tried it on PHP 4.3.4 standard install on fedora Core 2, and PHP 5.0.1. Instead of 0 we get 1-8.8817841970013E-16. If we change a bit the number the code doesn't fails, very weird. Reproduce code: --- ?php die(9.95 + 4.97 - 9.95 - 4.97); ? Expected result: 0 Actual result: -- 1-8.8817841970013E-16 -- Edit bug report at http://bugs.php.net/?id=30614edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30614r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30614r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30614r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30614r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30614r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30614r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30614r=needscript Try newer version: http://bugs.php.net/fix.php?id=30614r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30614r=support Expected behavior: http://bugs.php.net/fix.php?id=30614r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30614r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30614r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30614r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30614r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30614r=dst IIS Stability: http://bugs.php.net/fix.php?id=30614r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30614r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30614r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30614r=mysqlcfg
#30615 [NEW]: Fatal error: Call to undefined function: onselect()
From: dmitryseliv at yahoo dot com Operating system: Red Hat Linux PHP version: 4.3.9 PHP Bug Type: Class/Object related Bug description: Fatal error: Call to undefined function: onselect() Description: Hi! We just upgraded php to 4.3.9 and i'm getting this error message right now. Code looks fine. So my guess it's some how related to the upgraded. Reproduce code: --- function select() { $this-onSelect(); $objDB = createDataBase(); $sOrderBy = getValue(order_by, $GLOBALS[Variables]); if ($sOrderBy != ) { $vtrFieldArray = getValue($sOrderBy, $this-m_vtrFields); if (gettype($vtrFieldArray) == 'array') { $sOrderBy = order by .($vtrFieldArray[1]). asc; } else { $sOrderBy = ; } } $sRequest = select ; for ($nCount = 0; $nCount count($this-m_vtrFields); ++$nCount) { if ($nCount != 0) { $sRequest .= , ; } $sRequest .= $this-m_vtrFields[$nCount][1]; } $sRequest .= from ; for ($nCount = 0; $nCount count($this-m_vtrTables); ++$nCount) { if ($nCount != 0) { $sRequest .= , ; } $sRequest .= $this-m_vtrTables[$nCount]; } if (($this-m_nID != ) || ($this-m_sWhereClause != )) { $sRequest .= where ; } if ($this-m_nID != ) { $sRequest .= .$this-m_vtrTables[0]..id=.$this-m_nID; if ($this-m_sWhereClause != ) { $sRequest .= and ; } } if ($this-m_sGroupClause != ) { $sRequest .= $this-m_sGroupClause; } $sRequest .= $this-m_sWhereClause; $sRequest .= $sOrderBy; $this-m_vtrResultTable = $objDB-execute($sRequest); } Actual result: -- Fatal error: Call to undefined function: onselect() -- Edit bug report at http://bugs.php.net/?id=30615edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30615r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30615r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30615r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30615r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30615r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30615r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30615r=needscript Try newer version: http://bugs.php.net/fix.php?id=30615r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30615r=support Expected behavior: http://bugs.php.net/fix.php?id=30615r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30615r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30615r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30615r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30615r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30615r=dst IIS Stability: http://bugs.php.net/fix.php?id=30615r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30615r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30615r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30615r=mysqlcfg
#30614 [Opn-Bgs]: Adding floating numbers fails
ID: 30614 Updated by: [EMAIL PROTECTED] Reported By: mauricio at elmaster dot com -Status: Open +Status: Bogus Bug Type: Reproducible crash Operating System: Linux PHP Version: 5.0.1 New Comment: Floating point values have a limited precision. Hence a value might not have the same string representation after any processing. That also includes writing a floating point value in your script and directly printing it without any mathematical operations. Thank you for your interest in PHP. Previous Comments: [2004-10-29 19:21:18] mauricio at elmaster dot com Description: This simple operation fails. We have tried it on PHP 4.3.4 standard install on fedora Core 2, and PHP 5.0.1. Instead of 0 we get 1-8.8817841970013E-16. If we change a bit the number the code doesn't fails, very weird. Reproduce code: --- ?php die(9.95 + 4.97 - 9.95 - 4.97); ? Expected result: 0 Actual result: -- 1-8.8817841970013E-16 -- Edit this bug report at http://bugs.php.net/?id=30614edit=1
#30616 [NEW]: Cant return as reference from offsetget() for mysqli_stmt-bind_param()
From: john at milsson dot nu Operating system: Windows PHP version: 5.0.2 PHP Bug Type: MySQLi related Bug description: Cant return as reference from offsetget() for mysqli_stmt-bind_param() Description: Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference when I try to use $mysqli_stmt-bind_param('s',$arrayAccessObj['offset']); even though offsetget is declared as function offsetGet($key) { return $this-{'_'.strtolower($key)}; } -- Edit bug report at http://bugs.php.net/?id=30616edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30616r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30616r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30616r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30616r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30616r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30616r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30616r=needscript Try newer version: http://bugs.php.net/fix.php?id=30616r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30616r=support Expected behavior: http://bugs.php.net/fix.php?id=30616r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30616r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30616r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30616r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30616r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30616r=dst IIS Stability: http://bugs.php.net/fix.php?id=30616r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30616r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30616r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30616r=mysqlcfg
#30589 [Opn-Bgs]: Unable to have concurrent execution of same page
ID: 30589 User updated by: brian dot foddy at nwa dot com Reported By: brian dot foddy at nwa dot com -Status: Open +Status: Bogus Bug Type: Performance problem Operating System: Solaris 2.8 PHP Version: 5.0.2 New Comment: There is something more at work here, and current evidense points away from php5. Previous Comments: [2004-10-27 23:57:28] brian dot foddy at nwa dot com Thanks for the quick reply, but I modified the sample script to ?php session_write_close(); print (starting1); flush (); touch (foo.dat); sleep (60); ? Done. but it has no effect. The flush call is only for demonstration/debug, my actual script where I noticed the problem doesn't have this call. The contents of php.ini Session section are (comments removed), pretty standard I believe: [Session] session.save_handler = files session.save_path = /tmp session.use_cookies = 1 session.name = PHPSESSID session.auto_start= 0 session.cookie_lifetime = 0 session.cookie_domain = session.serialize_handler = php session.gc_probability= 1 session.gc_maxlifetime= 1440 session.referer_check = session.entropy_length= 0 session.entropy_file = ; session.entropy_length= 16 ; session.entropy_file = /dev/urandom session.cache_limiter = nocache session.use_trans_sid = 1 url_rewriter.tags = a=href,area=href,frame=src,input=src,form=fakeentry [2004-10-27 23:33:57] [EMAIL PROTECTED] You're probably using session_auto_start or something. Run session_write_close() as first statement to close the session, this will allow your script to run concurrently. [2004-10-27 22:49:22] brian dot foddy at nwa dot com Description: Frankly I can't believe this is a bug, but I can't find any config to change this behavior... Using 5.0.2 on Solaris 2.8 and Apache 1.3.22, we are unable to have concurrent execuation of the same script at the same time. Any attempt to run the script below from 2 browsers, the first one will start normally, displaying starting, then during the sleep, try a second request and it will not begin any execution until the first request completes, then it begins its normal execution. If this script is duplicated to a different file name, ie: concurrent1.php and concurrent2.php, then both can execute at the same time as you would expect. This server was upgraded from version 4.3x some months back and I'm sure it didn't have this behavior. In general our server is a low-volume intranet server so this problems only shows up on rare occasions when a specific web app is needed. Apache config: MinSpareServers 2 MaxSpareServers 12 StartServers 8 MaxClients 20 The web server is not reaching these limits for my tests. Reproduce code: --- ?php print (starting); flush (); touch (foo.dat); sleep (60); ? Done. Execute from 2 browsers at the same time. Expected result: Both browsers should show starting then wait the 60 seconds. Actual result: -- The first request starts normally, the second page waits for the first to complete before the second begins. -- Edit this bug report at http://bugs.php.net/?id=30589edit=1
#30617 [NEW]: I can't get attributes of nodes, when I use XML document with namespace definit
From: sveta at microbecal dot com Operating system: Windows XP PHP version: 5CVS-2004-10-29 (dev) PHP Bug Type: SimpleXML related Bug description: I can't get attributes of nodes, when I use XML document with namespace definit Description: When I use XML document with namespace definitions, I can't get attributes of nodes Reproduce code: --- $xml_file = 'test.xml'; $xml = simplexml_load_file($xml_file); foreach($xml-Worksheet-attributes() as $a = $b) { echo $a,'=',$b,\\n; } test.xml: ?xml version=1.0? Workbook xmlns=urn:schemas-microsoft-com:office:spreadsheet xmlns:o=urn:schemas-microsoft-com:office:office xmlns:x=urn:schemas-microsoft-com:office:excel xmlns:ss=urn:schemas-microsoft-com:office:spreadsheet xmlns:html=http://www.w3.org/TR/REC-html40; Worksheet ss:Name=English /Worksheet /Workbook Expected result: Name=English -- Edit bug report at http://bugs.php.net/?id=30617edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30617r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30617r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30617r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30617r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30617r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30617r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30617r=needscript Try newer version: http://bugs.php.net/fix.php?id=30617r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30617r=support Expected behavior: http://bugs.php.net/fix.php?id=30617r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30617r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30617r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30617r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30617r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30617r=dst IIS Stability: http://bugs.php.net/fix.php?id=30617r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30617r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30617r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30617r=mysqlcfg
#30617 [Opn]: I can't get attributes of nodes, when I use XML document with namespace definit
ID: 30617 User updated by: sveta at microbecal dot com Reported By: sveta at microbecal dot com Status: Open Bug Type: SimpleXML related Operating System: Windows XP PHP Version: 5CVS-2004-10-29 (dev) New Comment: Real result: nothing :) Previous Comments: [2004-10-29 21:55:53] sveta at microbecal dot com Description: When I use XML document with namespace definitions, I can't get attributes of nodes Reproduce code: --- $xml_file = 'test.xml'; $xml = simplexml_load_file($xml_file); foreach($xml-Worksheet-attributes() as $a = $b) { echo $a,'=',$b,\\n; } test.xml: ?xml version=1.0? Workbook xmlns=urn:schemas-microsoft-com:office:spreadsheet xmlns:o=urn:schemas-microsoft-com:office:office xmlns:x=urn:schemas-microsoft-com:office:excel xmlns:ss=urn:schemas-microsoft-com:office:spreadsheet xmlns:html=http://www.w3.org/TR/REC-html40; Worksheet ss:Name=English /Worksheet /Workbook Expected result: Name=English -- Edit this bug report at http://bugs.php.net/?id=30617edit=1
#30618 [NEW]: INDEX POSITIONS OF A REGULAR EXPRESSION
From: webmaster at unitedscripters dot com Operating system: Windows XPP PHP version: 5.0.2 PHP Bug Type: Regexps related Bug description: INDEX POSITIONS OF A REGULAR EXPRESSION Description: Object: FINDING INDEX POSITIONS OF A REGULAR EXPRESSION MATCH IS APPARENTLY A NON-AVAILABLE FEATURE I might be wrong but apparently PHP lacks a way to spot not only matches but their _index_ positions within a string. I at first thought that once found the matches by preg_match_all, all one had to do to draw also their index positions in the input string, was to iterate the returned array of matches and recursively grab any match from the string by strpos, removing the already inspected substring. Though it may seem an obvious idea, yet it may not work. The position in a string searched by a string oriented function is not necessarily the same poistion searched by a regular expression oriented function. Consider this example, input string is: A thesaurus for the pupil whereas the regular expression searches for: /the\\b/ which is obviusly a word like the followed by a word boundary (\\b). The preg_match_all matches would report, correctly, only the isolated article the, for that is followed by a word boundary. But attempting to retrieve the index position of that match by strpos would report the index position of THEsaurus. So do _not_ use strpos in combination with preg_match_all having in mind the retrieval of the index positions of the matches: that won't work the expected way. Reproduce code: --- function foo($string, $regexp){ $found=0; $indexes=array(); preg_match_all($regexp, $string, $matches); print(strong.$matches[0][0]./strong); $matchSize=sizeof($matches[0]); for($m=0; $m $matchSize; $m++){ $found=strlen(substr($string, 0, $found)); preg_match($regexp, $string, $specificMatch, PREG_OFFSET_CAPTURE, $found); $indexes[$m]=$found+ strpos(substr($string, $found), $specificMatch[0][0]);/*shortcoming: it's not a real index*/ $found=$indexes[$m]+strlen($matches[$m]); }; return $indexes; } $in=A thesaurus for the pupil; print In string strong$in/strong, match is: ; $out=foo($in, /the\\b/); print brWrong Index reported: ; print_r($out); Expected result: The result is correct, it is the feature that we lack and that _apparently_ we cannot even implement: grabbing the correct index of a Regular Expression match. Whatever the case, the feature is needed: javascript has it, the regular expression oriented function named search(), which reports at least one index and thus can be used recursively on gradually shrinking substrings of the input string to retrieve the positions of all the matches. If there is a way and I was not aware of it, I apologize. Yet the list of perl regexps clearly lacks a function for the retrieval of the indexes. -- Edit bug report at http://bugs.php.net/?id=30618edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30618r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30618r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30618r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30618r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30618r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30618r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30618r=needscript Try newer version: http://bugs.php.net/fix.php?id=30618r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30618r=support Expected behavior: http://bugs.php.net/fix.php?id=30618r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30618r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30618r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30618r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30618r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30618r=dst IIS Stability: http://bugs.php.net/fix.php?id=30618r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30618r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30618r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30618r=mysqlcfg
#30615 [Opn-Fbk]: Fatal error: Call to undefined function: onselect()
ID: 30615 Updated by: [EMAIL PROTECTED] Reported By: dmitryseliv at yahoo dot com -Status: Open +Status: Feedback Bug Type: Class/Object related Operating System: Red Hat Linux PHP Version: 4.3.9 New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to Open. Thank you for your interest in PHP. Previous Comments: [2004-10-29 20:05:41] dmitryseliv at yahoo dot com Description: Hi! We just upgraded php to 4.3.9 and i'm getting this error message right now. Code looks fine. So my guess it's some how related to the upgraded. Reproduce code: --- function select() { $this-onSelect(); $objDB = createDataBase(); $sOrderBy = getValue(order_by, $GLOBALS[Variables]); if ($sOrderBy != ) { $vtrFieldArray = getValue($sOrderBy, $this-m_vtrFields); if (gettype($vtrFieldArray) == 'array') { $sOrderBy = order by .($vtrFieldArray[1]). asc; } else { $sOrderBy = ; } } $sRequest = select ; for ($nCount = 0; $nCount count($this-m_vtrFields); ++$nCount) { if ($nCount != 0) { $sRequest .= , ; } $sRequest .= $this-m_vtrFields[$nCount][1]; } $sRequest .= from ; for ($nCount = 0; $nCount count($this-m_vtrTables); ++$nCount) { if ($nCount != 0) { $sRequest .= , ; } $sRequest .= $this-m_vtrTables[$nCount]; } if (($this-m_nID != ) || ($this-m_sWhereClause != )) { $sRequest .= where ; } if ($this-m_nID != ) { $sRequest .= .$this-m_vtrTables[0]..id=.$this-m_nID; if ($this-m_sWhereClause != ) { $sRequest .= and ; } } if ($this-m_sGroupClause != ) { $sRequest .= $this-m_sGroupClause; } $sRequest .= $this-m_sWhereClause; $sRequest .= $sOrderBy; $this-m_vtrResultTable = $objDB-execute($sRequest); } Actual result: -- Fatal error: Call to undefined function: onselect() -- Edit this bug report at http://bugs.php.net/?id=30615edit=1
#30616 [Opn-Fbk]: Cant return as reference from offsetget() for mysqli_stmt-bind_param()
ID: 30616 Updated by: [EMAIL PROTECTED] Reported By: john at milsson dot nu -Status: Open +Status: Feedback Bug Type: MySQLi related Operating System: Windows PHP Version: 5.0.2 New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to Open. Thank you for your interest in PHP. Previous Comments: [2004-10-29 21:26:35] john at milsson dot nu Description: Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference when I try to use $mysqli_stmt-bind_param('s',$arrayAccessObj['offset']); even though offsetget is declared as function offsetGet($key) { return $this-{'_'.strtolower($key)}; } -- Edit this bug report at http://bugs.php.net/?id=30616edit=1
#30617 [Opn-Bgs]: I can't get attributes of nodes, when I use XML document with namespace definit
ID: 30617 Updated by: [EMAIL PROTECTED] Reported By: sveta at microbecal dot com -Status: Open +Status: Bogus Bug Type: SimpleXML related Operating System: Windows XP PHP Version: 5CVS-2004-10-29 (dev) New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php You need to take care of the namespaces. Previous Comments: [2004-10-29 21:58:57] sveta at microbecal dot com Real result: nothing :) [2004-10-29 21:55:53] sveta at microbecal dot com Description: When I use XML document with namespace definitions, I can't get attributes of nodes Reproduce code: --- $xml_file = 'test.xml'; $xml = simplexml_load_file($xml_file); foreach($xml-Worksheet-attributes() as $a = $b) { echo $a,'=',$b,\\n; } test.xml: ?xml version=1.0? Workbook xmlns=urn:schemas-microsoft-com:office:spreadsheet xmlns:o=urn:schemas-microsoft-com:office:office xmlns:x=urn:schemas-microsoft-com:office:excel xmlns:ss=urn:schemas-microsoft-com:office:spreadsheet xmlns:html=http://www.w3.org/TR/REC-html40; Worksheet ss:Name=English /Worksheet /Workbook Expected result: Name=English -- Edit this bug report at http://bugs.php.net/?id=30617edit=1
#30531 [Fbk-NoF]: file_put_contents
ID: 30531 Updated by: [EMAIL PROTECTED] Reported By: teunkloosterman at gmail dot com -Status: Feedback +Status: No Feedback Bug Type: Feature/Change Request Operating System: Linux PHP Version: 5.0.1 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: [2004-10-22 14:37:28] [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 Works fine here. [2004-10-22 14:32:23] teunkloosterman at gmail dot com Description: The file_put_contents function doesn't return anything on an error, it would be better if for example: on a permission error, I could catch an error instead of a big message and no result Reproduce code: --- if(file_put_contents(./file, ) === FALSE) { exit(error, could not write to file); } else { echo Yay, file is completed; } Expected result: error, could not write to file Actual result: -- Warning: file_put_contents(./file) [function.file-put-contents]: failed to open stream: Permission denied in /var//www/test.php on line 2 -- Edit this bug report at http://bugs.php.net/?id=30531edit=1
#30441 [Fbk-NoF]: file_get_contents and fread don't read the wholle file
ID: 30441 Updated by: [EMAIL PROTECTED] Reported By: christian at koch dot net -Status: Feedback +Status: No Feedback Bug Type: Filesystem function related Operating System: Windows XP SP2 PHP Version: 5.0.2 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: [2004-10-22 13:54:53] [EMAIL PROTECTED] I can't reproduce it with PHP 5.1.0-dev, 5.0.3-dev and 4.3.10-dev. Please, provide a downloadable example. [2004-10-22 13:46:37] christian at koch dot net bug is still in 5.01 and 5.00 [2004-10-22 13:41:45] christian at koch dot net read a file into a string, the string has a different content as the file. try this ?php var_dump(file_get_contents(testfile.txt)); ? where textfile.txt contains: begin blafasel begin=%testtag name=abc% soso stop bla=fasel begin=%testtag name=abc% soso stop blafasel begin=%testtag name=abc% soso stop blafasel begin=%testtag name=abc% soso stop blafasel begin=%testtag name=abc% soso stop blafasel begin=%testtag name=abc% soso stop meta name=ef-type content=template meta name=lower-file content=%ATTRIBUTE name=lower-file% meta name=keywords content=%ATTRIBUTE name=keywords%,%COMPONENT file=/templates/hallo.html% meta name=edate content=%ATTRIBUTE name=edate% blafasel begin=%testtag name=abc% soso stop blafasel begin=%testtag name=abc% soso stop end the differences occurs at line 2(chr 37) and line 10(chr 62). both are (doublequotes) the error occurs too if I use the fread() function. Hope this is enough info I've made an upgrade to 5.02. the still occurs Christian [2004-10-21 23:22:01] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to Open. Thank you for your interest in PHP. [2004-10-15 08:35:15] christian at koch dot net Description: part of the file where problem occurs meta name=ef-type content=template meta name=lower-file content=%ATTRIBUTE name=lower-file% meta name=keywords content=%ATTRIBUTE name=keywords%,%COMPONENT file=/templates/hallo.html% meta name=edate content=%ATTRIBUTE name=edate% /part result after file_get_contents() meta name=ef-type content=template meta name=lower-file content=%ATTRIBUTE name=lower-file% meta name=keywords content=%ATTRIBUTE name=keywords%,%COMPONENT file=/templates/hallo.html% meta name=edate content=%ATTRIBUTE name=edate% /result I'm missings some () if there are outer () then the second inner () is missing. Christian Reproduce code: --- var_dump ( file_get_contents(anyfilename) ); Expected result: if i read a file i think the file shoud be read completely :-) Actual result: -- s.o. -- Edit this bug report at http://bugs.php.net/?id=30441edit=1
#30467 [Bgs]: Array expression parsing problem
ID: 30467 User updated by: cpks at btopenworld dot com Reported By: cpks at btopenworld dot com Status: Bogus Bug Type: *General Issues Operating System: N/A PHP Version: Irrelevant New Comment: Brr! Never coming back HERE again! Previous Comments: [2004-10-18 07:57:22] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Nope, this is not supposed to work at all. No bug here. [2004-10-18 03:32:53] cpks at btopenworld dot com Description: I had been assuming that the expression $a = functioncall(), $a{operator} is equivalent to functioncall(){operator} but this appears to be the untrue, at least in the case of functions returning array values. Be kind to me. I'm sure I'm being stupid. Reproduce code: --- echo getdate()[year]; Expected result: 2004 //(or whatever year it is) Actual result: -- parse error: unexpected [, expecting , or ; -- Edit this bug report at http://bugs.php.net/?id=30467edit=1
#30616 [Fbk-Csd]: Cant return as reference from offsetget() for mysqli_stmt-bind_param()
ID: 30616 User updated by: john at milsson dot nu Reported By: john at milsson dot nu -Status: Feedback +Status: Closed Bug Type: MySQLi related Operating System: Windows PHP Version: 5.0.2 New Comment: Tried to trigger this at home. But it works as expected. But: 1. This is a linux machine. 2. Home compiled 3. I'm not stressed out... 4. The code is much cleaner. My guess is that I screwd up with one of the '' in some deep nested retuen tree As I said, this code works: class ArrayObj implements ArrayAccess { private $_val; public $valAsProp; function __construct($val){ $this-_val = $val; $this-valAsProp = $this-_val; } // // ArrayAccess interface // function offsetExists($key) { return isset($this-{'_'.$key}); } function offsetGet($key) { return $this-{'get'.ucfirst($key)}();} function offsetSet($key,$val) { $this-{'_'.$key} = $val; } function offsetUnset($key){ $this-{'_'.$key} = null; } function __get($key) { return $this-{'_'.$key}; } function getVal() { return $this-_val; } } $arrayobj = new ArrayObj(new ArrayObj('an other val')); $db = new mysqli('localhost'); $stmt = $db-prepare(SELECT ? as `val`); //$stmt-bind_param('s', $arrayobj-valAsProp); //$stmt-bind_param('s', $arrayobj-val); $stmt-bind_param('s', $arrayobj['val']['val']); $stmt-execute(); $stmt-bind_result($res); $stmt-fetch(); $stmt-close(); echo \n$res\n; ? Previous Comments: [2004-10-30 00:56:11] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to Open. Thank you for your interest in PHP. [2004-10-29 21:26:35] john at milsson dot nu Description: Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference when I try to use $mysqli_stmt-bind_param('s',$arrayAccessObj['offset']); even though offsetget is declared as function offsetGet($key) { return $this-{'_'.strtolower($key)}; } -- Edit this bug report at http://bugs.php.net/?id=30616edit=1
#30619 [NEW]: class constants cannot be accessed from withing class static method
From: junk at pneyman dot com Operating system: Fedora Core 2, kernel 2.6.5 PHP version: 5.0.2 PHP Bug Type: Scripting Engine problem Bug description: class constants cannot be accessed from withing class static method Description: Seems that there's no way to address the class constant from within a static method declared in the same class. Script is parsed by the engine, but I get a warning notice: Use of undefined constant 'xxx', assuming 'xxx'. The name of the constant assumed is identical to the one I want to address. The substitution then occurs correctly, and script works. However, I couldn't find a way to call cosntant correctly to avoid warning message and guesswork from the engine. self:: resolution operator doesn't help either. Reproduce code: --- include_once(db/PostGreSqlDbProfile.php); include_once(db/MySqlDbProfile.php); class InitStingray { // constants const PostgresDb = 'PostGreSQL'; const MysqlDb = 'MySQL'; // private variables private static $currentDb = PostgresDb; private static $db = NULL; // public methods private static function initDb () { // xxx: problem addressing constant PostgresDb if (self::$currentDb == self::PostgresDb) { self::$db = new PostGreSqlDbProfile(); } // xxx: problem addressing constant MySqlDb else if (self::$currentDb = self::MysqlDb) { self::$db = new MySqlDbProfile(); } } public static function getDb () { if (self::$db == NULL) { self::initDb(); return self::$db; } else { return self::$db; } } } Expected result: Substitution of the name of the constant for its value should occur, and comparisons between variable $currentDb and predefined values Postgres and Mysql should take place. No warnings should be issued. Actual result: -- Warning is issued that the script cannot locate the constant I'm addressing, however guesses that I'm trying to call a cosntant with the same name and correctly does the substitution issuing a warning notice. -- Edit bug report at http://bugs.php.net/?id=30619edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30619r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30619r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30619r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30619r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30619r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30619r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30619r=needscript Try newer version: http://bugs.php.net/fix.php?id=30619r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30619r=support Expected behavior: http://bugs.php.net/fix.php?id=30619r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30619r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30619r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30619r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30619r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30619r=dst IIS Stability: http://bugs.php.net/fix.php?id=30619r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30619r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30619r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30619r=mysqlcfg