#29927 [NEW]: Instansiating two Tidy objects causes segfault
From: aashley at optimiser dot com Operating system: Gentoo Linux PHP version: 5.0.1 PHP Bug Type: Reproducible crash Bug description: Instansiating two Tidy objects causes segfault Description: When using Tidy in PHP5.0.1 instansiating two Tidy objects causes a segfault. This worked successfully in 5.0.0. Using Tidy snapshot from the 11th of August 2004. Reproduce code: --- Expected result: [EMAIL PROTECTED] ~ $ php test.php [EMAIL PROTECTED] ~ $ Actual result: -- [EMAIL PROTECTED] ~ $ php test.php Segmentation fault [EMAIL PROTECTED] ~ $ -- Edit bug report at http://bugs.php.net/?id=29927&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29927&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29927&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29927&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29927&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29927&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29927&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29927&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29927&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29927&r=support Expected behavior: http://bugs.php.net/fix.php?id=29927&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29927&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29927&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29927&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29927&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29927&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29927&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29927&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29927&r=float
#29627 [Opn]: Compile Failure with external gd 2.0.28
ID: 29627 User updated by: fev at ukrti dot com dot ua Reported By: fev at ukrti dot com dot ua Status: Open Bug Type: Compile Failure Operating System: Red Hat 7.3 with kernel 2.4.3 PHP Version: 4.3.8 New Comment: Bug has still alive with php 4.3.9RC2 Previous Comments: [2004-08-25 09:14:34] fev at ukrti dot com dot ua Bug has still alive. I have tried php source php4-STABLE-200408250430. My test configure command: ./configure --with-zlib=/usr/local --with-gd=/usr/local/gd2 --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-ttf --with-freetype-dir=/usr/local/freetype2 --enable-gd-native-ttf --with-gettext Result of test compiling: ext/gd/gd.o(.text+0x3639): In function `zif_imagecreatefromstring': /src/php_dev/php4-STABLE-200408250430/ext/gd/gd.c:1341: undefined reference to `gdImageCreateFromGifCtx' ext/gd/gd.o(.text+0x3a62): In function `zif_imagecreatefromgif': /src/php_dev/php4-STABLE-200408250430/ext/gd/gd.c:1497: undefined reference to `gdImageCreateFromGifCtx' ext/gd/gd.o(.text+0x3a75):/src/php_dev/php4-STABLE-200408250430/ext/gd/gd.c:1497: undefined reference to `gdImageCreateFromGif' ext/gd/gd.o(.text+0x43cc): In function `zif_imagegif': /src/php_dev/php4-STABLE-200408250430/ext/gd/gd.c:1732: undefined reference to `gdImageGifCtx' ext/gd/gd.o(.text+0xae14): In function `_php_image_convert': /src/php_dev/php4-STABLE-200408250430/ext/gd/gd.c:3746: undefined reference to `gdImageCreateFromGif' collect2: ld returned 1 exit status make: *** [sapi/cgi/php] Error 1 [2004-08-24 01:00:05] php-bugs at lists dot php dot net 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". [2004-08-16 03:27:48] [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-08-12 08:33:40] fev at ukrti dot com dot ua Description: When i try compile php 4.3.8 with external GD library 2.0.28 (with support GIF read, create) compiling hasn't done. It stopped when find fuction like óreateGIF in the gd 2.0.28. Reproduce code: --- ./configure --with-mysql=/usr/local/mysql --with-mysql-sock=/usr/local/mysql/mysql.sock --with-zlib=/usr/local --with-openssl=/usr/local/ssl --with-curl=/usr/local --with-gd=/usr/local/gd2 --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-ttf --with-freetype-dir=/usr/local/freetype2 --enable-gd-native-ttf --with-gettext --enable-calendar --enable-ftp --enable-sockets Expected result: . ext/gd/gd.o(.text+0x3639): In function `zif_imagecreatefromstring': /src/php/php-4.3.8/ext/gd/gd.c:1336: undefined reference to `gdImageCreateFromGifCtx' ext/gd/gd.o(.text+0x3a52): In function `zif_imagecreatefromgif': /src/php/php-4.3.8/ext/gd/gd.c:1492: undefined reference to `gdImageCreateFromGif' ext/gd/gd.o(.text+0x3a5c):/src/php/php-4.3.8/ext/gd/gd.c:1492: undefined reference to `gdImageCreateFromGifCtx' ext/gd/gd.o(.text+0x4392): In function `zif_imagegif': /src/php/php-4.3.8/ext/gd/gd.c:1727: undefined reference to `gdImageGifCtx' ext/gd/gd.o(.text+0xade4): In function `_php_image_convert': /src/php/php-4.3.8/ext/gd/gd.c:3741: undefined reference to `gdImageCreateFromGif' collect2: ld returned 1 exit status make: *** [sapi/cgi/php] Error 1 -- Edit this bug report at http://bugs.php.net/?id=29627&edit=1
#29923 [Fbk->Opn]: Assignment operations inside class methods not working
ID: 29923 User updated by: bugs dot php dot net at chsc dot dk Reported By: bugs dot php dot net at chsc dot dk -Status: Feedback +Status: Open Bug Type: Zend Engine 2 problem Operating System: Linux PHP Version: 5.0.1 New Comment: Sorry, it's not a bug in PHP but in the Zend Optimizer. Changing zend_optimizer.optimization_level from 15 to 0 in php.ini fixes the problem. We'll report this to Zend. Previous Comments: [2004-09-01 08:39:24] [EMAIL PROTECTED] Extra note: this works fine for me. [2004-09-01 08:39:09] [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-08-31 19:24:44] bugs dot php dot net at chsc dot dk Description: When called from inside a class method, $this->foo += 2 does not increment the variable. $this->foo = $this->foo + 2 appears to work, though. This looks related to bug 27798. Reproduce code: --- bar += 2; var_dump($this->bar); var_dump(get_object_vars($this)); } } $f = new foo(); $f->baz(); $f->bar += 4; var_dump($f->bar); ?> Expected result: int(3) array(1) { ["bar"]=> int(3) } int(7) Actual result: -- int(1) array(2) { ["bar"]=> int(1) [0]=> int(2) } int(5) -- Edit this bug report at http://bugs.php.net/?id=29923&edit=1
#29923 [Opn->Bgs]: Assignment operations inside class methods not working
ID: 29923 User updated by: bugs dot php dot net at chsc dot dk Reported By: bugs dot php dot net at chsc dot dk -Status: Open +Status: Bogus Bug Type: Zend Engine 2 problem Operating System: Linux PHP Version: 5.0.1 New Comment: Marking Bogus Previous Comments: [2004-09-01 09:29:18] bugs dot php dot net at chsc dot dk Sorry, it's not a bug in PHP but in the Zend Optimizer. Changing zend_optimizer.optimization_level from 15 to 0 in php.ini fixes the problem. We'll report this to Zend. [2004-09-01 08:39:24] [EMAIL PROTECTED] Extra note: this works fine for me. [2004-09-01 08:39:09] [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-08-31 19:24:44] bugs dot php dot net at chsc dot dk Description: When called from inside a class method, $this->foo += 2 does not increment the variable. $this->foo = $this->foo + 2 appears to work, though. This looks related to bug 27798. Reproduce code: --- bar += 2; var_dump($this->bar); var_dump(get_object_vars($this)); } } $f = new foo(); $f->baz(); $f->bar += 4; var_dump($f->bar); ?> Expected result: int(3) array(1) { ["bar"]=> int(3) } int(7) Actual result: -- int(1) array(2) { ["bar"]=> int(1) [0]=> int(2) } int(5) -- Edit this bug report at http://bugs.php.net/?id=29923&edit=1
#29927 [Opn->Fbk]: Instansiating two Tidy objects causes segfault
ID: 29927 Updated by: [EMAIL PROTECTED] Reported By: aashley at optimiser dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Gentoo Linux 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 Works fine for me, please try a snapshot. Previous Comments: [2004-09-01 08:59:33] aashley at optimiser dot com Description: When using Tidy in PHP5.0.1 instansiating two Tidy objects causes a segfault. This worked successfully in 5.0.0. Using Tidy snapshot from the 11th of August 2004. Reproduce code: --- Expected result: [EMAIL PROTECTED] ~ $ php test.php [EMAIL PROTECTED] ~ $ Actual result: -- [EMAIL PROTECTED] ~ $ php test.php Segmentation fault [EMAIL PROTECTED] ~ $ -- Edit this bug report at http://bugs.php.net/?id=29927&edit=1
#29920 [Opn->Fbk]: empty session_id() is created for Safari browser
ID: 29920 Updated by: [EMAIL PROTECTED] Reported By: mbarskey at seattletech dot com -Status: Open +Status: Feedback Bug Type: Session related Operating System: Red Hat Linux release 7.3 PHP Version: 4.3.8 New Comment: If safari is the only browser that borks, why do you think it's a bug in PHP? Previous Comments: [2004-08-31 18:26:04] mbarskey at seattletech dot com Description: PHP 4.3.8 under Linux Red Hat 7.3, Apache 1.3.31 session_id() returns a null or empty string when hit from the Safari browser under Mac OS X. The extremely simple sample code below works as expected from Netscape (7.2 OS X or 7.1 Win2K) and IE (5.2.3 OS X or 6.0.2800.1106 Win2K), but it creates a session without a session_id when hit from Safari for OS X. All Apache and PHP configurations are identical when hit by working browsers and by Safari. The session gets created and seems to work fine, but there is no session_id. I'm concerned that if 2 different Safari users hit the page simultaneously, they would share the session file. I'm somewhat of a PHP novice, and I've never posted a PHP bug before (I figured people who knew what they were doing would find a bug before I did!), so please don't flame me for doing this incorrectly; instead, tell me how I can better help you (or where I an find a solution - I've searched!). I searched for a previous bug with this decription before posting, but didn't find any. Also, I'm on a shared server, so I cannot try a CVS version. My PHP installation info can be found at http://www.seattletech.com/phpinfo.php. Just in case, here was the configure command: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-mcrypt' '--enable-magic-quotes' '--with-mysql' '--enable-discard-path' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib' ...and here is the session info: Session Support enabled Registered save handlers files user Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid On On ...and here is the .htaccess file I'm using: php_value session.save_handler 'user' php_value session.save_path 'php_sessions' php_value auto_prepend_file '/home/seattlet/public_html/registration/mysql_session_handler.php' php_value include_path ".:../" php_flag register_globals off php_flag session.use_trans_sid 1 php_flag log_errors 1 php_value error_log '/home/seattlet/public_html/registration/error_log.txt' php_flag cgi.rfc2616_headers 0 Thanks! - Mike Reproduce code: --- Expected result: the session id is: bf76a978c98f980340bcfffe87987e22 Actual result: -- the session id is: -- Edit this bug report at http://bugs.php.net/?id=29920&edit=1
#29917 [Com]: isset() always return
ID: 29917 Comment by: fch at hexanet dot fr Reported By: dasch at ulmail dot net Status: Bogus Bug Type: Class/Object related Operating System: Linux PHP Version: 5.0.1 New Comment: array[$name] = $value; } function __get($name) { if (isset($this->array[$name]) == true) return null; else return $this->array[$name]; } } $o = new oo(); $o->foo = 'bar'; echo (isset($o->foo) == true ? 'foo is set' : 'foo is not set'); #Expecting result # => foo is set #Real result # => foo is not set ?> If PHP provide __set() and __get() function in order to create property dynamicaly, PHP function like isset() MUST BE USED with these "dynamic" properties as usual. So, in my example, isset() MUST return TRUE !! and not FALSE !! Previous Comments: [2004-09-01 08:41:52] [EMAIL PROTECTED] This works fine for me: [EMAIL PROTECTED]:~$ cat bug29917.php a) ? "yes\n" : "no\n"; $o->a = 'bar'; echo isset($o->a) ? "yes\n" : "no\n"; ?> [EMAIL PROTECTED]:~$ php bug29917.php no yes Come up with a short example like mine that shows that it doesn't work. Just saying $o->a won't work doesn't help. [2004-08-31 19:35:52] dasch at ulmail dot net Still not resolved, you still have to use the following code to access the properties: $a = $o->a; echo isset($a) ? "yes\n" : "no\n"; Another guy thought that it would be neat if there was a __isset magic method. [2004-08-31 16:27:11] fch at hexanet dot fr Sorry, but if you do that : $o->a = 'foo'; echo isset($o->a) ? "yes\n" : "no\n"; Expected result was true, but actual result is false ! And $o->a is set ! [2004-08-31 16:20:45] [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 This is correct, the isset() checks if a variable is set or not. In your case it\'s simply not set (it will be set after __get() is executed on it once). [2004-08-31 16:00:43] dasch at ulmail dot net Description: When trying to determine whether or not a property in an overloaded object is set, isset() always returns FALSE. This is not the case with objects that isn't overloaded (doesn't have a __get() method defined). Reproduce code: --- 1); public function __get ($prop) { if (isset($this->elem[$prop])) { return $this->elem[$prop]; } else { return NULL; } } public function __set ($prop, $val) { $this->elem[$prop] = $val; } } $o = new OO(); echo isset($o->a) ? "yes\n" : "no\n"; echo isset($o->b) ? "yes\n" : "no\n"; echo is_null($o->a) ? "yes\n" : "no\n"; echo is_null($o->b) ? "yes\n" : "no\n"; ?> Expected result: yes no no yes Actual result: -- no no no yes -- Edit this bug report at http://bugs.php.net/?id=29917&edit=1
#29928 [NEW]: glob() returns false instead of an ampty array, again
From: rossen dot radonov at ecad dot tu-sofia dot bg Operating system: Solaris 8 PHP version: 4.3.9RC2 PHP Bug Type: *Directory/Filesystem functions Bug description: glob() returns false instead of an ampty array, again Description: glob() returns false instead of an empty array. I was using version 4.3.7 and everything was OK. Then I upgraded to 4.3.9RC1 and 4.3.9RC2 and the problem appeared. I looked in the bug-report database and saw simillar problems, then downloaded the php4-STABLE-200409010630 version, compiled it and the results were the same. Is this a bug or a normal behavior? Reproduce code: --- $files = glob("/some_empty_dir/*"); var_dump($files); Expected result: array(0) { } Actual result: -- bool(false) -- Edit bug report at http://bugs.php.net/?id=29928&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29928&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29928&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29928&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29928&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29928&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29928&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29928&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29928&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29928&r=support Expected behavior: http://bugs.php.net/fix.php?id=29928&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29928&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29928&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29928&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29928&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29928&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29928&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29928&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29928&r=float
#29917 [Bgs]: isset() always return
ID: 29917 Updated by: [EMAIL PROTECTED] Reported By: dasch at ulmail dot net Status: Bogus Bug Type: Class/Object related Operating System: Linux PHP Version: 5.0.1 New Comment: No, you're wrong. The behavior you see is the correct behavior. Previous Comments: [2004-09-01 09:59:01] fch at hexanet dot fr array[$name] = $value; } function __get($name) { if (isset($this->array[$name]) == true) return null; else return $this->array[$name]; } } $o = new oo(); $o->foo = 'bar'; echo (isset($o->foo) == true ? 'foo is set' : 'foo is not set'); #Expecting result # => foo is set #Real result # => foo is not set ?> If PHP provide __set() and __get() function in order to create property dynamicaly, PHP function like isset() MUST BE USED with these "dynamic" properties as usual. So, in my example, isset() MUST return TRUE !! and not FALSE !! [2004-09-01 08:41:52] [EMAIL PROTECTED] This works fine for me: [EMAIL PROTECTED]:~$ cat bug29917.php a) ? "yes\n" : "no\n"; $o->a = 'bar'; echo isset($o->a) ? "yes\n" : "no\n"; ?> [EMAIL PROTECTED]:~$ php bug29917.php no yes Come up with a short example like mine that shows that it doesn't work. Just saying $o->a won't work doesn't help. [2004-08-31 19:35:52] dasch at ulmail dot net Still not resolved, you still have to use the following code to access the properties: $a = $o->a; echo isset($a) ? "yes\n" : "no\n"; Another guy thought that it would be neat if there was a __isset magic method. [2004-08-31 16:27:11] fch at hexanet dot fr Sorry, but if you do that : $o->a = 'foo'; echo isset($o->a) ? "yes\n" : "no\n"; Expected result was true, but actual result is false ! And $o->a is set ! [2004-08-31 16:20:45] [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 This is correct, the isset() checks if a variable is set or not. In your case it\'s simply not set (it will be set after __get() is executed on it once). 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/29917 -- Edit this bug report at http://bugs.php.net/?id=29917&edit=1
#29917 [Com]: isset() always return
ID: 29917 Comment by: fch at hexanet dot fr Reported By: dasch at ulmail dot net Status: Bogus Bug Type: Class/Object related Operating System: Linux PHP Version: 5.0.1 New Comment: Can you explain where are wrong ??? A call to __set() create a property in the object (see documentation). Event if this property is not a real member property for PHP language point of view, for the programers point of view, it is a property ! So, isset() MUST return true in my example. What are difference between your example : $o->a = 'bar'; echo isset($o->a) ? "yes\n" : "no\n"; And my example : $o->foo = 'bar'; echo (isset($o->foo) == true ? 'foo is set' : 'foo is not set'); There is no difference ! Except that my foo property was created with a __set() call. Previous Comments: [2004-09-01 10:14:10] [EMAIL PROTECTED] No, you're wrong. The behavior you see is the correct behavior. [2004-09-01 09:59:01] fch at hexanet dot fr array[$name] = $value; } function __get($name) { if (isset($this->array[$name]) == true) return null; else return $this->array[$name]; } } $o = new oo(); $o->foo = 'bar'; echo (isset($o->foo) == true ? 'foo is set' : 'foo is not set'); #Expecting result # => foo is set #Real result # => foo is not set ?> If PHP provide __set() and __get() function in order to create property dynamicaly, PHP function like isset() MUST BE USED with these "dynamic" properties as usual. So, in my example, isset() MUST return TRUE !! and not FALSE !! [2004-09-01 08:41:52] [EMAIL PROTECTED] This works fine for me: [EMAIL PROTECTED]:~$ cat bug29917.php a) ? "yes\n" : "no\n"; $o->a = 'bar'; echo isset($o->a) ? "yes\n" : "no\n"; ?> [EMAIL PROTECTED]:~$ php bug29917.php no yes Come up with a short example like mine that shows that it doesn't work. Just saying $o->a won't work doesn't help. [2004-08-31 19:35:52] dasch at ulmail dot net Still not resolved, you still have to use the following code to access the properties: $a = $o->a; echo isset($a) ? "yes\n" : "no\n"; Another guy thought that it would be neat if there was a __isset magic method. [2004-08-31 16:27:11] fch at hexanet dot fr Sorry, but if you do that : $o->a = 'foo'; echo isset($o->a) ? "yes\n" : "no\n"; Expected result was true, but actual result is false ! And $o->a is set ! 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/29917 -- Edit this bug report at http://bugs.php.net/?id=29917&edit=1
#29929 [NEW]: array_walk_recursive unusable in mod_php
From: jr at terragate dot net Operating system: Gentoo Linux 1.4 PHP version: 5.0.1 PHP Bug Type: Reproducible crash Bug description: array_walk_recursive unusable in mod_php Description: An Apache child (1.3.x and 2.0.x prefork) crashes if a call to array_walk_recursive has been made in a previous request. For this reason this bug isn't reproduceable with php-cgi nor php-cli. To reliably reproduce this bug run apache (with mod_php) in single process mode (-X) to be sure that the same process will serve the two requests and request the given page twice (or any other php page as second request). PHP configure: './configure' '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc/php/apache1-php5' '--without-pear' '--disable-bcmath' '--without-bz2' '--disable-calendar' '--without-jpeg-dir' '--without-cpdflib' '--disable-ctype' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--disable-dio' '--disable-exif' '--without-fam' '--without-fbsql' '--without-fdftk' '--disable-filepro' '--disable-ftp' '--with-gettext' '--without-gmp' '--without-hwapi' '--without-iconv' '--without-informix' '--without-ingres' '--without-interbase' '--enable-mbstring' '--with-mcrypt' '--without-openssl-dir' '--without-mcve' '--disable-memory-limit' '--without-mhash' '--without-mime-magic' '--without-ming' '--without-mnogosearch' '--without-msql' '--without-mssql' '--with-ncurses' '--without-oci8' '--without-oracle' '--with-openssl' '--without-ovrimos' '--enable-pcntl' '--without-pfpro' '--without-pgsql' '--with-pspell' '--without-recode' '--disable-simplexml' '--disable-shmop' '--without-snmp' '--disable-soap' '--disable-sockets' '--disable-spl' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--without-xsl' '--without-xmlrpc' '--disable-yp' '--with-zlib' '--without-cdb' '--with-db4' '--without-dbm' '--without-flatfile' '--with-gdbm' '--without-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-jis-conf' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-tiff-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-ldap' '--without-ldap-sasl' '--with-mysql' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--without-mm' '--without-msession' '--without-sqlite' '--enable-dba' '--with-readline' '--without-libedit' Reproduce code: --- array('bar' => 'baz')); array_walk_recursive($nested_array, 'process_value'); ?> Expected result: No Segmentation fault Actual result: -- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 15154)] 0x0006 in ?? () (gdb) bt #0 0x0006 in ?? () #1 0x4062404f in zend_call_function (fci=0xbfffcd60, fci_cache=0x4083458c) at /var/tmp/portage/mod_php-5.0.1/work/php-5.0.1/Zend/zend_execute_API.c:853 #2 0x4056dfa0 in php_array_walk (target_hash=0x81724ac, userdata=0x0, recursive=1) at /var/tmp/portage/mod_php-5.0.1/work/php-5.0.1/ext/standard/array.c:1045 #3 0x4056de86 in php_array_walk (target_hash=0x81725fc, userdata=0x0, recursive=1) at /var/tmp/portage/mod_php-5.0.1/work/php-5.0.1/ext/standard/array.c:1019 #4 0x4056e3f7 in zif_array_walk_recursive (ht=2, return_value=0x81725b4, this_ptr=0x0, return_value_used=0) at /var/tmp/portage/mod_php-5.0.1/work/php-5.0.1/ext/standard/array.c:1135 #5 0x40651739 in execute_internal (execute_data_ptr=0xbfffd030, return_value_used=0) at /var/tmp/portage/mod_php-5.0.1/work/php-5.0.1/Zend/zend_execute.c:1347 #6 0x4083f0ba in apd_execute_internal (execute_data_ptr=0x6, return_value_used=6) at /tmp/tmphGEKR6/apd-1.0/php_apd.c:538 #7 0x406552f1 in zend_do_fcall_common_helper (execute_data=0xbfffd030, opline=0x8176acc, op_array=0x81723b4) at /var/tmp/portage/mod_php-5.0.1/work/php-5.0.1/Zend/zend_execute.c:2710 #8 0x406559ad in zend_do_fcall_handler (execute_data=0xbfffd030, opline=0x8176acc, op_array=0x81723b4) at /var/tmp/portage/mod_php-5.0.1/work/php-5.0.1/Zend/zend_execute.c:2840 #9 0x406518da in execute (op_array=0x81723b4) at /var/tmp/portage/mod_php-5.0.1/work/php-5.0.1/Zend/zend_execute.c:1400 #10 0x4083f01a in apd_execute (op_array=0x81723b4) at /tmp/tmphGEKR6/apd-1.0/php_apd.c:518 #11 0x4062f5ac in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /var/tmp/portage/mod_php-5.0.1/work/php-5.0.1/Zend/zend.c:1061 #12 0x405eaf14 in php_execute_script (primary_file=0xb3e0) at /var/tmp/portage/mod_php-5.0.1/work/php-5.0.1/main/main.c:1627 #13 0x4065d18e in apache_php_module_main (r=0x8161d28, display_source_mode=0) at /var/tmp/portage/mod_php-5.0.1/work/php-5.0.1/sapi/apache/sapi_apache.c:54 #14 0x4065e123 in send_php (r=0x8161d28, display_source
#29928 [Opn->Bgs]: glob() returns false instead of an ampty array, again
ID: 29928 Updated by: [EMAIL PROTECTED] Reported By: rossen dot radonov at ecad dot tu-sofia dot bg -Status: Open +Status: Bogus Bug Type: *Directory/Filesystem functions Operating System: Solaris 8 PHP Version: 4.3.9RC2 New Comment: Duplicate of bug #28649 (which was closed). I reopened that one and marking this one as bogus (as it was already reported). Previous Comments: [2004-09-01 10:05:44] rossen dot radonov at ecad dot tu-sofia dot bg Description: glob() returns false instead of an empty array. I was using version 4.3.7 and everything was OK. Then I upgraded to 4.3.9RC1 and 4.3.9RC2 and the problem appeared. I looked in the bug-report database and saw simillar problems, then downloaded the php4-STABLE-200409010630 version, compiled it and the results were the same. Is this a bug or a normal behavior? Reproduce code: --- $files = glob("/some_empty_dir/*"); var_dump($files); Expected result: array(0) { } Actual result: -- bool(false) -- Edit this bug report at http://bugs.php.net/?id=29928&edit=1
#28649 [Csd->Opn]: glob() nomatch return false
ID: 28649 Updated by: [EMAIL PROTECTED] Reported By: xuefer at 21cn dot com -Status: Closed +Status: Open Bug Type: Directory function related Operating System: linux PHP Version: 4.3.7 New Comment: Reopening because of: http://bugs.php.net/bug.php?id=29928 Previous Comments: [2004-06-06 18:21:34] [EMAIL PROTECTED] 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. [2004-06-06 15:06:13] xuefer at 21cn dot com Description: i don't know what this modify do, but it broke what the comment say. relatived to #28289 ? http://bugs.php.net/bug.php?id=28289 @@ -388,10 +390,14 @@ /* Linux handles no matches as an error condition, but FreeBSD * doesn't. This ensure that if no match is found, an empty array * is always returned so it can be used without worrying in e.g. * foreach() */ +#if __linux__ + RETURN_FALSE; +#else array_init(return_value); return; +#endif Reproduce code: --- php -r 'var_dump(glob("abcdefg"));' Expected result: an empty array() Actual result: -- bool(false) -- Edit this bug report at http://bugs.php.net/?id=28649&edit=1
#29608 [Com]: OCi reports OCIStmtExecute: ORA-24324: service handle not initialized
ID: 29608 Comment by: marcus dot schuelke at juj dot de Reported By: tomek at matrox dot pl Status: No Feedback Bug Type: OCI8 related Operating System: W2k, Red Hat PHP Version: 5.0.0 New Comment: This Bug is caused by PHP 5 to fix the problem use oci_new_connect ( username,password, db) instead of ocilogon(); hope that will fix your problem.. Previous Comments: [2004-09-01 02:51:44] cnichols at nmu dot edu Same problem over here. Running PHP 5.0.1 with Apache2 and Oracle 10g. I found a site saying that errmsg has to do with a soon-to-expire password, but I doubt that's the case for all of you :) [2004-08-30 10:21:46] symedeot at yahoo dot fr I have exactly the same problem ! If works sometimes, sometime not. If you ask the same page again, it should work or not... Warning: oci_execute() [function.oci-execute]: OCIStmtExecute: ORA-24324: descripteur de service non initialisé in ... Warning: ocifetch() [function.ocifetch]: OCIFetch: ORA-24338: descripteur d'instruction non exécuté in... Just try to access Oracle like this : $conn = OCILogon("GPE", "gpe","PLSE"); $stmt = OCIParse($conn,$myrequest); OCI_Execute($stmt,OCI_DEFAULT); while ( OCIFetch($stmt) ) { } OCIFreeStatement($stmt); OCILogoff($conn); Oracle 9.i under RedHat 9, php 5.00 and 5.01(same), any Apache 2 version. Everything fine on same server when using PHP 4.3x It is clearly a bug ! And we are quite a lot to report it ! [2004-08-19 01:00:08] php-bugs at lists dot php dot net 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". [2004-08-12 11:02:53] izhekov at ppartner dot com I've tried to reproduce this problem. I've installed 2 apache services on different ports 80 and 81 - first of them using PHP5 and the other using PHP4 then I restarted the system. When first I access my scripts using PHP5 on port 80 everythings goes fine. Running scripts afterthat with PHP4 on port 81 also worked fine. When I tried to access again scripts on apache service running on 80 port, errors occured again: - Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-24324: service handle not initialized in C:\SERVER\HTTPD\htdocs\service\db_modul.php on line 21 Warning: ocifetch() [function.ocifetch]: OCIFetch: ORA-24338: statement handle not executed in C:\SERVER\HTTPD\htdocs\service\db_modul.php on line 27 -- [2004-08-12 10:09:03] izhekov at ppartner dot com I migrate from PHP 4 to PHP 5 on my Windows 2003 server. Everything goes fine, but when I try to use an PHP application that uses Oracle database I receive the error mentioned above. I restarted the Oracle server but that not helped me. Other applications and PHP 4 works fine with my Oracle server, but PHP 5 did not. Last night the power supply goes down unexpectally and both Oracle server and web server was restarted. Now everything seems to be fine, but I'm sure the problem exists and many people will have the same problems also. Searching in Google for: http://www.google.com/search?hl=bg&ie=UTF-8&q=%22service+handle+not+initialized+in%22+%2Bwarning&lr= shows many sites with the same problem. 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/29608 -- Edit this bug report at http://bugs.php.net/?id=29608&edit=1
#29917 [Bgs]: isset() always return
ID: 29917 User updated by: dasch at ulmail dot net Reported By: dasch at ulmail dot net Status: Bogus Bug Type: Class/Object related Operating System: Linux PHP Version: 5.0.1 New Comment: If the isset() function aren't going to work with properties accessed with a __get() call, then there should at least be a __isset() method that allows for custom isset()-handling. eg: $prop)) { return TRUE; } else { return FALSE; } } } $foo = new Foo(); echo isset($foo->bar) ? "yes\n" : "no\n"; // Should be the same as echo $foo->__isset('bar') ? "yes\n" : "no\n"; ?> Previous Comments: [2004-09-01 10:24:01] fch at hexanet dot fr Can you explain where are wrong ??? A call to __set() create a property in the object (see documentation). Event if this property is not a real member property for PHP language point of view, for the programers point of view, it is a property ! So, isset() MUST return true in my example. What are difference between your example : $o->a = 'bar'; echo isset($o->a) ? "yes\n" : "no\n"; And my example : $o->foo = 'bar'; echo (isset($o->foo) == true ? 'foo is set' : 'foo is not set'); There is no difference ! Except that my foo property was created with a __set() call. [2004-09-01 10:14:10] [EMAIL PROTECTED] No, you're wrong. The behavior you see is the correct behavior. [2004-09-01 09:59:01] fch at hexanet dot fr array[$name] = $value; } function __get($name) { if (isset($this->array[$name]) == true) return null; else return $this->array[$name]; } } $o = new oo(); $o->foo = 'bar'; echo (isset($o->foo) == true ? 'foo is set' : 'foo is not set'); #Expecting result # => foo is set #Real result # => foo is not set ?> If PHP provide __set() and __get() function in order to create property dynamicaly, PHP function like isset() MUST BE USED with these "dynamic" properties as usual. So, in my example, isset() MUST return TRUE !! and not FALSE !! [2004-09-01 08:41:52] [EMAIL PROTECTED] This works fine for me: [EMAIL PROTECTED]:~$ cat bug29917.php a) ? "yes\n" : "no\n"; $o->a = 'bar'; echo isset($o->a) ? "yes\n" : "no\n"; ?> [EMAIL PROTECTED]:~$ php bug29917.php no yes Come up with a short example like mine that shows that it doesn't work. Just saying $o->a won't work doesn't help. [2004-08-31 19:35:52] dasch at ulmail dot net Still not resolved, you still have to use the following code to access the properties: $a = $o->a; echo isset($a) ? "yes\n" : "no\n"; Another guy thought that it would be neat if there was a __isset magic method. 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/29917 -- Edit this bug report at http://bugs.php.net/?id=29917&edit=1
#29930 [NEW]: Type hint error message should reveal both class names
From: reiersol at online dot no Operating system: any PHP version: 5.0.1 PHP Bug Type: Feature/Change Request Bug description: Type hint error message should reveal both class names Description: When you have a type-hint error, the error message reports only the class the object should be, not the type it actually is: Argument 1 must be an instance of Bar in hints.php on line 3 My experience so far indicates it would be tremendously helpful in debugging to know what class the object actually belongs to. As it is, I have to to *remove* the type hint and add a test inside the method to get that information. (I typically throw an exception to get a full stack trace.) Reproduce code: --- class Foo { public function process(Bar $bar) {} } class Bar {} class Baz {} $foo = new Foo; $foo->process(new Baz); Expected result: Desired result: Argument 1 is an instance of Baz, must be an instance of Bar in hints.php on line 3 Actual result: -- Argument 1 must be an instance of Bar in hints.php on line 3 -- Edit bug report at http://bugs.php.net/?id=29930&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29930&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29930&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29930&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29930&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29930&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29930&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29930&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29930&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29930&r=support Expected behavior: http://bugs.php.net/fix.php?id=29930&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29930&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29930&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29930&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29930&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29930&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29930&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29930&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29930&r=float
#29926 [Bgs]: display_errors setting ignored
ID: 29926 User updated by: scott at slerman dot net Reported By: scott at slerman dot net Status: Bogus Bug Type: *Configuration Issues Operating System: Fedora Core 2 PHP Version: 5.0.1 New Comment: Good point. I had checked phpinfo(), and it said error_reporting was 4095, so I figured it couldn't have been that. I discovered a .htaccess file that was setting error_reporting to 2048 (which, in my own defense, I don't remember ever creating). Will remember this next time. Previous Comments: [2004-09-01 08:00:17] [EMAIL PROTECTED] Which errors are shown (error level) has to do with error_reporting, not display_errors. [2004-09-01 05:51:42] scott at slerman dot net Description: The php.ini setting display_errors seems to be ignored; no errors are displayed, even if display_errors is turned on. Reproduce code: --- "; echo $foo . "bar"; $foo[bar] = "phpinfo()"; ?> Expected result: There should be warning messages about $foo being undefined and the constant "bar" being undefined. Actual result: -- Output is: 1 bar As far as I know, the first line being 1 means that display_errors is on. -- Edit this bug report at http://bugs.php.net/?id=29926&edit=1
#27889 [Com]: Warning: Unknown list entry type in request shutdown (2) in Unknown on line 0
ID: 27889 Comment by: nonemorenegative at yahoo dot com Reported By: mike at zrcalo dot si Status: No Feedback Bug Type: Unknown/Other Function Operating System: WIN32 PHP Version: 4CVS-2004-04-06 (stable) New Comment: I get similar errors: Warning: Unknown list entry type in request shutdown (2) in Unknown on line 0 Warning: Unknown list entry type in request shutdown (2) in E:\Web\xf\index.php on line 2 Warning: Unknown list entry type in request shutdown (2) in E:\Web\xf\lib\func.lib on line 7 Basically the first error, I don't know what the problem is, but the following two - it appears there is a repeated error anytime I then try to do an include in my code on that page. The problem is only resolved by rebooting the server - quite a pain in the butt after the 4th or 5th time in a day. JC Previous Comments: [2004-04-20 02:21:18] gus at pbx dot org I am experiencing the same issue intermitently on a Win2k3 Server running several builds of php from 4.3.4 on up.. the only way to correct is with a server reset.. occurs after about ~10 hours or 500,000 hits. [2004-04-12 17:55:01] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. [2004-04-07 05:00:03] [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-04-06 11:30:37] mike at zrcalo dot si Description: Hi ! I'm running todays CVS snapshot. WIN32 (2000 and XP) with IIS And still having problems: Warning: Unknown list entry type in request shutdown (2) in Unknown on line 0 Reproduce code: --- any ! -- Edit this bug report at http://bugs.php.net/?id=27889&edit=1
#29920 [Fbk->Opn]: empty session_id() is created for Safari browser
ID: 29920 User updated by: mbarskey at seattletech dot com Reported By: mbarskey at seattletech dot com -Status: Feedback +Status: Open Bug Type: Session related Operating System: Red Hat Linux release 7.3 PHP Version: 4.3.8 New Comment: I'm not sure it's a PHP bug. But since PHP creates the session files and the session_id (web browsers don't), I thought the problem of certain sessions not getting a session_id was PHP's fault - even though it only seems to happen for one browser. - Mike Previous Comments: [2004-09-01 09:46:46] [EMAIL PROTECTED] If safari is the only browser that borks, why do you think it's a bug in PHP? [2004-08-31 18:26:04] mbarskey at seattletech dot com Description: PHP 4.3.8 under Linux Red Hat 7.3, Apache 1.3.31 session_id() returns a null or empty string when hit from the Safari browser under Mac OS X. The extremely simple sample code below works as expected from Netscape (7.2 OS X or 7.1 Win2K) and IE (5.2.3 OS X or 6.0.2800.1106 Win2K), but it creates a session without a session_id when hit from Safari for OS X. All Apache and PHP configurations are identical when hit by working browsers and by Safari. The session gets created and seems to work fine, but there is no session_id. I'm concerned that if 2 different Safari users hit the page simultaneously, they would share the session file. I'm somewhat of a PHP novice, and I've never posted a PHP bug before (I figured people who knew what they were doing would find a bug before I did!), so please don't flame me for doing this incorrectly; instead, tell me how I can better help you (or where I an find a solution - I've searched!). I searched for a previous bug with this decription before posting, but didn't find any. Also, I'm on a shared server, so I cannot try a CVS version. My PHP installation info can be found at http://www.seattletech.com/phpinfo.php. Just in case, here was the configure command: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-mcrypt' '--enable-magic-quotes' '--with-mysql' '--enable-discard-path' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib' ...and here is the session info: Session Support enabled Registered save handlers files user Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid On On ...and here is the .htaccess file I'm using: php_value session.save_handler 'user' php_value session.save_path 'php_sessions' php_value auto_prepend_file '/home/seattlet/public_html/registration/mysql_session_handler.php' php_value include_path ".:../" php_flag register_globals off php_flag session.use_trans_sid 1 php_flag log_errors 1 php_value error_log '/home/seattlet/public_html/registration/error_log.txt' php_flag cgi.rfc2616_headers 0 Thanks! - Mike Reproduce code: --- Expected result: the session id is: bf76a978c98f980340bcfffe87987e22 Actual result: -- the session id is: -- Edit this bug report at http://bugs.php.net/?id=29920&edit=1
#29797 [Com]: mkdir function doesn't work correctly when path contains forward slashes
ID: 29797 Comment by: alex dot pagnoni at solarix dot it Reported By: arnoud at procurios dot nl Status: Open Bug Type: Directory function related Operating System: Windows XP PHP Version: 5.0.0 New Comment: Actual workaround is to check for underlying os (look inside $_ENV['OS']) and, if it is Windows, convert all forward slashes using str_replace(). Previous Comments: [2004-08-23 14:41:27] arnoud at procurios dot nl Description: The 'mkdir' function doesn't function correctly on Windows when the path contains forward slashes. The part of the path with the forward slashes doesn't get created. Reproduce code: --- Expected result: Two directories should have been created: c:\a\b\c\d, and c:\e\f\g\h Actual result: -- Actual directories being created: c:\a\b\c\d, and C:\e\f -- Edit this bug report at http://bugs.php.net/?id=29797&edit=1
#29931 [NEW]: Accessing a class' array via foreach causes no output
From: mattmecham at gmail dot com Operating system: Apache/1.3.31 (Unix) PHP version: 5.0.1 PHP Bug Type: Reproducible crash Bug description: Accessing a class' array via foreach causes no output Description: Unless something dramatic has changed in the way objects are handled, the code here will cause the browser to show "This document contains no data" whatever the subsequent output from the script. No entries into the apache error_log are made and E_ALL shows no errors. Problem seems to be with "foreach( $newclass->test_array...". Commenting this out removes the problem as does: $tmp = $newclass->test_array foreach( $tmp as $i ) Can give entire phpinfo() if required. Reproduce code: --- error_reporting ( E_ALL ); class someclass { var $test_array = array(); } $newclass = new someclass(); # Populate with dummy data.. for( $i=0; $i < 100 ; $i++ ) { $newclass->test_array[] = $i; } foreach( $newclass->test_array as $i ) { print $i."\n"; } print "Test"; exit(); -- Edit bug report at http://bugs.php.net/?id=29931&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29931&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29931&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29931&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29931&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29931&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29931&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29931&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29931&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29931&r=support Expected behavior: http://bugs.php.net/fix.php?id=29931&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29931&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29931&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29931&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29931&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29931&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29931&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29931&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29931&r=float
#29932 [NEW]: Array Memory Allocation Error With register_globals set to "On"
From: joshua dot montgomery at middlebrow dot com Operating system: Debian PHP version: 4.3.8 PHP Bug Type: Scripting Engine problem Bug description: Array Memory Allocation Error With register_globals set to "On" Description: We fixed this bug by setting Register_Globals to "Off", but we were also making other changes on the server to solve it, so that might not have been the fix. We are using the following code to store database entries in memory for use later on in the page When allocating memory for an array dynamically using a sql_query the values came out as strings, rather than arrays. I took all of the error checking out of the code below to make it more clear. We use this code to dump an array to a select menu creation function. It should be noted that this bug doesn't always appear, but seems to be produced for larger arrays (10 - 25) rather than arrays containing 2 or 3 entries. It should also be noted that adding the statement "$ArrayVariable = array()" before the following code also solves the problem. Reproduce code: --- $rslt = mysql_query("SQL") $i = 0; while ($row = mysql_fetch_array($rslt)) { $ArrayVariable[$i]['Value'] = $row['SQL_Text Value']; $ArrayVariable[$i]['Label'] = $row['SQL_Text Label']; $i++; } print_r($ArrayVariable); Expected result: Array ( [0] => Array ( [Value] => 145 [Label] => Adair, Kris ) [1] => Array ( [Value] => 20 [Label] => Bailey, Wayne ) [2] => Array ( [Value] => 22 [Label] => Bartos, Alan ) [3] => Array ( [Value] => 24 [Label] => Beatty, Marsha ) ) Actual result: -- Array ( [0] => 1A [1] => 2B [2] => 2B [3] => 2B ) -- Edit bug report at http://bugs.php.net/?id=29932&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29932&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29932&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29932&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29932&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29932&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29932&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29932&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29932&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29932&r=support Expected behavior: http://bugs.php.net/fix.php?id=29932&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29932&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29932&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29932&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29932&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29932&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29932&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29932&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29932&r=float
#22427 [Com]: Missing Form Post Data
ID: 22427 Comment by: php at vorien dot com Reported By: jroland at uow dot edu dot au Status: No Feedback Bug Type: *General Issues Operating System: Windows XP / 2000 PHP Version: 4.2.3 New Comment: I'm running Windows 2000 (IIS5) with PHP 5.01, and I'm having the same problem. A simple script: Data Example Will post a number of characters, which seems to change based on how many crlfs there are in it. At a certain number of characters (I'm trying to figure out what number exactly, but it seems to vary based on the number of characters that need encoding), the script will just time out. This is becoming a significant issue, since I'm trying to migrate a server. The old one was on PHP 4.3.3/IIS 5 (Win2k), and it works fine using the same code. I've diff'd the php.ini files and phpinfo() outputs of both servers+, but there are no relevant differences. (The new versions have additional parameters in the ini files, so they aren't exactly the same.) I've even tried using the 4.3.3 ini file. Help? Michael Previous Comments: [2004-08-02 13:51:23] admin at ensifex dot nl After updating from 4.3.7 to 4.3.8 i'm loosing POST data. If i create a form with normal text fields and not to much input data there doesn't seem to be a problem. If i use with a text larger 985 characters the post data is not send. Used this script to test: Untitled if i add 'enctype="multipart/form-data"' to the form. All post data is send. php version : 4.3.8 os: OpenBSD 3.5-current apache: 1.3.29 [2004-07-30 22:11:28] gary at garyslittlecompany dot com I too am experiencing what has been described in the this submission. I think I have isolated it to php on windows. I summarize it thus because I have an xp, w2k3 and wme servers that experience the same problem. Yes I have used the latest version as of today 4.3.9 build date 7/30/04. I have scripts that have alot of post data, a table full of input objects, the table can be quite large. If I exceed a certain amount (I know it is not an arbitrary size, but I don't know what the size is, but I can duplicate it). Below are my scripts. '; for ($l = 0; $l < 100; ++$l) { print "First Name\r\n"; print "Last Name\r\n"; print "City\r\n"; print "State\r\n"; } print ''; ?> This simply provides my form with a lot of input elements in my html. When submitted it will call the following script "; print_r($_POST); ?> Here is the output 6559 Array ( ) Now if I change my script (action = "cgi-bin\post.ext") to call the following c compiled script... #include #include #include main() { char *endptr; int i; double contentlength; char buff[1]; char a,b; const char *len1 = getenv("CONTENT_LENGTH"); contentlength=strtol(len1, &endptr, 10); fread(buff, contentlength, 1, stdin); printf("Content-type: text/html\n\n%s",buff); } to do the same thing essentially I will get the following 5B95%5D=&lastname%5B95%5D=&city%5B95%5D=&state%5B95%5D=&firstname%5B96%5D=&lastname%5B96%5D=&city%5B96%5D=&state%5B96%5D=&firstname%5B97%5D=&lastname%5B97%5D=&city%5B97%5D=&state%5B97%5D=&firstname%5B98%5D=&lastname%5B98%5D=&city%5B98%5D=&state%5B98%5D=&firstname%5B99%5D=&lastname%5B99%5D=&city%5B99%5D=&state%5B99%5D= This is just a portion of the data that I get, it happens to be the last of the output do demonstrate that I do get the last of the input elements, notice city%5b99%5d, this is the 99th city element, the loop goes from 0-99. Now if you reduce the loop to be 0-5 for example (for ($l = 0; $l < 5; ++$l)) I get the following output when I use the first script (action = "post.php"). 309firstname%5B0%5D=&lastname%5B0%5D=&city%5B0%5D=&state%5B0%5D=&firstname%5B1%5D=&lastname%5B1%5D=&city%5B1%5D=&state%5B1%5D=&firstname%5B2%5D=&lastname%5B2%5D=&city%5B2%5D=&state%5B2%5D=&firstname%5B3%5D=&lastname%5B3%5D=&city%5B3%5D=&state%5B3%5D=&firstname%5B4%5D=&lastname%5B4%5D=&city%5B4%5D=&state%5B4%5D= Array ( [firstname] => Array ( [0] => [1] => [2] => [3] => [4] => ) [lastname] => Array ( [0] => [1] => [2] => [3] => [4] => ) [city] => Array ( [0] => [1] => [2] => [3] => [4] => ) [state] => Array ( [0] => [1] => [2] => [3] => [4] => ) ) The first part is the raw post data, the last is the $_POST variable. I did the c compiled script, simply to rule out my webserver (apache 1.3.27). [2004-07-17 17:51:19] c dot neise at gmx dot de I have also the first of these problems. The script below reproduces the bug. When entering a small amount of data, the data is displayed. With a large amount of data (e.g. a screen full of letters pasted into
#29780 [Fbk->Opn]: Constructor isn't called if a class is extended from a built in class
ID: 29780 User updated by: d dot khan at ventigo dot com Reported By: d dot khan at ventigo dot com -Status: Feedback +Status: Open Bug Type: Unknown/Other Function Operating System: * PHP Version: 5.* New Comment: weird. PHP Version 5.0.1 PDO: Version 0.1.1 Release Date2004-05-21 PDO_MYSQL: Version 0.1 Release Date2004-05-18 Spits out that error. Previous Comments: [2004-08-29 08:10:08] [EMAIL PROTECTED] Works fine for me with latest PHP and PDO. Btw, this is not ZE problem, reclassifying. [2004-08-26 20:32:26] [EMAIL PROTECTED] HINT to all extension developers: Constructors of internal classes need to have the name '__construct' rather that the class's name. [2004-08-25 22:46:08] d dot khan at ventigo dot com You example works - mine doesn't. It seems to be an oddity with extensions... Example code: Output: Called in child Warning: PDO::__construct() expects at least 1 parameter, 0 given in /home/shares/development/khan/wandern/html/test.php on line 19 [2004-08-23 18:20:12] [EMAIL PROTECTED] This code: works fine and outputs 'Called in child' for me. Please, check it one more time and/or try newer snapshot. [2004-08-21 11:58:01] d dot khan at ventigo dot com Description: Hello, maybe this is bogus but I found a situation where the OOP engine doesn't behave as - at least I - would expect. I tried to extend the PDO extension and my local construct method isn't called. The engine always calls the parent construct method. Greetings Daniel Khan Reproduce code: --- Class rltxPDO extends PDO { function __construct() { echo 'Called in child'; } public static function instance() { static $instance; if (!$instance) { $instance = new rltxPDO(); } return $instance; } } Expected result: Output: Called in child Actual result: -- Warning: PDO::__construct() expects at least 1 parameter, 0 given -- Edit this bug report at http://bugs.php.net/?id=29780&edit=1
#29920 [Opn]: empty session_id() is created for Safari browser
ID: 29920 User updated by: mbarskey at seattletech dot com Reported By: mbarskey at seattletech dot com Status: Open Bug Type: Session related Operating System: Red Hat Linux release 7.3 PHP Version: 4.3.8 New Comment: I forgot to mention: I tried having Safari "disguise" itself by sending other browsers' ID's in the header, but it didn't help. - Mike Previous Comments: [2004-09-01 16:53:26] mbarskey at seattletech dot com I'm not sure it's a PHP bug. But since PHP creates the session files and the session_id (web browsers don't), I thought the problem of certain sessions not getting a session_id was PHP's fault - even though it only seems to happen for one browser. - Mike [2004-09-01 09:46:46] [EMAIL PROTECTED] If safari is the only browser that borks, why do you think it's a bug in PHP? [2004-08-31 18:26:04] mbarskey at seattletech dot com Description: PHP 4.3.8 under Linux Red Hat 7.3, Apache 1.3.31 session_id() returns a null or empty string when hit from the Safari browser under Mac OS X. The extremely simple sample code below works as expected from Netscape (7.2 OS X or 7.1 Win2K) and IE (5.2.3 OS X or 6.0.2800.1106 Win2K), but it creates a session without a session_id when hit from Safari for OS X. All Apache and PHP configurations are identical when hit by working browsers and by Safari. The session gets created and seems to work fine, but there is no session_id. I'm concerned that if 2 different Safari users hit the page simultaneously, they would share the session file. I'm somewhat of a PHP novice, and I've never posted a PHP bug before (I figured people who knew what they were doing would find a bug before I did!), so please don't flame me for doing this incorrectly; instead, tell me how I can better help you (or where I an find a solution - I've searched!). I searched for a previous bug with this decription before posting, but didn't find any. Also, I'm on a shared server, so I cannot try a CVS version. My PHP installation info can be found at http://www.seattletech.com/phpinfo.php. Just in case, here was the configure command: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-mcrypt' '--enable-magic-quotes' '--with-mysql' '--enable-discard-path' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib' ...and here is the session info: Session Support enabled Registered save handlers files user Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid On On ...and here is the .htaccess file I'm using: php_value session.save_handler 'user' php_value session.save_path 'php_sessions' php_value auto_prepend_file '/home/seattlet/public_html/registration/mysql_session_handler.php' php_value include_path ".:../" php_flag register_globals off php_flag session.use_trans_sid 1 php_flag log_errors 1 php_value error_log '/home/seattlet/public_html/registration/error_log.txt' php_flag cgi.rfc2616_headers 0 Thanks! - Mike Reproduce code: --- Expected result: the session id is: bf76a978c98f980340bcfffe87987e22 Actual result: -- the session id is: -- Edit this bug report at http://bugs.php.net/?id=29920&edit=1
#29933 [NEW]: Certain subject Line characters cause mail() to fail
From: b dot parish at arts dot ac dot uk Operating system: Windows 2000 SP 4 PHP version: 4.3.8 PHP Bug Type: Mail related Bug description: Certain subject Line characters cause mail() to fail Description: The mail function cannot send the email has certain characters. For instance the following will not work $subject = "Joe bloggs edited the Personnel Record of Joe bloggs"; If I strip out the 'd's, it does work: $subject = "Joe bloggs edite the Personnel Recor of Joe bloggs"; mail("[EMAIL PROTECTED]", $subject, "test", ""); My php.ini has the following values: [mail function] ; For Win32 only. SMTP = mail.arts.ac.uk ; For Win32 only. sendmail_from = [EMAIL PROTECTED] The problem also occurs on Linux running PHP Version 4.3.2 Looking in /var/log/maillog: Sep 1 17:41:57 www-b sendmail[27241]: i81GfvD27241: from=nobody, size=92, class=0, nrcpts=1, msgid=<[EMAIL PROTECTED]>, [EMAIL PROTECTED] Sep 1 17:41:57 www-b sendmail[27244]: i81GfvD27241: [EMAIL PROTECTED], ctladdr=nobody (99/99), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30092, relay=mail.linst.ac.uk [195.195.78.11], dsn=2.0.0, stat=Sent (OK id=1C2YBJ-0002Nd-00) Reproduce code: --- $subject = "Joe bloggs edited the Personnel Record of Joe bloggs"; mail("[EMAIL PROTECTED]", $subject, "test", ""); Expected result: An email is sent with: to/from: [EMAIL PROTECTED] subject: 'Joe bloggs edited the Personnel Record of Joe bloggs' body: 'test' Actual result: -- No email is sent at all. -- Edit bug report at http://bugs.php.net/?id=29933&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29933&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29933&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29933&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29933&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29933&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29933&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29933&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29933&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29933&r=support Expected behavior: http://bugs.php.net/fix.php?id=29933&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29933&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29933&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29933&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29933&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29933&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29933&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29933&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29933&r=float
#29933 [Opn]: Certain subject Line characters cause mail() to fail
ID: 29933 User updated by: b dot parish at arts dot ac dot uk Reported By: b dot parish at arts dot ac dot uk Status: Open Bug Type: Mail related Operating System: Windows 2000 SP 4 PHP Version: 4.3.8 New Comment: I am investigating the possibility that it is a problem with our mail relay software. The problem can be replicated using a standard email client and therefore it is very unlikely to be PHP related. I will report back once we have done more diagnostics. Previous Comments: [2004-09-01 18:50:49] b dot parish at arts dot ac dot uk Description: The mail function cannot send the email has certain characters. For instance the following will not work $subject = "Joe bloggs edited the Personnel Record of Joe bloggs"; If I strip out the 'd's, it does work: $subject = "Joe bloggs edite the Personnel Recor of Joe bloggs"; mail("[EMAIL PROTECTED]", $subject, "test", ""); My php.ini has the following values: [mail function] ; For Win32 only. SMTP = mail.arts.ac.uk ; For Win32 only. sendmail_from = [EMAIL PROTECTED] The problem also occurs on Linux running PHP Version 4.3.2 Looking in /var/log/maillog: Sep 1 17:41:57 www-b sendmail[27241]: i81GfvD27241: from=nobody, size=92, class=0, nrcpts=1, msgid=<[EMAIL PROTECTED]>, [EMAIL PROTECTED] Sep 1 17:41:57 www-b sendmail[27244]: i81GfvD27241: [EMAIL PROTECTED], ctladdr=nobody (99/99), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30092, relay=mail.linst.ac.uk [195.195.78.11], dsn=2.0.0, stat=Sent (OK id=1C2YBJ-0002Nd-00) Reproduce code: --- $subject = "Joe bloggs edited the Personnel Record of Joe bloggs"; mail("[EMAIL PROTECTED]", $subject, "test", ""); Expected result: An email is sent with: to/from: [EMAIL PROTECTED] subject: 'Joe bloggs edited the Personnel Record of Joe bloggs' body: 'test' Actual result: -- No email is sent at all. -- Edit this bug report at http://bugs.php.net/?id=29933&edit=1
#26321 [Com]: 'ld: warning multiple definitions' problem
ID: 26321 Comment by: cheemeng at function dot com Reported By: grayw at mail dot montclair dot edu Status: Bogus Bug Type: Compile Failure Operating System: Mac OS X 10.3.2 PHP Version: 5CVS-2004-01-2 New Comment: installing PHP-4.3.4 on Pentium 3 PC/FreeBSD 5.2.1 using ports. make crashes output : Configuring PEAR checking whether to install PEAR ... yes configure: error: PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line. PEAR requires XML to be enabled. Add --enable-xml to the configure line. ===> Script "configure" failed unexpectedly. . *** Error code 1 *** Stop in /usr/ports/lang/php4 Previous Comments: [2004-07-24 01:29:46] gmclachl at cis dot strath dot ac dot uk I have tried the default version of Apache in OSX (10.3.4) and 1.3.31 and each time it returns this error. However other users have managed to compile it successfully with 1.3.31. [2004-01-02 20:37:12] [EMAIL PROTECTED] This is some Apache bug. As you can see, the conflict is between httpd and some system libs. Not PHP. [2004-01-02 13:36:00] grayw at mail dot montclair dot edu I tried it one more time with all three previous tests: --without-pcre-regex --without-pear --disable-mbstring which gives a slightly different output during make. so the config now looks like: ./configure --mandir=/usr/share/man --infodir=/usr/ share/info --with-apxs2=/Library/Apache2/bin/apxs -- with-openssl --with-zlib --with-zlib-dir=/usr/lib -- with-bz2 --enable-calendar --with-libxml-dir=/usr/ local --with-gd --with-ldap --disable-mbstring -- with-mcrypt --with-openssl-dir=/usr/include/openssl -- with-mhash --with-mime-magic=/usr/share/file/magic.mime --with-mysql=/Library/MySQL --with-pgsql=/usr/local/ postgres --enable-sockets --with-xsl=/Library/PHP4 -- prefix=/Library/PHP5 --with-png-dir=/usr/local --with- jpeg-dir=/usr/local/ --without-pcre-regex --without-pear and the output error is: ld: warning multiple definitions of symbol _regcomp /Library/Apache2.panther/bin/httpd definition of _regcomp /usr/lib/libm.dylib(regcomp.So) definition of _regcomp ld: warning multiple definitions of symbol _regexec /Library/Apache2.panther/bin/httpd definition of _regexec /usr/lib/libm.dylib(regexec.So) definition of _regexec ld: warning multiple definitions of symbol _regfree /Library/Apache2.panther/bin/httpd definition of _regfree /usr/lib/libm.dylib(regfree.So) definition of _regfree ld: Undefined symbols: _PQparameterStatus _PQprotocolVersion _PQtransactionStatus _pg_encoding_to_char _pg_char_to_encoding _pg_encoding_mblen make: *** [libs/libphp5.bundle] Error 1 [2004-01-02 13:15:16] grayw at mail dot montclair dot edu I removed my beta 2 sources last week, and so I'm trying this now with beta 3. Also, I have updated my development host to Mac OS X 10.3.2. I don't believe that the beta2 source is still available via www.php.net (can't find it). My results (for what it's worth) are quite similar, tried --disable-mbstring like you asked. If you would like me to keep working with the beta 2 source, I need some access to it. Output where make fails: (for beta 3 and latest beta 3 snapshot): ld: warning multiple definitions of symbol _pcre_free ext/pcre/pcrelib/pcre.o definition of _pcre_free in section (__DATA,__data) /Library/Apache2.panther/bin/httpd definition of _pcre_free ld: warning multiple definitions of symbol _pcre_malloc ext/pcre/pcrelib/pcre.o definition of _pcre_malloc in section (__DATA,__data) /Library/Apache2.panther/bin/httpd definition of _pcre_malloc ld: warning multiple definitions of symbol _regcomp /Library/Apache2.panther/bin/httpd definition of _regcomp /usr/lib/libm.dylib(regcomp.So) definition of _regcomp ld: warning multiple definitions of symbol _regexec /Library/Apache2.panther/bin/httpd definition of _regexec /usr/lib/libm.dylib(regexec.So) definition of _regexec ld: warning multiple definitions of symbol _regfree /Library/Apache2.panther/bin/httpd definition of _regfree /usr/lib/libm.dylib(regfree.So) definition of _regfree ld: Undefined symbols: _PQparameterStatus _PQprotocolVersion _PQtransactionStatus _pg_encoding_to_char _pg_char_to_encoding _pg_encoding_mblen make: *** [libs/libphp5.bundle] Error 1 [2004-01-02 10:48:01] [EMAIL PROTECTED] Does adding --disable-mbstring into configure line make this work? 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.
#28209 [Com]: strtotime("now")
ID: 28209 Comment by: tony at marston-home dot demon dot co dot uk Reported By: gamin at centras dot lt Status: Assigned Bug Type: Date/time related Operating System: WinXP HE SP1 PHP Version: 5.0.0RC2 Assigned To: derick New Comment: Until this behaviour is fixed so that now() means 'real now' and not 'GNU now' here is a workaround that works in both PHP 4 and PHP 5: $real_now = date('Y-m-d H:i:s'); $dt1 = strtotime("$real_now -1 day"); $dt2 = date('Y-m-d H:i:s', $dt1); Previous Comments: [2004-07-15 09:21:31] kilnight at hotmail dot com I've been using strtotime() to calculate relative shifts in time, ie. $real_now = strtotime("2004-07-15 00:16:35"); $exactly_one_day_ago = strtotime("-1 day", $real_now); echo date('Y-m-d H:i:s', $exactly_one_day_ago) Expecting "2004-07-14 00:16:35" but getting: "2004-07-14 00:00:00" I'm sure there's a way around this, but I'm really not that bright... so I had to jump back to php4 for the time being. So I also think that the "now" parameter should be real now, not GNU "now". [2004-07-12 21:50:07] patchwork14 at hotmail dot com Will this bug be fixed before the final php5 release? A lot of code will need rewriting before php5 is released if "now" is going to changed. Wouldn't it be better to have today = Monday 12th of July 2004 12:00:00 AM now = Monday 12th of July 2004 08:49:23 PM [2004-07-05 11:13:44] niels dot hansen at pola dot dk The functionality is maintained in RC3. I needs the realtime for logging of process. My workaround is to do this: $str=date('d F Y h:i:s A'); $timestamp = strtotime("$str"); [2004-06-15 12:42:47] wb at pro-net dot co dot uk So how would one, for example, use strtotime() to get the current time + 10 mins? [2004-05-19 12:33:35] [EMAIL PROTECTED] That's feasible for the rewrite, but for the current parser. 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/28209 -- Edit this bug report at http://bugs.php.net/?id=28209&edit=1
#29934 [NEW]: fsockopen() does not support SSL/TLS with shares OpenSSL extension
From: mranner at jawa dot at Operating system: FreeBSD 4.10 PHP version: 4.3.8 PHP Bug Type: OpenSSL related Bug description: fsockopen() does not support SSL/TLS with shares OpenSSL extension Description: fsockopen() does not support SSL/TLS with shared OpenSSL extension. PHP 4.3.8 build from FreeBSD Ports with shared extenstions. Extension is loaded according phpinfo(). Squirrelmail and other applications cannot use fsockopen() with tls. I need to compile PHP4 with the static OpenSSL extension. Reproduce code: --- $imap_server_address = 'tls://cyrus'; $imap_port = 993; $imap_stream = fsockopen ( $imap_server_address, $imap_port, $error_number, $error_string, 15); Expected result: A successful TLS connection. Actual result: -- Warning: fsockopen(): no SSL support in this build -- Edit bug report at http://bugs.php.net/?id=29934&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29934&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29934&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29934&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29934&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29934&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29934&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29934&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29934&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29934&r=support Expected behavior: http://bugs.php.net/fix.php?id=29934&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29934&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29934&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29934&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29934&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29934&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29934&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29934&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29934&r=float
#29934 [Opn->Bgs]: fsockopen() does not support SSL/TLS with shares OpenSSL extension
ID: 29934 Updated by: [EMAIL PROTECTED] Reported By: mranner at jawa dot at -Status: Open +Status: Bogus Bug Type: OpenSSL related Operating System: FreeBSD 4.10 PHP Version: 4.3.8 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. It's known, it's been reported (many times) and can't be fixed within the framework of PHP4. PHP5 however abstracts transports out in a way that makes it all work whether OpenSSL is compiled as a shared module or staticly. For PHP4, your only option is to compile the module staticly. To bodge dynamic registration of ssl:// and tls:// transports into PHP4 would represent a major code change which will not happen within a point release. Previous Comments: [2004-09-01 19:59:29] mranner at jawa dot at Description: fsockopen() does not support SSL/TLS with shared OpenSSL extension. PHP 4.3.8 build from FreeBSD Ports with shared extenstions. Extension is loaded according phpinfo(). Squirrelmail and other applications cannot use fsockopen() with tls. I need to compile PHP4 with the static OpenSSL extension. Reproduce code: --- $imap_server_address = 'tls://cyrus'; $imap_port = 993; $imap_stream = fsockopen ( $imap_server_address, $imap_port, $error_number, $error_string, 15); Expected result: A successful TLS connection. Actual result: -- Warning: fsockopen(): no SSL support in this build -- Edit this bug report at http://bugs.php.net/?id=29934&edit=1
#29935 [NEW]: array_filter crashes Apache 2
From: webmaster at martialartsmovies dot net Operating system: Windows XP PHP version: 5.0.1 PHP Bug Type: Arrays related Bug description: array_filter crashes Apache 2 Description: I have PHP 5.0.1 installed together with the latest stable Apache 2 on Windows XP SP2. I used the example on the array_filter page on php.net an all I got was a window telling me that apache caused a problem and it needed to reboot. Reproduce code: --- 1, "b"=>2, "c"=>3, "d"=>4, "e"=>5); $array2 = array(6, 7, 8, 9, 10, 11, 12); echo "Odd :\n"; print_r(array_filter($array1, "odd")); echo "Even:\n"; print_r(array_filter($array2, "even")); ?> Expected result: the array_filter function applied to the 2 arrays Actual result: -- apache 2 crashed. error.log: [Wed Sep 01 19:47:14 2004] [notice] Child 2412: Child process is running [Wed Sep 01 19:47:14 2004] [notice] Child 2412: Acquired the start mutex. [Wed Sep 01 19:47:14 2004] [notice] Child 2412: Starting 250 worker threads. [Wed Sep 01 19:50:15 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting. -- Edit bug report at http://bugs.php.net/?id=29935&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29935&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29935&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29935&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29935&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29935&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29935&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29935&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29935&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29935&r=support Expected behavior: http://bugs.php.net/fix.php?id=29935&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29935&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29935&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29935&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29935&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29935&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29935&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29935&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29935&r=float
#29283 [Opn->Ana]: Statement isn't valid anymore warning during executing prepared mysqi queries
ID: 29283 Updated by: [EMAIL PROTECTED] Reported By: divisor at ad69 dot com -Status: Open +Status: Analyzed Bug Type: MySQL related Operating System: FreeBSD 4.10 PHP Version: 5.0.0 -Assigned To: +Assigned To: georg Previous Comments: [2004-08-20 14:47:35] paradox at gmx dot at i've got the same problem with php 5.0.1 loaded as an apache module - mysql 4.1.3beta, win2k it seems that the error occurs more often on much used servers. on my dedicated test-server it is approximately one error on 100 statements. [2004-08-03 08:48:09] alex at avannaproductions dot com I'll chime in as another voice of reason: this should be fixed before 5.0.1. At the moment, prepared statements are basically useless, as half the time they give this error and fail to return any data. I'm on MacOS X and Apache 2, with the same problem. [2004-07-25 18:33:46] dev at edwinchu dot info Hi, I have got the same problem. I am using PHP5 release with MySQL4.1.3-beta. The code is simple: $mysqli = new mysqli(); // connected successfully $stmt = $mysqli->prepare("SOME VALID QUERY"); $stmt->execute(); // No problem here $mysqli2 = $mysqli; $mysqli2->query("THE SAME QUERY"); // Still OK $stmt2 = $mysqli2->prepare("THE SAME QUERY"); $stmt2->execute(); The last line failed and returning "Warning: Statement isn't valid anymore in xxx". [2004-07-21 16:24:11] divisor at ad69 dot com it caused randomly on all statetments, prepare() was ok but execute() failed: if ($stmt=$DB->prepare("select something from table where name=?")) { $stmt->bind_param('s',$name); $stmt->execute(); // HERE PHP WRITE WARNING // AND STMT COINTAIN NO DATA variables stmt->error, stmt->errno are empty that's strange but after removing lines 182-187 from ext/mysqli/php_mysqli.h: if (!strcmp((char *)__name, "mysqli_stmt")) {\ if (!((MYSQL_STMT *)__ptr)->mysql) {\ php_error(E_WARNING, "Statement isn't valid anymore");\ RETURN_NULL();\ }\ }\ } it started working without any problems. but of course this 'hack' of php code isn't good ;) [2004-07-21 10:03:11] [EMAIL PROTECTED] Please provide a short script, where we can see where the error occurs. Also try to catch the errormessages via ->stmt_error/errno properties. 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/29283 -- Edit this bug report at http://bugs.php.net/?id=29283&edit=1
#29922 [Fbk->Opn]: Huge memory usage in file copy of big files
ID: 29922 User updated by: info at pion dot xs4all dot nl Reported By: info at pion dot xs4all dot nl -Status: Feedback +Status: Open Bug Type: *Directory/Filesystem functions Operating System: Linux PHP Version: 5.0.1 New Comment: I have checked again but i can't find the bug report. I have tested with "5.1.0-dev" with checked out version 200409011830 but the problem is still there. Previous Comments: [2004-09-01 08:44:03] [EMAIL PROTECTED] I'm sure there is already a bugreport for this, and afaik somebody also worked on an attempt to fix it. Can you try a PHP 5.1.0-dev snapshot please? (http://naps.php.net) [2004-08-31 22:03:04] info at pion dot xs4all dot nl - The observation was on rhel 3 with php 4.3.2 - The test in the report was done on a FC1 system with php 4.3.3 - Now i have checked php 4.3.8 on fc2 (the default php) and php 5.0.1 Al have the same result although the speed diferences on the fc2 system are smaller. This could be caused by different hardware or differences in the linux vm (2.4.X versus 2.6.X) [2004-08-31 19:07:04] info at pion dot xs4all dot nl Description: If you copy a file of N megabytes (N in the order of a few hundred megs) your proces will use the same order of ammount of memory (or less if the system doesn't have that much). This is probably because the file is compleetly memory mapped and than the content is written to an other file. Probably it will be better to use the behavior of the unix "cp" command which reads 4k and than writes the 4k. In this way "cp" is almost a factor two faster than php and has less impact on the system performance. Reproduce code: --- Expected result: The unix "cp" needed 1 minut 8 seconds to copy the file and php used 2 and 18 seconds on my desktop system with 512mb. Actual result: -- They should be in the same order -- Edit this bug report at http://bugs.php.net/?id=29922&edit=1
#29900 [Com]: Variables can't hold more than 42.56KB
ID: 29900 Comment by: seanstansell at gmail dot com Reported By: amir29 at comcast dot net Status: Open Bug Type: Performance problem Operating System: Win32 PHP Version: 5.0.1 New Comment: Having same (well...almost) problem. Mine are actually capping out at 100,000 bytes (97.6kb). Windows 2000/PHP 5.01 Previous Comments: [2004-08-30 17:21:26] amir29 at comcast dot net Description: Whether I use curl, file_get_contents, or fgets php will not put more 42.56kb ... well occassionaly (randomly) it will but most of the time it won't. I tried increasing the max memory use from 8M to 64M to no avail. This bug is in 4.3.5-4.3.9 and 5.01 Reproduce code: --- $page = file_get_contents(any web page larger than 100kb); echo $page // will only display 43kb; Expected result: echo $page // display 100kb Actual result: -- echo $page //displays 42.56kb -- Edit this bug report at http://bugs.php.net/?id=29900&edit=1
#29283 [Com]: Statement isn't valid anymore warning during executing prepared mysqi queries
ID: 29283 Comment by: corey_gilmore at dpc dot senate dot gov Reported By: divisor at ad69 dot com Status: Analyzed Bug Type: MySQL related Operating System: FreeBSD 4.10 PHP Version: 5.0.0 Assigned To: georg New Comment: I'm experiencing the same issue as well with Apache 1.3.31 and 2.0.50 on XP SP2 and XP SP1 with PHP 5.0, 5.01 and 5.0-DEV from php5-win32-200408312230.zip. MySQL 4.1a, 4.1.2, 4.1.3 and now 4.1.4. It occurs in a page where I select a large amount of data from one table, process it, and insert it into multiple tables. There are 287 rows returned from the first select, and then 400-500 rows inserted. Line 644 begins with 'if( !$stmt->execute() ) {' Warning: Statement isn't valid anymore in ...\import\contact.class.inc.php on line 644 Error inserting email (#0): INSERT INTO email (EmailType, Email, ContactID) VALUES (?, ?, ?); $sql = "INSERT INTO {$kTABLE_PREFIX}email (EmailType, Email, ContactID) VALUES (?, ?, ?)"; if( !$stmt = $db->prepare($sql) ) { // prepare it printf("Error with %s:%s",$sql, $db->error ); } if( !$stmt->bind_param("ssi", $addr->EmailType, $addr->Email, $ContactID ) ) { printf("Error (#%d): %s;%s%s : %s : %s", $stmt->errno, $sql, $stmt->error, $addr->EmailType, $addr->Email, $ContactID ); } if( !$stmt->execute() ) { printf("Error inserting email (#%d): %s;%s%s : %s : %i", $stmt->errno, $sql, $stmt->error, $addr->EmailType, $addr->Email, $ContactID ); $this->dump(); printf("\$stmt = %s", var_export($stmt, TRUE) ); } This has been an issue since RC1, and is a bit frustrating. In my case reloading the page to re-import works, eventually, but since the entire process takes about 5 minutes it is painful. Previous Comments: [2004-08-20 14:47:35] paradox at gmx dot at i've got the same problem with php 5.0.1 loaded as an apache module - mysql 4.1.3beta, win2k it seems that the error occurs more often on much used servers. on my dedicated test-server it is approximately one error on 100 statements. [2004-08-03 08:48:09] alex at avannaproductions dot com I'll chime in as another voice of reason: this should be fixed before 5.0.1. At the moment, prepared statements are basically useless, as half the time they give this error and fail to return any data. I'm on MacOS X and Apache 2, with the same problem. [2004-07-25 18:33:46] dev at edwinchu dot info Hi, I have got the same problem. I am using PHP5 release with MySQL4.1.3-beta. The code is simple: $mysqli = new mysqli(); // connected successfully $stmt = $mysqli->prepare("SOME VALID QUERY"); $stmt->execute(); // No problem here $mysqli2 = $mysqli; $mysqli2->query("THE SAME QUERY"); // Still OK $stmt2 = $mysqli2->prepare("THE SAME QUERY"); $stmt2->execute(); The last line failed and returning "Warning: Statement isn't valid anymore in xxx". [2004-07-21 16:24:11] divisor at ad69 dot com it caused randomly on all statetments, prepare() was ok but execute() failed: if ($stmt=$DB->prepare("select something from table where name=?")) { $stmt->bind_param('s',$name); $stmt->execute(); // HERE PHP WRITE WARNING // AND STMT COINTAIN NO DATA variables stmt->error, stmt->errno are empty that's strange but after removing lines 182-187 from ext/mysqli/php_mysqli.h: if (!strcmp((char *)__name, "mysqli_stmt")) {\ if (!((MYSQL_STMT *)__ptr)->mysql) {\ php_error(E_WARNING, "Statement isn't valid anymore");\ RETURN_NULL();\ }\ }\ } it started working without any problems. but of course this 'hack' of php code isn't good ;) [2004-07-21 10:03:11] [EMAIL PROTECTED] Please provide a short script, where we can see where the error occurs. Also try to catch the errormessages via ->stmt_error/errno properties. 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/29283 -- Edit this bug report at http://bugs.php.net/?id=29283&edit=1
#29922 [Opn]: Huge memory usage in file copy of big files
ID: 29922 User updated by: info at pion dot xs4all dot nl Reported By: info at pion dot xs4all dot nl Status: Open Bug Type: *Directory/Filesystem functions Operating System: Linux PHP Version: 5.0.1 New Comment: I have a small patch for the 5.1.0-dev which solves the problem but: This patch says a normal copy should be used for files bigger then 32 MB. But this is an rather arbitrary value choosen by me. Here follows the patch: -diff -Naur org/php5-200409011830/main/streams/streams.c php5-200409011830/main/streams/streams.c --- org/php5-200409011830/main/streams/streams.c2004-08-31 14:30:59.0 +0200 +++ php5-200409011830/main/streams/streams.c2004-09-01 22:06:11.579747624 +0200 @@ -1276,7 +1276,12 @@ } } - if (php_stream_mmap_possible(src)) { +/* +** We shouldn't use memory mapping on big files just for copying them. +** It's not an efficient sollution for the vm. So for files above +** 32mb (32*1024^2=33554432) we want a normal copy +*/ + if ((php_stream_mmap_possible(src)) && (ssbuf.sb.st_size < 33554432)) { char *p; size_t mapped; -- Previous Comments: [2004-09-01 21:55:01] info at pion dot xs4all dot nl I have checked again but i can't find the bug report. I have tested with "5.1.0-dev" with checked out version 200409011830 but the problem is still there. [2004-09-01 08:44:03] [EMAIL PROTECTED] I'm sure there is already a bugreport for this, and afaik somebody also worked on an attempt to fix it. Can you try a PHP 5.1.0-dev snapshot please? (http://naps.php.net) [2004-08-31 22:03:04] info at pion dot xs4all dot nl - The observation was on rhel 3 with php 4.3.2 - The test in the report was done on a FC1 system with php 4.3.3 - Now i have checked php 4.3.8 on fc2 (the default php) and php 5.0.1 Al have the same result although the speed diferences on the fc2 system are smaller. This could be caused by different hardware or differences in the linux vm (2.4.X versus 2.6.X) [2004-08-31 19:07:04] info at pion dot xs4all dot nl Description: If you copy a file of N megabytes (N in the order of a few hundred megs) your proces will use the same order of ammount of memory (or less if the system doesn't have that much). This is probably because the file is compleetly memory mapped and than the content is written to an other file. Probably it will be better to use the behavior of the unix "cp" command which reads 4k and than writes the 4k. In this way "cp" is almost a factor two faster than php and has less impact on the system performance. Reproduce code: --- Expected result: The unix "cp" needed 1 minut 8 seconds to copy the file and php used 2 and 18 seconds on my desktop system with 512mb. Actual result: -- They should be in the same order -- Edit this bug report at http://bugs.php.net/?id=29922&edit=1
#29937 [NEW]: $_FILES['name'] no longer has full path (from 4.3.4 to 4.3.8)
From: justin at timelesstech dot com Operating system: FreeBSD 4.8 stable PHP version: 4.3.8 PHP Bug Type: *Directory/Filesystem functions Bug description: $_FILES['name'] no longer has full path (from 4.3.4 to 4.3.8) Description: We have had scripts running for a while now fine on PHP 4.3.4 that assume that the $_FILES['name'] value on file uploads contains the full /path/to/the/filename.txt However after our server admins upgraded to PHP 4.3.8 the $FILES['name'] now only contains the filename, with no path. This makes it impossible for our recursive file uploader script to work, since it NEEDS the pathname of those files to know what directory/subdir on the server to upload the file(s) to! The changelog does not mention this, but does anybody have any ideas? -- Edit bug report at http://bugs.php.net/?id=29937&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29937&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29937&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29937&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29937&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29937&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29937&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29937&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29937&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29937&r=support Expected behavior: http://bugs.php.net/fix.php?id=29937&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29937&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29937&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29937&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29937&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29937&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29937&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29937&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29937&r=float
#706 [Com]: explode("\0", anystring) crashes
ID: 706 Comment by: 9988 at 9988 dot idv dot tw Reported By: sgk at happysize dot co dot jp Status: Closed Bug Type: Reproducible Crash Operating System: Solaris 2.5.1, FreeBSD 2.1.5 PHP Version: 3.0.3 New Comment: 123 Previous Comments: [1998-08-30 16:15:01] zeev Fixed, empty delimiters are no longer allowed [1998-08-30 14:04:48] sgk at happysize dot co dot jp Script like results in bus error or segmentation violation. I believe that the PHP string is not a sort of C string which is not able to contain a null \0 character. -- Edit this bug report at http://bugs.php.net/?id=706&edit=1
#29441 [Com]: After copying a class, changes to new class affect old class.
ID: 29441 Comment by: itDept at ilevelinternet dot com Reported By: php at cyruslesser dot com Status: Bogus Bug Type: Class/Object related Operating System: * PHP Version: 5.* New Comment: Hello, I found out today that an application that we developed using PHP 4 no longer works properly because of what Cyruslesser pointed out. If enough people are having a problem with this would it be feasible in the next release of PHP 5 that a new php.ini variable exist to tell PHP to either make a copy of an instance of a class or to pass the pointer to the information when one istance of a class is set equal to another variable like in Cyruslessers example when $b = $a? Thanks in advance for taking the time to answer my question. Previous Comments: [2004-08-31 04:14:29] php at cyruslesser dot com BTW, for anyone else reading this who also had trouble finding the documention, check this URL which is details the changes in the Zend 2 engine: http://www.php.net/zend-engine-2.php Specifically, the solution to my problem was very simple: $new_object = clone $old_object; Although I still feel that always forcing passing objects by reference to functions is a bit silly, I'm willing to live with it for the sake of the many great improvements to PHP5. Thanks. Cyrus [2004-08-03 03:38:32] [EMAIL PROTECTED] http://zend.com/manual/migration5.oop.php scroll down to "Objects Cloning" [2004-08-03 03:30:50] php at cyruslesser dot com Sorry, that was supposed to read "ARE THERE new functions to aid in the duplication of objects by value?" Cyrus [2004-08-03 03:26:24] php at cyruslesser dot com Yes, why must everyone I ask about this point out the blatantly obvious when I ask about this? :) It's passing classes by reference (or pointer if you prefer the C analog) not by value. I get it. Honestly I do. I just don't get why. Please, is there a way I can quickly copy an object? Where is memcpy()? Why can't I call clone() directly? Are the new functions to aid in the duplication of objects by value? I'm assuming that they do exist, and that I just don't know about them. I have faith in you guys... your language is the easiest and most intuitive language I have ever seen, and I love it. But what I do not understand why you have chosen to do this, or how it aids the language. I appreciate that copying a pointer (or reference) to a class is somewhat quicker than copying the entire object itself, but I don't really see how duplicating pointers is more useful that duplicating complete copies of the object. I just don't think that a small time saving (surely it's just a few memcpy() calls) is worth the extra time it now takes when you wish to duplicate an object. Or the problems this is going to cause with PHP4 software running under PHP5. In PHP5, if I have an object containing data retrieved from a database, and I want to copy it, I have to instantiate a new object, and either repeat all the calls to the database to retrieve the data, or copy every member variable individually to the new class. Either way it's slow and tedious. But I'm very hopeful that there is a new object copy function that wasn't in the PHP5 "what's new" documentation. I have to say, even C++ will automatically copy the contents of a class unless you override the assignment operator. Another irksome factor about this whole thing, is the inconsistency that this brings to the language. Previously a string object could be treated identically to a class object. $string1 = "a"; $string2 = $string1; $string2 = "b"; Which of course, will leave $string1 == "a". But if they where class objects, then the behavior suddenly changes, and $string1 is changed. This is going to be very confusing to people who have never learnt a lower-level OO language before. Even in C++ (which I would regard by todays standard, as a pretty hard language to learn), strings and class objects behave in the same fashion when assigned, or used as arguments to functions. While we're on the topic of functions: In PHP4: function ($object) { /* pass by value */ /* This doesn't change the original object */ $object->change(); } function (&$object) { /* pass by reference */ /* This DOES change the original object */ $object->change(); } That made sense. There are two different ways to pass an object, and you can chose which one you wish to use in the declaration of the function, using '&'. In PHP5, both of those function have the same effect, they both modify the original object which is now always passed by reference. Is this the way it's going to stay? Cyrus Lesser
#29939 [NEW]: HTTP streams not functioning as expected running through web server.
From: testwicks17543 at yahoo dot com Operating system: RedHat ES 3 PHP version: 4.3.8 PHP Bug Type: HTTP related Bug description: HTTP streams not functioning as expected running through web server. Description: We are currently experiencing issues with HTTP streams within PHP scripts being run through Apache (using the php4_module). We are not experiencing the issues if we run the php script from the command line. System info: System is running RedHat ES 3 with all the latest patches applied. The system has approx 512 virtual web sites configured in Apache. The Apache startup script changes the max file descriptors to a number higher than the RedHat default of 1024 (the number is currently set too 409600; we have also tried lower numbers such as 8192; please, note that Apache opens more than 1024 files upon startup and that the default setting is no longer an option; each virtual site has its own access log and error log). RPM list: kernel-smp-2.4.21-15.0.4.EL httpd-2.0.46-32.ent.3 php-4.3.2-11.1.ent php-mysql-4.3.2-11.1.ent PHP specifics: './configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2filter=/usr/sbin/apxs' We would like to know how to further troubleshoot this error to determine the reason why this error message started happening. We have other web servers configured identically (same version of RedHat distribution, same version of Apache, PHP etc.), with fewer web sites that are not experiencing this issue. Please, let us know if there is any additional information needed. Thank you, Reproduce code: --- Code that produces errors: http://somewebhost.domain.gTLD/index.html";, "r"); $httpfile = file_get_contents("http://somewebhost.domain.gTLD/index.html";); include 'http://somewebhost.domain.gTLD/index.html'; ?> Expected result: The contents of index.html. Actual result: -- Errors: Warning: fopen(http://somewebhost.domain.gTLD): failed to open stream: HTTP request failed! in /www/localwebhost.domain.gTLD/htdocs/test.php on line 2 Warning: file_get_contents(http://somewebhost.domain.gTLD/index.html): failed to open stream: HTTP request failed! Ø ` in /www/localwebhost.domain.gTLD/htdocs/test.php on line 3 Warning: main(http://somewebhost.domain.gTLD/index.html): failed to open stream: HTTP request failed! 0vÿ¿Øc xÀN1a1þ: in /www/localwebhost.domain.gTLD/htdocs/test.php on line 4 Warning: main(): Failed opening 'http://somewebhost.domain.gTLD/index.html' for inclusion (include_path='.') in /www/localwebhost.domain.gTLD/htdocs/test.php on line 4 -- Edit bug report at http://bugs.php.net/?id=29939&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29939&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29939&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29939&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29939&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29939&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29939&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29939&r=needscript Try newer version: http://bugs.php.net/fix.php?
#15162 [Com]: (int) cast doesn't work properly
ID: 15162 Comment by: bmorel at ssi dot fr Reported By: mik at x dot org dot pl Status: Bogus Bug Type: Math related Operating System: slackware linux (kernel 2.2.19) PHP Version: 4.1.1 New Comment: (Using PHP 4.3.3 WinXP & PHP 4.3.6 Linux Redhat) Reproduce this kind of bug by simply doing this : echo (int)( 100 * "19.90" ); // writes 1989 :-( Is this bug corrected ? Previous Comments: [2002-01-22 10:25:40] [EMAIL PROTECTED] no bug in PHP, bogus [2002-01-22 09:07:26] [EMAIL PROTECTED] Or to give a shorter example: which outputs: float(2) int(1) This only happens when a subtraction is made. when (1.2 - 1) is replaced by 0.2, this feature doesn't show up. Either I really overlooked something or this is a bug. Anyway, I suggest you to calculate only with cents - which also allows easier calculating. Formatting can be done later. $price = 3340; then use number_format() to format. Kind Regards, Daniel Lorch [2002-01-22 08:45:33] mik at x dot org dot pl i'm writing a little internet shop in php. i found really bad bug, which can make a lot of losses to somebody... may be i'm using cast not good way, but i call this bug anyway. consider this script: "; $price_dolars = floor($price); echo "number of cents is: " . ($price - $price_dolars)*100 . ""; // we can see value of 44 echo "but as integer it would be: " . (int)(($price - $price_dolars)*100) . ""; // but now it is 43 ?> -- Edit this bug report at http://bugs.php.net/?id=15162&edit=1
#29940 [NEW]: fpassthru and output buffering exhausts memory
From: tcarroll at chimesnet dot com Operating system: linux 2.6.5; glibc 2.3.3 PHP version: 4.3.8 PHP Bug Type: Output Control Bug description: fpassthru and output buffering exhausts memory Description: If output buffering is used and a large file is opened and the resulting handle is passed to fpassthru, memory exhaustion occurs. The optimization in _php_stream_passthru mmaps the entire file into the address space. During the PHPWRITE call sequence, an output buffer is allocated the size of the mmap'ed file. If the file is large, a large allocation occurs. Semantically, fpassthru should not cause memory exhaustion. Generally, large writes to buffered IO should generate several flushes to the underlying IO device instead of allocating one large buffer to store the contents. This limits the applications of fpassthru to where the file size is known before hand and where the size is smaller than memory_limit or available memory. This was earlier reported as #20772 Reproduce code: --- Create a file larger than memory_limit or available memory memory_limit = 8M dd if=/dev/zero of=bigfile bs=1M count=128 Expected result: The entire output of the file Actual result: -- No output PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 134213632 bytes) in /home/tcarroll/public_html/passthru.php on line 14 -- Edit bug report at http://bugs.php.net/?id=29940&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29940&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29940&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29940&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29940&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29940&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29940&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29940&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29940&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29940&r=support Expected behavior: http://bugs.php.net/fix.php?id=29940&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29940&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29940&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29940&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29940&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29940&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29940&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29940&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29940&r=float
#28029 [Com]: HTTP request failed!
ID: 28029 Comment by: maximander at gmail dot com Reported By: coadmin at hostings dot pl Status: Open Bug Type: URL related Operating System: FreeBSD 4.9 and 5.2.1 PHP Version: 4CVS-2004-04-16 (stable) New Comment: this has been happening to my site too. the following code errors, as does almost any use of file(),fopen(),file_get_contents() or readfile() on remote files. fsockopen seems to work for now though. http://gerpok.darkflux.com/write.php";); if(strpos($file[0],"you don't")) { echo "not updated";} ?> and, whats more, after a recompile with --enable-debug, it is still error'ing. anything useful we can do with a debug build that errors on a regular basis? Previous Comments: [2004-08-18 08:58:26] andreizilla at gmail dot com I'm having simular (same?) problems on: * FreeBSD zig.andreib.com 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #0: Sun Aug 15 18:42:43 CDT 2004 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/MYKERNEL i386 * Apache/1.3.31 * PHP Version 4.3.8 configuted with: './configure' '--enable-versioning' '--enable-memory-limit' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--with-regex=php' '--disable-cli' '--with-apxs=/usr/local/sbin/apxs' '--disable-ipv6' '--prefix=/usr/local' 'i386-portbld-freebsd5.2.1' Apache seems to be segfaulting every several minutes. This is what the log files look like: [Wed Aug 18 01:52:25 2004] [notice] child pid 18870 exit signal Segmentation fault (11) [Wed Aug 18 01:52:28 2004] [notice] child pid 18869 exit signal Segmentation fault (11) [Wed Aug 18 01:52:32 2004] [notice] child pid 18868 exit signal Segmentation fault (11) [Wed Aug 18 01:52:45 2004] [notice] child pid 18867 exit signal Segmentation fault (11) [Wed Aug 18 01:53:15 2004] [notice] child pid 18866 exit signal Segmentation fault (11) ... times several hundred. This also happends when I do `apachectl graceful' If anyone knows where I can find more information on resolving this problem please, please, please tell me. Thank you. - andrei [2004-07-25 14:02:46] coadmin at hostings dot pl Hello, sorry I couldn't use --disable-all on productive machine. There are too many commercial hostings accounts. But... My problem was suddenly resolved about month ago before compiling PHP. It was very strange. I didn't do any changes in Apache or PHP. >From one day up to now all is working correctly. There wasn't any HTTP request failed!. Additionaly, I upgraded to 4.3.8 a week ago and there is many many many less segfaults. But... #2 On the other server (php 4.3.6) always was OK. After upgrade to PHP 4.3.8 I've again the same bug... I really don't know what is it. Maybe it's OS releated? But as I see on bug status, only 37.5% people, reproducting this bug has the same OS as me. There aren't segaults during HTTP request failed!, but there are other segfaults releated to php engine. [2004-07-19 01:00:06] php-bugs at lists dot php dot net 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". [2004-07-11 22:01:15] [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 use EXACTLY this configure line: # ./configure --with-apxs=/usr/local/apache/bin/apxs --disable-all # make && make install # /usr/local/apache/bin/apachectl stop && sleep 10 # /usr/local/apache/bin/apachectl start Then test using the simplest script you could reproduce this problem before. [2004-05-24 04:25:00] joseph at xtremecorponline dot com My mistake. fopen causes these errors when the filename passed to it does not exist, or is corrupted, on the server. I hope that helps narrow it down. 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/28029 -- Edit this bug report at http://bugs.php.net/?id=28029&edit=1
#29202 [Com]: Weird Session/class problem
ID: 29202 Comment by: a dot b at a dot com Reported By: phreakeehacker at hotmail dot com Status: Open Bug Type: Session related Operating System: Linux Fedora Core 2 PHP Version: 5.0.0 New Comment: Did you try serializing the object (with serialize() ) before putting it into the session array? Previous Comments: [2004-07-16 09:29:50] phreakeehacker at hotmail dot com Description: I have three classes I'm using in this demo. One class extends a base class, and one class is a container class. If I INCLUDE the base class from a file, it will run the first time, but when I click the submit button I get the error message "Fatal error: container::showNodes() [function.showNodes]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition unknown of the object you are trying to operate on was loaded _before_ the session was started in /var/www/html/nodetest.php on line 20". If I simply include the file 'node.php' literally then it works flawlessly. So it appears to me that somehow the included code is handled differently when it is included via a file than if it were simply pasted literally into the same script in the same exact spot. I've tried all variations of includes (include_once, require, require_once) and nothing seems to make a difference. It also seems to have to do with the session not being able to sort out which class the object is if the object definition is included via the file. Any ideas on this one? Reproduce code: --- Two files are needed for this bug, which are located at this URL: http://www.j2.net/~bholyoak/nodetest.txt Expected result: I expect it to work the same if the file were included as it works if the code were literally pasted in instead of included. Actual result: -- The script runs fine the first time. When I click the submit button, it gives me this error: "Fatal error: container::showNodes() [function.showNodes]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition unknown of the object you are trying to operate on was loaded _before_ the session was started in /var/www/html/nodetest.php on line 20" It DOESN'T give me this error if the code is pasted directly in instead of included. -- Edit this bug report at http://bugs.php.net/?id=29202&edit=1
#27903 [Fbk->NoF]: Undesired behavior of class destructor
ID: 27903 Updated by: [EMAIL PROTECTED] Reported By: schroeter at liquidvision dot net -Status: Feedback +Status: No Feedback Bug Type: Class/Object related Operating System: Winn2000 Server PHP Version: 5.0.0RC1 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-08-25 10:26: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-08-25 03:21:24] alvaro at utahgateway dot com I have to agree with schroeter. Is there a reason why you can't call the code in the dtors before shutting down the sessions. [2004-04-07 09:11:28] schroeter at liquidvision dot net Anyways, 1. I disagree that this behavior is the way it should be. It does not make sense to me that internal stuff is cleaned up before the user defined stuff is?! 2. If it will remain this way, it has to made clear in the docs. 3. I found a workaround that will solve this: just place a register_shutdown_function(array(&$this, 'your class function')); at the end of the __constructor function -this will give the desired functionality. I hope that will remain in future releases. Thanks, Tom [2004-04-07 09:11:01] [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 This is correct behavior, nothing we can fix most likely here for PHP 5.0. [2004-04-07 07:57:43] [EMAIL PROTECTED] You need to redesign your stuff, the destructor works just fine. (don't misuse it like you did) 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/27903 -- Edit this bug report at http://bugs.php.net/?id=27903&edit=1
#29920 [Opn]: empty session_id() is created for Safari browser
ID: 29920 User updated by: mbarskey at seattletech dot com Reported By: mbarskey at seattletech dot com Status: Open Bug Type: Session related Operating System: Red Hat Linux release 7.3 PHP Version: 4.3.8 New Comment: I learned that it is not every instance of Safari that causes PHp to create a null session_id! I am using Safari 1.2.3 v125.9 under OS X 10.3.5 build 7M34 and I get sessions with null session_ids. A version of Safari 1.2.2 v125.8 under OS 10.3.4 seems to have PHP create sessions with a valid session_ids! This sure looks like there is something specific about the one computer/environment causing the problem, but it still looks to me like it is PHP that is actually having the problem: Something about this one client environment is telling the PHP engine on the server to create a null session_id. No? - Mike Previous Comments: [2004-09-01 18:27:46] mbarskey at seattletech dot com I forgot to mention: I tried having Safari "disguise" itself by sending other browsers' ID's in the header, but it didn't help. - Mike [2004-09-01 16:53:26] mbarskey at seattletech dot com I'm not sure it's a PHP bug. But since PHP creates the session files and the session_id (web browsers don't), I thought the problem of certain sessions not getting a session_id was PHP's fault - even though it only seems to happen for one browser. - Mike [2004-09-01 09:46:46] [EMAIL PROTECTED] If safari is the only browser that borks, why do you think it's a bug in PHP? [2004-08-31 18:26:04] mbarskey at seattletech dot com Description: PHP 4.3.8 under Linux Red Hat 7.3, Apache 1.3.31 session_id() returns a null or empty string when hit from the Safari browser under Mac OS X. The extremely simple sample code below works as expected from Netscape (7.2 OS X or 7.1 Win2K) and IE (5.2.3 OS X or 6.0.2800.1106 Win2K), but it creates a session without a session_id when hit from Safari for OS X. All Apache and PHP configurations are identical when hit by working browsers and by Safari. The session gets created and seems to work fine, but there is no session_id. I'm concerned that if 2 different Safari users hit the page simultaneously, they would share the session file. I'm somewhat of a PHP novice, and I've never posted a PHP bug before (I figured people who knew what they were doing would find a bug before I did!), so please don't flame me for doing this incorrectly; instead, tell me how I can better help you (or where I an find a solution - I've searched!). I searched for a previous bug with this decription before posting, but didn't find any. Also, I'm on a shared server, so I cannot try a CVS version. My PHP installation info can be found at http://www.seattletech.com/phpinfo.php. Just in case, here was the configure command: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-mcrypt' '--enable-magic-quotes' '--with-mysql' '--enable-discard-path' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib' ...and here is the session info: Session Support enabled Registered save handlers files user Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid On On ...and here is the .htaccess file I'm using: php_value session.save_handler 'user' php_value session.save_path 'php_sessions' php_value auto_prepend_file '/home/seattlet/public_html/registration/mysql_session_handler.php' php_value include_path ".:../" php_flag register_globals off php_flag session.use_trans_sid 1 php_flag log_errors 1 php_value error_log '/home/seattlet/public_html/registration/error_log.txt' php_flag cgi.rfc2616_headers 0 Thanks! - Mike Reprodu
#29943 [NEW]: PHP Install on Cobalt Raq550
From: andrej770 at comcast dot net Operating system: Linux 2.4 PHP version: 4.3.8 PHP Bug Type: Compile Failure Bug description: PHP Install on Cobalt Raq550 Description: I am installing PHP 4.3.8 on my Raq550 from the source and get an error p.s. I compiled and made Curl as well as libmcrypt before I did PHP. Thanks in Advance Andrej770 Reproduce code: --- ./configure \ --prefix=/usr \ --with-config-file-path=/etc/httpd \ --with-exec-dir=/usr/bin \ --with-apxs=/usr/sbin/apxs \ --enable-calendar \ --enable-ftp \ --enable-magic-quotes \ --enable-mbstring \ --enable-mbstr-enc-trans \ --enable-safe-mode \ --enable-sockets \ --enable-track-vars \ --enable-xml \ --disable-debug \ --with-gd \ --with-gettext=shared \ --with-iconv \ --with-imap \ --with-imap-ssl \ --with-interbase=shared \ --with-jpeg-dir=/usr \ --with-ldap \ --with-mcrypt=shared \ --with-mysql=shared \ --with-curl \ --with-openssl=/usr \ --with-pgsql=shared \ --with-png-dir=/usr \ --with-regex=system \ --with-zlib Expected result: Compile correctly Actual result: -- ext/imap/php_imap.lo: In function `zm_startup_imap': /home/src/php-4.3.8/ext/imap/php_imap.c:435: undefined reference to `ssl_onceonlyinit' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 -- Edit bug report at http://bugs.php.net/?id=29943&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29943&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29943&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29943&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29943&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29943&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29943&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29943&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29943&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29943&r=support Expected behavior: http://bugs.php.net/fix.php?id=29943&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29943&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29943&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29943&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29943&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29943&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29943&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29943&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29943&r=float
#29944 [NEW]: Function defined in switch, crashes
From: norxh at binnews dot com Operating system: Windows XP SP2 PHP version: 5.0.1 PHP Bug Type: Reproducible crash Bug description: Function defined in switch, crashes Description: Crashes when run in cli or apache2 with no external modules. Reproduce code: --- Expected result: 1 Actual result: -- crash -- Edit bug report at http://bugs.php.net/?id=29944&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29944&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29944&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29944&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29944&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29944&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29944&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29944&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29944&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29944&r=support Expected behavior: http://bugs.php.net/fix.php?id=29944&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29944&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29944&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29944&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29944&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29944&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29944&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29944&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29944&r=float
#24028 [Com]: Reading raw post message by php://input
ID: 24028 Comment by: p at aol dot com Reported By: xiongwei at aerafront dot com Status: Closed Bug Type: CGI related Operating System: win32 only PHP Version: 4.3.2 New Comment: Moving to 1and1? Good luck. I had a bad expreience with 1and1. I used to recommended 1and1 and I thought its big company and the service and support should be better. Unfortunately, i learned from the hard way. 1. If you tranfer your domain, chances are you will have to wait for days. The status shown on the panel does not reflect the actual status. For example, if the status is Ready and you try to set the DNS server, the server will fail as the transfer might not be complated eventhough it stated Ready". The only way you can tell is search the domain via a lookup in whoswho database and see if the transfer is completed. 2. If you trying to setup the DNS server and if the nameserver is not in 1and1 database, you will never be able to set it up. 3. The support is so inexperience that they trying so hard to give answer regardless if its right or wrong. The worst is if you call at night where your call transfer to India where those folks dont even know much about how domain registration works. 4. The package is a very stupid ideas. If you have more than 1 domain and its setup in a different contract you have to navigate few pages in order to maintain both domains. The funny part is all the pages are identical. Just wonder if there ever thought about this before creating the site? Well, I have nothing againsts going with 1and1 if you willing to take the risks. As for me, I already moved to others registrar even if I have to pay more as my sites were down for 3 days waiting for the DNS to cache. Most company set the refresh TTL to 24 hours but 1and1 is 72. How stupid it is. Previous Comments: [2003-06-24 12:58:38] [EMAIL PROTECTED] Fixed -> closed. [2003-06-04 22:24:32] xiongwei at aerafront dot com I wrote a routine "postrawdata.php" for displaying HTTP raw request message. It works properly when using a socket program to post something to it. But submitting from a simple HTML below will make it dead, even http headers were not sent back, the behavior of brwoser is just waiting before timeout, I have tested it under IE 6.0 and Netscape 7.0 , any suggestion is appreciate. I think PHP does not send correct responding data to browser, or it does not disconnect the HTTP channel, that makes browsers to wait , whereas my socket client do disconnect when finished. Thanks, William Hong -- Edit this bug report at http://bugs.php.net/?id=24028&edit=1
#29945 [NEW]: simplexml_load_file URL limitation 255 char?
From: hinrichs at islco dot com Operating system: WINNT PHP version: 5.0.1 PHP Bug Type: SimpleXML related Bug description: simplexml_load_file URL limitation 255 char? Description: Putting a long URL into simplexml_load_file: symptom: Apache does not return any data. Chopping params off the query to make it < 255 characters long, however, works. Reproduce code: --- simplexml_load_file('http://aws-beta.amazon.com/onca/xml?Service=AWSProductData&SubscriptionId=1WY05MXT3WM2PXMB12G2&AssociateTag=harappabazaar&ResponseGroup=Medium&Operation=ItemSearch&SearchIndex=Electronics&BrowseNode=281052&ItemPage=1&Sort=price&MaximumPrice=4&MinimumPrice=3'); Expected result: For it to work same as shorter urls. Actual result: -- Document contains no data; apache crashes. -- Edit bug report at http://bugs.php.net/?id=29945&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29945&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29945&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29945&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29945&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29945&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29945&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29945&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29945&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29945&r=support Expected behavior: http://bugs.php.net/fix.php?id=29945&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29945&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29945&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29945&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29945&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29945&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29945&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29945&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29945&r=float
#29907 [Fbk->Csd]: stange str comparing results
ID: 29907 User updated by: benjamin dot lewis at samail dot net Reported By: benjamin dot lewis at samail dot net -Status: Feedback +Status: Closed Bug Type: Arrays related Operating System: redhat PHP Version: 4.3.7 New Comment: the problem is with sorting with usort where the result of sorting with the length_and_depth function which uses an OR in the condition, gives strange results conpared with sorting on the two conditions alone. Previous Comments: [2004-08-31 08:53:33] [EMAIL PROTECTED] Try to reduce the code so we can understand the problem without having to read huge and tangled scripts. Btw, 4.3.7 is not the current stable version, so you'd better update it. [2004-08-31 08:50:46] benjamin dot lewis at samail dot net usort [2004-08-31 08:48:02] benjamin dot lewis at samail dot net Description: cases length and value give the expected results, but when mixed in the case of length_and_value it gives unexpected results. Sorry for posting more than 20 lines i don't have an open server to post it to. Ben Reproduce code: --- '.$id; echo ''; usort($doesntwork, 'length'); foreach($doesntwork as $id) echo ''.$id; echo ''; usort($doesntwork, 'value'); foreach($doesntwork as $id) echo ''.$id; echo ''; usort($doesntwork, 'length_and_value'); foreach($doesntwork as $id) echo ''.$id; echo ''; } ?> -- Edit this bug report at http://bugs.php.net/?id=29907&edit=1
#28029 [Com]: HTTP request failed!
ID: 28029 Comment by: maximander at gmail dot com Reported By: coadmin at hostings dot pl Status: Open Bug Type: URL related Operating System: FreeBSD 4.9 and 5.2.1 PHP Version: 4CVS-2004-04-16 (stable) New Comment: Note: We are using PHP version 4.3.8 stable with apache2 on Gentoo with Linux kernel 2.6.7 stable release installed on a Intel Xeon with HyperThreading. Our fix was to fsockopen and send the "GET $file HTTP/1.1\n\r" and "Host: $host\n\r" which works fine. After watching a packet sniffer while php ran a file() and a fsockopen as above, we saw that the difference was that file() never moved past the first line, and never sent a Host: header. When we ran the fsockopen equivalent of file_get_contents without the echo "Host: $host\n\r"; it failed in the same manner as php's builtin method. Previous Comments: [2004-09-02 00:02:10] maximander at gmail dot com this has been happening to my site too. the following code errors, as does almost any use of file(),fopen(),file_get_contents() or readfile() on remote files. fsockopen seems to work for now though. http://gerpok.darkflux.com/write.php";); if(strpos($file[0],"you don't")) { echo "not updated";} ?> and, whats more, after a recompile with --enable-debug, it is still error'ing. anything useful we can do with a debug build that errors on a regular basis? [2004-08-18 08:58:26] andreizilla at gmail dot com I'm having simular (same?) problems on: * FreeBSD zig.andreib.com 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #0: Sun Aug 15 18:42:43 CDT 2004 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/MYKERNEL i386 * Apache/1.3.31 * PHP Version 4.3.8 configuted with: './configure' '--enable-versioning' '--enable-memory-limit' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--with-regex=php' '--disable-cli' '--with-apxs=/usr/local/sbin/apxs' '--disable-ipv6' '--prefix=/usr/local' 'i386-portbld-freebsd5.2.1' Apache seems to be segfaulting every several minutes. This is what the log files look like: [Wed Aug 18 01:52:25 2004] [notice] child pid 18870 exit signal Segmentation fault (11) [Wed Aug 18 01:52:28 2004] [notice] child pid 18869 exit signal Segmentation fault (11) [Wed Aug 18 01:52:32 2004] [notice] child pid 18868 exit signal Segmentation fault (11) [Wed Aug 18 01:52:45 2004] [notice] child pid 18867 exit signal Segmentation fault (11) [Wed Aug 18 01:53:15 2004] [notice] child pid 18866 exit signal Segmentation fault (11) ... times several hundred. This also happends when I do `apachectl graceful' If anyone knows where I can find more information on resolving this problem please, please, please tell me. Thank you. - andrei [2004-07-25 14:02:46] coadmin at hostings dot pl Hello, sorry I couldn't use --disable-all on productive machine. There are too many commercial hostings accounts. But... My problem was suddenly resolved about month ago before compiling PHP. It was very strange. I didn't do any changes in Apache or PHP. >From one day up to now all is working correctly. There wasn't any HTTP request failed!. Additionaly, I upgraded to 4.3.8 a week ago and there is many many many less segfaults. But... #2 On the other server (php 4.3.6) always was OK. After upgrade to PHP 4.3.8 I've again the same bug... I really don't know what is it. Maybe it's OS releated? But as I see on bug status, only 37.5% people, reproducting this bug has the same OS as me. There aren't segaults during HTTP request failed!, but there are other segfaults releated to php engine. [2004-07-19 01:00:06] php-bugs at lists dot php dot net 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". [2004-07-11 22:01:15] [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 use EXACTLY this configure line: # ./configure --with-apxs=/usr/local/apache/bin/apxs --disable-all # make && make install # /usr/local/apache/bin/apachectl stop && sleep 10 # /usr/local/apache/bin/apachectl start Then test using the simplest script you could reproduce this problem before. 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/28029 -- Edit this bug r
#29283 [Ana->Csd]: Statement isn't valid anymore warning during executing prepared mysqi queries
ID: 29283 Updated by: [EMAIL PROTECTED] Reported By: divisor at ad69 dot com -Status: Analyzed +Status: Closed Bug Type: MySQL related Operating System: FreeBSD 4.10 PHP Version: 5.0.0 Assigned To: georg 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: [2004-09-01 22:18:12] corey_gilmore at dpc dot senate dot gov I'm experiencing the same issue as well with Apache 1.3.31 and 2.0.50 on XP SP2 and XP SP1 with PHP 5.0, 5.01 and 5.0-DEV from php5-win32-200408312230.zip. MySQL 4.1a, 4.1.2, 4.1.3 and now 4.1.4. It occurs in a page where I select a large amount of data from one table, process it, and insert it into multiple tables. There are 287 rows returned from the first select, and then 400-500 rows inserted. Line 644 begins with 'if( !$stmt->execute() ) {' Warning: Statement isn't valid anymore in ...\import\contact.class.inc.php on line 644 Error inserting email (#0): INSERT INTO email (EmailType, Email, ContactID) VALUES (?, ?, ?); $sql = "INSERT INTO {$kTABLE_PREFIX}email (EmailType, Email, ContactID) VALUES (?, ?, ?)"; if( !$stmt = $db->prepare($sql) ) { // prepare it printf("Error with %s:%s",$sql, $db->error ); } if( !$stmt->bind_param("ssi", $addr->EmailType, $addr->Email, $ContactID ) ) { printf("Error (#%d): %s;%s%s : %s : %s", $stmt->errno, $sql, $stmt->error, $addr->EmailType, $addr->Email, $ContactID ); } if( !$stmt->execute() ) { printf("Error inserting email (#%d): %s;%s%s : %s : %i", $stmt->errno, $sql, $stmt->error, $addr->EmailType, $addr->Email, $ContactID ); $this->dump(); printf("\$stmt = %s", var_export($stmt, TRUE) ); } This has been an issue since RC1, and is a bit frustrating. In my case reloading the page to re-import works, eventually, but since the entire process takes about 5 minutes it is painful. [2004-08-20 14:47:35] paradox at gmx dot at i've got the same problem with php 5.0.1 loaded as an apache module - mysql 4.1.3beta, win2k it seems that the error occurs more often on much used servers. on my dedicated test-server it is approximately one error on 100 statements. [2004-08-03 08:48:09] alex at avannaproductions dot com I'll chime in as another voice of reason: this should be fixed before 5.0.1. At the moment, prepared statements are basically useless, as half the time they give this error and fail to return any data. I'm on MacOS X and Apache 2, with the same problem. [2004-07-25 18:33:46] dev at edwinchu dot info Hi, I have got the same problem. I am using PHP5 release with MySQL4.1.3-beta. The code is simple: $mysqli = new mysqli(); // connected successfully $stmt = $mysqli->prepare("SOME VALID QUERY"); $stmt->execute(); // No problem here $mysqli2 = $mysqli; $mysqli2->query("THE SAME QUERY"); // Still OK $stmt2 = $mysqli2->prepare("THE SAME QUERY"); $stmt2->execute(); The last line failed and returning "Warning: Statement isn't valid anymore in xxx". [2004-07-21 16:24:11] divisor at ad69 dot com it caused randomly on all statetments, prepare() was ok but execute() failed: if ($stmt=$DB->prepare("select something from table where name=?")) { $stmt->bind_param('s',$name); $stmt->execute(); // HERE PHP WRITE WARNING // AND STMT COINTAIN NO DATA variables stmt->error, stmt->errno are empty that's strange but after removing lines 182-187 from ext/mysqli/php_mysqli.h: if (!strcmp((char *)__name, "mysqli_stmt")) {\ if (!((MYSQL_STMT *)__ptr)->mysql) {\ php_error(E_WARNING, "Statement isn't valid anymore");\ RETURN_NULL();\ }\ }\ } it started working without any problems. but of course this 'hack' of php code isn't good ;) 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/29283 -- Edit this bug report at http://bugs.php.net/?id=29283&edit=1
#29931 [Opn->Fbk]: Accessing a class' array via foreach causes no output
ID: 29931 Updated by: [EMAIL PROTECTED] Reported By: mattmecham at gmail dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Apache/1.3.31 (Unix) 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 Your code works fine for me, can you please try the latest snapshot? Previous Comments: [2004-09-01 17:07:07] mattmecham at gmail dot com Description: Unless something dramatic has changed in the way objects are handled, the code here will cause the browser to show "This document contains no data" whatever the subsequent output from the script. No entries into the apache error_log are made and E_ALL shows no errors. Problem seems to be with "foreach( $newclass->test_array...". Commenting this out removes the problem as does: $tmp = $newclass->test_array foreach( $tmp as $i ) Can give entire phpinfo() if required. Reproduce code: --- error_reporting ( E_ALL ); class someclass { var $test_array = array(); } $newclass = new someclass(); # Populate with dummy data.. for( $i=0; $i < 100 ; $i++ ) { $newclass->test_array[] = $i; } foreach( $newclass->test_array as $i ) { print $i."\n"; } print "Test"; exit(); -- Edit this bug report at http://bugs.php.net/?id=29931&edit=1
#29932 [Opn->Bgs]: Array Memory Allocation Error With register_globals set to "On"
ID: 29932 Updated by: [EMAIL PROTECTED] Reported By: joshua dot montgomery at middlebrow dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Debian PHP Version: 4.3.8 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. . Previous Comments: [2004-09-01 17:47:00] joshua dot montgomery at middlebrow dot com Description: We fixed this bug by setting Register_Globals to "Off", but we were also making other changes on the server to solve it, so that might not have been the fix. We are using the following code to store database entries in memory for use later on in the page When allocating memory for an array dynamically using a sql_query the values came out as strings, rather than arrays. I took all of the error checking out of the code below to make it more clear. We use this code to dump an array to a select menu creation function. It should be noted that this bug doesn't always appear, but seems to be produced for larger arrays (10 - 25) rather than arrays containing 2 or 3 entries. It should also be noted that adding the statement "$ArrayVariable = array()" before the following code also solves the problem. Reproduce code: --- $rslt = mysql_query("SQL") $i = 0; while ($row = mysql_fetch_array($rslt)) { $ArrayVariable[$i]['Value'] = $row['SQL_Text Value']; $ArrayVariable[$i]['Label'] = $row['SQL_Text Label']; $i++; } print_r($ArrayVariable); Expected result: Array ( [0] => Array ( [Value] => 145 [Label] => Adair, Kris ) [1] => Array ( [Value] => 20 [Label] => Bailey, Wayne ) [2] => Array ( [Value] => 22 [Label] => Bartos, Alan ) [3] => Array ( [Value] => 24 [Label] => Beatty, Marsha ) ) Actual result: -- Array ( [0] => 1A [1] => 2B [2] => 2B [3] => 2B ) -- Edit this bug report at http://bugs.php.net/?id=29932&edit=1
#29935 [Opn->Fbk]: array_filter crashes Apache 2
ID: 29935 Updated by: [EMAIL PROTECTED] Reported By: webmaster at martialartsmovies dot net -Status: Open +Status: Feedback Bug Type: Arrays related Operating System: Windows XP 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 Your code works fine for me, please try a snapshot. Previous Comments: [2004-09-01 20:10:27] webmaster at martialartsmovies dot net Description: I have PHP 5.0.1 installed together with the latest stable Apache 2 on Windows XP SP2. I used the example on the array_filter page on php.net an all I got was a window telling me that apache caused a problem and it needed to reboot. Reproduce code: --- 1, "b"=>2, "c"=>3, "d"=>4, "e"=>5); $array2 = array(6, 7, 8, 9, 10, 11, 12); echo "Odd :\n"; print_r(array_filter($array1, "odd")); echo "Even:\n"; print_r(array_filter($array2, "even")); ?> Expected result: the array_filter function applied to the 2 arrays Actual result: -- apache 2 crashed. error.log: [Wed Sep 01 19:47:14 2004] [notice] Child 2412: Child process is running [Wed Sep 01 19:47:14 2004] [notice] Child 2412: Acquired the start mutex. [Wed Sep 01 19:47:14 2004] [notice] Child 2412: Starting 250 worker threads. [Wed Sep 01 19:50:15 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting. -- Edit this bug report at http://bugs.php.net/?id=29935&edit=1
#27105 [Com]: Cannot open remote URL's
ID: 27105 Comment by: maximander at gmail dot com Reported By: jprins at ision dot nl Status: No Feedback Bug Type: HTTP related Operating System: Unix PHP Version: 4.3.4 New Comment: We at gerpok.com are also encountering this error. Using a packet sniffer and file(), as well as fsockopen() we tracked the problem to the fact that php is not sending a 'Host:' header, nor the double line return to mark the end of headers, but rather is stopping after the first line ("GET HTTP/1.0") we have several questions: 1) shouldn't it use http/1.1 ? 2) why isn't it sending all the headers? 3) Why does it retry the "GET ..." several times rather than finishing the first one? 4) What the $#%^ are those funny characters in the error msg? using fsockopen() we can send the "GET ..." and "Host..." headers manually and the request works fine. PHP Version: 4.3.8 OS: Gentoo Linux(2.6.7 kernel) Apache 2 Tried php 5.0.1,'--enable-debug' and yes, allow_url_fopen is set to On. email me if you want more specific info. Previous Comments: [2004-02-06 11:23:20] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ..and you should fix your server.. [2004-02-01 05:51:01] [EMAIL PROTECTED] Why does it work fine for me? Using this script: http://www.ccmplanet.com/";); var_dump($http_response_headers); ?> I get the page contents and the correct headers.. So what is different? (I'm running the script with CLI) [2004-02-01 03:29:36] jprins at ision dot nl I don't think the weird characters in the error message are normal? Warning: readfile(http://www.ccmplanet.com/): failed to open stream: HTTP request failed! [EMAIL PROTECTED]>Æà\@@Ìÿ¿<Æ in /home/sites/site90/web/testrss.php on line 5 [2004-01-31 23:41:13] [EMAIL PROTECTED] Works fine with latest CVS snapshot. Worked fine with PHP 4.2.2 too. :) [2004-01-31 13:15:11] jprins at ision dot nl Changed the include into readfile, but same result 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/27105 -- Edit this bug report at http://bugs.php.net/?id=27105&edit=1
#29922 [Opn->Asn]: Huge memory usage in file copy of big files
ID: 29922 Updated by: [EMAIL PROTECTED] Reported By: info at pion dot xs4all dot nl -Status: Open +Status: Assigned Bug Type: *Directory/Filesystem functions Operating System: Linux PHP Version: 5.0.1 -Assigned To: +Assigned To: wez New Comment: I saw a similar (but better) patch by Wez. Wez, can you have a look? Previous Comments: [2004-09-01 22:19:57] info at pion dot xs4all dot nl I have a small patch for the 5.1.0-dev which solves the problem but: This patch says a normal copy should be used for files bigger then 32 MB. But this is an rather arbitrary value choosen by me. Here follows the patch: -diff -Naur org/php5-200409011830/main/streams/streams.c php5-200409011830/main/streams/streams.c --- org/php5-200409011830/main/streams/streams.c2004-08-31 14:30:59.0 +0200 +++ php5-200409011830/main/streams/streams.c2004-09-01 22:06:11.579747624 +0200 @@ -1276,7 +1276,12 @@ } } - if (php_stream_mmap_possible(src)) { +/* +** We shouldn't use memory mapping on big files just for copying them. +** It's not an efficient sollution for the vm. So for files above +** 32mb (32*1024^2=33554432) we want a normal copy +*/ + if ((php_stream_mmap_possible(src)) && (ssbuf.sb.st_size < 33554432)) { char *p; size_t mapped; -- [2004-09-01 21:55:01] info at pion dot xs4all dot nl I have checked again but i can't find the bug report. I have tested with "5.1.0-dev" with checked out version 200409011830 but the problem is still there. [2004-09-01 08:44:03] [EMAIL PROTECTED] I'm sure there is already a bugreport for this, and afaik somebody also worked on an attempt to fix it. Can you try a PHP 5.1.0-dev snapshot please? (http://naps.php.net) [2004-08-31 22:03:04] info at pion dot xs4all dot nl - The observation was on rhel 3 with php 4.3.2 - The test in the report was done on a FC1 system with php 4.3.3 - Now i have checked php 4.3.8 on fc2 (the default php) and php 5.0.1 Al have the same result although the speed diferences on the fc2 system are smaller. This could be caused by different hardware or differences in the linux vm (2.4.X versus 2.6.X) [2004-08-31 19:07:04] info at pion dot xs4all dot nl Description: If you copy a file of N megabytes (N in the order of a few hundred megs) your proces will use the same order of ammount of memory (or less if the system doesn't have that much). This is probably because the file is compleetly memory mapped and than the content is written to an other file. Probably it will be better to use the behavior of the unix "cp" command which reads 4k and than writes the 4k. In this way "cp" is almost a factor two faster than php and has less impact on the system performance. Reproduce code: --- Expected result: The unix "cp" needed 1 minut 8 seconds to copy the file and php used 2 and 18 seconds on my desktop system with 512mb. Actual result: -- They should be in the same order -- Edit this bug report at http://bugs.php.net/?id=29922&edit=1
#29933 [Opn->Bgs]: Certain subject Line characters cause mail() to fail
ID: 29933 Updated by: [EMAIL PROTECTED] Reported By: b dot parish at arts dot ac dot uk -Status: Open +Status: Bogus Bug Type: Mail related Operating System: Windows 2000 SP 4 PHP Version: 4.3.8 New Comment: As PHP doesn't mangle addresses anyway, I don't believe this can't be a bug in PHP and such I'm marking it as bogus. Of your little investigation brings any new evidence, feel free to reopen. Previous Comments: [2004-09-01 19:11:40] b dot parish at arts dot ac dot uk I am investigating the possibility that it is a problem with our mail relay software. The problem can be replicated using a standard email client and therefore it is very unlikely to be PHP related. I will report back once we have done more diagnostics. [2004-09-01 18:50:49] b dot parish at arts dot ac dot uk Description: The mail function cannot send the email has certain characters. For instance the following will not work $subject = "Joe bloggs edited the Personnel Record of Joe bloggs"; If I strip out the 'd's, it does work: $subject = "Joe bloggs edite the Personnel Recor of Joe bloggs"; mail("[EMAIL PROTECTED]", $subject, "test", ""); My php.ini has the following values: [mail function] ; For Win32 only. SMTP = mail.arts.ac.uk ; For Win32 only. sendmail_from = [EMAIL PROTECTED] The problem also occurs on Linux running PHP Version 4.3.2 Looking in /var/log/maillog: Sep 1 17:41:57 www-b sendmail[27241]: i81GfvD27241: from=nobody, size=92, class=0, nrcpts=1, msgid=<[EMAIL PROTECTED]>, [EMAIL PROTECTED] Sep 1 17:41:57 www-b sendmail[27244]: i81GfvD27241: [EMAIL PROTECTED], ctladdr=nobody (99/99), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30092, relay=mail.linst.ac.uk [195.195.78.11], dsn=2.0.0, stat=Sent (OK id=1C2YBJ-0002Nd-00) Reproduce code: --- $subject = "Joe bloggs edited the Personnel Record of Joe bloggs"; mail("[EMAIL PROTECTED]", $subject, "test", ""); Expected result: An email is sent with: to/from: [EMAIL PROTECTED] subject: 'Joe bloggs edited the Personnel Record of Joe bloggs' body: 'test' Actual result: -- No email is sent at all. -- Edit this bug report at http://bugs.php.net/?id=29933&edit=1
#29937 [Opn->Fbk]: $_FILES['name'] no longer has full path (from 4.3.4 to 4.3.8)
ID: 29937 Updated by: [EMAIL PROTECTED] Reported By: justin at timelesstech dot com -Status: Open +Status: Feedback Bug Type: *Directory/Filesystem functions Operating System: FreeBSD 4.8 stable PHP Version: 4.3.8 New Comment: Did you compile PHP from source or did you use the ports? If you used the ports, can you check what patches were applied to the clean php source? Previous Comments: [2004-09-01 22:40:40] justin at timelesstech dot com Description: We have had scripts running for a while now fine on PHP 4.3.4 that assume that the $_FILES['name'] value on file uploads contains the full /path/to/the/filename.txt However after our server admins upgraded to PHP 4.3.8 the $FILES['name'] now only contains the filename, with no path. This makes it impossible for our recursive file uploader script to work, since it NEEDS the pathname of those files to know what directory/subdir on the server to upload the file(s) to! The changelog does not mention this, but does anybody have any ideas? -- Edit this bug report at http://bugs.php.net/?id=29937&edit=1
#29940 [Opn->Bgs]: fpassthru and output buffering exhausts memory
ID: 29940 Updated by: [EMAIL PROTECTED] Reported By: tcarroll at chimesnet dot com -Status: Open +Status: Bogus Bug Type: Output Control Operating System: linux 2.6.5; glibc 2.3.3 PHP Version: 4.3.8 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. Duplicate of #29922. Previous Comments: [2004-09-01 23:59:03] tcarroll at chimesnet dot com Description: If output buffering is used and a large file is opened and the resulting handle is passed to fpassthru, memory exhaustion occurs. The optimization in _php_stream_passthru mmaps the entire file into the address space. During the PHPWRITE call sequence, an output buffer is allocated the size of the mmap'ed file. If the file is large, a large allocation occurs. Semantically, fpassthru should not cause memory exhaustion. Generally, large writes to buffered IO should generate several flushes to the underlying IO device instead of allocating one large buffer to store the contents. This limits the applications of fpassthru to where the file size is known before hand and where the size is smaller than memory_limit or available memory. This was earlier reported as #20772 Reproduce code: --- Create a file larger than memory_limit or available memory memory_limit = 8M dd if=/dev/zero of=bigfile bs=1M count=128 Expected result: The entire output of the file Actual result: -- No output PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 134213632 bytes) in /home/tcarroll/public_html/passthru.php on line 14 -- Edit this bug report at http://bugs.php.net/?id=29940&edit=1
#29920 [Opn->Bgs]: empty session_id() is created for Safari browser
ID: 29920 Updated by: [EMAIL PROTECTED] Reported By: mbarskey at seattletech dot com -Status: Open +Status: Bogus Bug Type: Session related Operating System: Red Hat Linux release 7.3 PHP Version: 4.3.8 New Comment: Yes, or they are not accepting a cookie or something. Anyway, this is then definitely not a bug in PHP but a browser-related issue. IE: safari is broken :) Marking as bogus. Previous Comments: [2004-09-02 02:21:55] mbarskey at seattletech dot com I learned that it is not every instance of Safari that causes PHp to create a null session_id! I am using Safari 1.2.3 v125.9 under OS X 10.3.5 build 7M34 and I get sessions with null session_ids. A version of Safari 1.2.2 v125.8 under OS 10.3.4 seems to have PHP create sessions with a valid session_ids! This sure looks like there is something specific about the one computer/environment causing the problem, but it still looks to me like it is PHP that is actually having the problem: Something about this one client environment is telling the PHP engine on the server to create a null session_id. No? - Mike [2004-09-01 18:27:46] mbarskey at seattletech dot com I forgot to mention: I tried having Safari "disguise" itself by sending other browsers' ID's in the header, but it didn't help. - Mike [2004-09-01 16:53:26] mbarskey at seattletech dot com I'm not sure it's a PHP bug. But since PHP creates the session files and the session_id (web browsers don't), I thought the problem of certain sessions not getting a session_id was PHP's fault - even though it only seems to happen for one browser. - Mike [2004-09-01 09:46:46] [EMAIL PROTECTED] If safari is the only browser that borks, why do you think it's a bug in PHP? [2004-08-31 18:26:04] mbarskey at seattletech dot com Description: PHP 4.3.8 under Linux Red Hat 7.3, Apache 1.3.31 session_id() returns a null or empty string when hit from the Safari browser under Mac OS X. The extremely simple sample code below works as expected from Netscape (7.2 OS X or 7.1 Win2K) and IE (5.2.3 OS X or 6.0.2800.1106 Win2K), but it creates a session without a session_id when hit from Safari for OS X. All Apache and PHP configurations are identical when hit by working browsers and by Safari. The session gets created and seems to work fine, but there is no session_id. I'm concerned that if 2 different Safari users hit the page simultaneously, they would share the session file. I'm somewhat of a PHP novice, and I've never posted a PHP bug before (I figured people who knew what they were doing would find a bug before I did!), so please don't flame me for doing this incorrectly; instead, tell me how I can better help you (or where I an find a solution - I've searched!). I searched for a previous bug with this decription before posting, but didn't find any. Also, I'm on a shared server, so I cannot try a CVS version. My PHP installation info can be found at http://www.seattletech.com/phpinfo.php. Just in case, here was the configure command: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-mcrypt' '--enable-magic-quotes' '--with-mysql' '--enable-discard-path' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib' ...and here is the session info: Session Support enabled Registered save handlers files user Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid On On ...and here is the .htaccess file I'm using: php_value session.save_handler 'user' php_value session.save_path 'php_sessions' php_value auto_prepend_file '
#29943 [Opn->Bgs]: PHP Install on Cobalt Raq550
ID: 29943 Updated by: [EMAIL PROTECTED] Reported By: andrej770 at comcast dot net -Status: Open +Status: Bogus Bug Type: Compile Failure Operating System: Linux 2.4 PHP Version: 4.3.8 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Add --with-openssl to your build. Previous Comments: [2004-09-02 04:16:23] andrej770 at comcast dot net Description: I am installing PHP 4.3.8 on my Raq550 from the source and get an error p.s. I compiled and made Curl as well as libmcrypt before I did PHP. Thanks in Advance Andrej770 Reproduce code: --- ./configure \ --prefix=/usr \ --with-config-file-path=/etc/httpd \ --with-exec-dir=/usr/bin \ --with-apxs=/usr/sbin/apxs \ --enable-calendar \ --enable-ftp \ --enable-magic-quotes \ --enable-mbstring \ --enable-mbstr-enc-trans \ --enable-safe-mode \ --enable-sockets \ --enable-track-vars \ --enable-xml \ --disable-debug \ --with-gd \ --with-gettext=shared \ --with-iconv \ --with-imap \ --with-imap-ssl \ --with-interbase=shared \ --with-jpeg-dir=/usr \ --with-ldap \ --with-mcrypt=shared \ --with-mysql=shared \ --with-curl \ --with-openssl=/usr \ --with-pgsql=shared \ --with-png-dir=/usr \ --with-regex=system \ --with-zlib Expected result: Compile correctly Actual result: -- ext/imap/php_imap.lo: In function `zm_startup_imap': /home/src/php-4.3.8/ext/imap/php_imap.c:435: undefined reference to `ssl_onceonlyinit' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 -- Edit this bug report at http://bugs.php.net/?id=29943&edit=1
#29944 [Opn->Asn]: Function defined in switch, crashes
ID: 29944 Updated by: [EMAIL PROTECTED] Reported By: norxh at binnews dot com -Status: Open +Status: Assigned Bug Type: Reproducible crash Operating System: Windows XP SP2 PHP Version: 5.0.1 -Assigned To: +Assigned To: andi New Comment: Although I see no point in doing this at all (it should not necessarily work), it shouldn't crash either. valgrind: ==2720== Conditional jump or move depends on uninitialised value(s) ==2720==at 0x83062CB: zend_switch_free (zend_execute.c:200) ==2720==by 0x8302A8D: zend_switch_free_handler (zend_execute.c:3222) ==2720==by 0x82FDC88: execute (zend_execute.c:1391) ==2720==by 0x830140F: zend_do_fcall_common_helper (zend_execute.c:2728) ==2720==by 0x8301890: zend_do_fcall_by_name_handler (zend_execute.c:2810) ==2720== ==2720== Use of uninitialised value of size 4 ==2720==at 0x8305E29: zend_pzval_unlock_func (zend_execute.c:65) ==2720==by 0x83062E6: zend_switch_free (zend_execute.c:205) ==2720==by 0x8302A8D: zend_switch_free_handler (zend_execute.c:3222) ==2720==by 0x82FDC88: execute (zend_execute.c:1391) ==2720==by 0x830140F: zend_do_fcall_common_helper (zend_execute.c:2728) ==2720== ==2720== Invalid read of size 4 ==2720==at 0x8305E29: zend_pzval_unlock_func (zend_execute.c:65) ==2720==by 0x83062E6: zend_switch_free (zend_execute.c:205) ==2720==by 0x8302A8D: zend_switch_free_handler (zend_execute.c:3222) ==2720==by 0x82FDC88: execute (zend_execute.c:1391) ==2720==by 0x830140F: zend_do_fcall_common_helper (zend_execute.c:2728) ==2720== Address 0x8 is not stack'd, malloc'd or (recently) free'd ==2720== ==2720== Process terminating with default action of signal 11 (SIGSEGV) ==2720== Access not within mapped region at address 0x8 ==2720==at 0x8305E29: zend_pzval_unlock_func (zend_execute.c:65) ==2720==by 0x83062E6: zend_switch_free (zend_execute.c:205) ==2720==by 0x8302A8D: zend_switch_free_handler (zend_execute.c:3222) ==2720==by 0x82FDC88: execute (zend_execute.c:1391) ==2720==by 0x830140F: zend_do_fcall_common_helper (zend_execute.c:2728) ==2720== GDB: 0x08305e29 in zend_pzval_unlock_func (z=0x0) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:65 65 z->refcount--; (gdb) bt #0 0x08305e29 in zend_pzval_unlock_func (z=0x0) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:65 #1 0x083062e7 in zend_switch_free (opline=0x85bd95c, Ts=0x85bdfbc) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:205 #2 0x08302a8e in zend_switch_free_handler (execute_data=0xbfffd400, opline=0x85bd95c, op_array=0x85bded8) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:3222 #3 0x082fdc89 in execute (op_array=0x85bded8) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:1391 #4 0x08301410 in zend_do_fcall_common_helper (execute_data=0xbfffd4f0, opline=0x85bc4cc, op_array=0x85b7f5c) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2728 #5 0x08301891 in zend_do_fcall_by_name_handler (execute_data=0xbfffd4f0, opline=0x85bc4cc, op_array=0x85b7f5c) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2810 #6 0x082fdc89 in execute (op_array=0x85b7f5c) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:1391 #7 0x082da17f in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /dat/dev/php/php-5.0dev/Zend/zend.c:1061 #8 0x08293dc7 in php_execute_script (primary_file=0xb930) at /dat/dev/php/php-5.0dev/main/main.c:1629 #9 0x0830a856 in main (argc=1, argv=0xba04) at /dat/dev/php/php-5.0dev/sapi/cli/php_cli.c:943 Assinging to Andi. Previous Comments: [2004-09-02 04:48:20] norxh at binnews dot com Description: Crashes when run in cli or apache2 with no external modules. Reproduce code: --- Expected result: 1 Actual result: -- crash -- Edit this bug report at http://bugs.php.net/?id=29944&edit=1
#29944 [Asn]: Function defined in switch, crashes
ID: 29944 Updated by: [EMAIL PROTECTED] Reported By: norxh at binnews dot com Status: Assigned Bug Type: Reproducible crash Operating System: Windows XP SP2 PHP Version: 5.0.1 Assigned To: andi New Comment: This is only a problem in PHP 5.0.x (and not PHP 5.1.x-dev). Previous Comments: [2004-09-02 08:32:23] [EMAIL PROTECTED] Although I see no point in doing this at all (it should not necessarily work), it shouldn't crash either. valgrind: ==2720== Conditional jump or move depends on uninitialised value(s) ==2720==at 0x83062CB: zend_switch_free (zend_execute.c:200) ==2720==by 0x8302A8D: zend_switch_free_handler (zend_execute.c:3222) ==2720==by 0x82FDC88: execute (zend_execute.c:1391) ==2720==by 0x830140F: zend_do_fcall_common_helper (zend_execute.c:2728) ==2720==by 0x8301890: zend_do_fcall_by_name_handler (zend_execute.c:2810) ==2720== ==2720== Use of uninitialised value of size 4 ==2720==at 0x8305E29: zend_pzval_unlock_func (zend_execute.c:65) ==2720==by 0x83062E6: zend_switch_free (zend_execute.c:205) ==2720==by 0x8302A8D: zend_switch_free_handler (zend_execute.c:3222) ==2720==by 0x82FDC88: execute (zend_execute.c:1391) ==2720==by 0x830140F: zend_do_fcall_common_helper (zend_execute.c:2728) ==2720== ==2720== Invalid read of size 4 ==2720==at 0x8305E29: zend_pzval_unlock_func (zend_execute.c:65) ==2720==by 0x83062E6: zend_switch_free (zend_execute.c:205) ==2720==by 0x8302A8D: zend_switch_free_handler (zend_execute.c:3222) ==2720==by 0x82FDC88: execute (zend_execute.c:1391) ==2720==by 0x830140F: zend_do_fcall_common_helper (zend_execute.c:2728) ==2720== Address 0x8 is not stack'd, malloc'd or (recently) free'd ==2720== ==2720== Process terminating with default action of signal 11 (SIGSEGV) ==2720== Access not within mapped region at address 0x8 ==2720==at 0x8305E29: zend_pzval_unlock_func (zend_execute.c:65) ==2720==by 0x83062E6: zend_switch_free (zend_execute.c:205) ==2720==by 0x8302A8D: zend_switch_free_handler (zend_execute.c:3222) ==2720==by 0x82FDC88: execute (zend_execute.c:1391) ==2720==by 0x830140F: zend_do_fcall_common_helper (zend_execute.c:2728) ==2720== GDB: 0x08305e29 in zend_pzval_unlock_func (z=0x0) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:65 65 z->refcount--; (gdb) bt #0 0x08305e29 in zend_pzval_unlock_func (z=0x0) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:65 #1 0x083062e7 in zend_switch_free (opline=0x85bd95c, Ts=0x85bdfbc) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:205 #2 0x08302a8e in zend_switch_free_handler (execute_data=0xbfffd400, opline=0x85bd95c, op_array=0x85bded8) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:3222 #3 0x082fdc89 in execute (op_array=0x85bded8) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:1391 #4 0x08301410 in zend_do_fcall_common_helper (execute_data=0xbfffd4f0, opline=0x85bc4cc, op_array=0x85b7f5c) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2728 #5 0x08301891 in zend_do_fcall_by_name_handler (execute_data=0xbfffd4f0, opline=0x85bc4cc, op_array=0x85b7f5c) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2810 #6 0x082fdc89 in execute (op_array=0x85b7f5c) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:1391 #7 0x082da17f in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /dat/dev/php/php-5.0dev/Zend/zend.c:1061 #8 0x08293dc7 in php_execute_script (primary_file=0xb930) at /dat/dev/php/php-5.0dev/main/main.c:1629 #9 0x0830a856 in main (argc=1, argv=0xba04) at /dat/dev/php/php-5.0dev/sapi/cli/php_cli.c:943 Assinging to Andi. [2004-09-02 04:48:20] norxh at binnews dot com Description: Crashes when run in cli or apache2 with no external modules. Reproduce code: --- Expected result: 1 Actual result: -- crash -- Edit this bug report at http://bugs.php.net/?id=29944&edit=1
#29907 [Csd->Bgs]: stange str comparing results
ID: 29907 Updated by: [EMAIL PROTECTED] Reported By: benjamin dot lewis at samail dot net -Status: Closed +Status: Bogus Bug Type: Arrays related Operating System: redhat PHP Version: 4.3.7 New Comment: Not a bug in PHP then, marking as Bogus. Previous Comments: [2004-09-02 05:47:03] benjamin dot lewis at samail dot net the problem is with sorting with usort where the result of sorting with the length_and_depth function which uses an OR in the condition, gives strange results conpared with sorting on the two conditions alone. [2004-08-31 08:53:33] [EMAIL PROTECTED] Try to reduce the code so we can understand the problem without having to read huge and tangled scripts. Btw, 4.3.7 is not the current stable version, so you'd better update it. [2004-08-31 08:50:46] benjamin dot lewis at samail dot net usort [2004-08-31 08:48:02] benjamin dot lewis at samail dot net Description: cases length and value give the expected results, but when mixed in the case of length_and_value it gives unexpected results. Sorry for posting more than 20 lines i don't have an open server to post it to. Ben Reproduce code: --- '.$id; echo ''; usort($doesntwork, 'length'); foreach($doesntwork as $id) echo ''.$id; echo ''; usort($doesntwork, 'value'); foreach($doesntwork as $id) echo ''.$id; echo ''; usort($doesntwork, 'length_and_value'); foreach($doesntwork as $id) echo ''.$id; echo ''; } ?> -- Edit this bug report at http://bugs.php.net/?id=29907&edit=1
#29937 [Fbk->Opn]: $_FILES['name'] no longer has full path (from 4.3.4 to 4.3.8)
ID: 29937 User updated by: justin at timelesstech dot com Reported By: justin at timelesstech dot com -Status: Feedback +Status: Open Bug Type: *Directory/Filesystem functions Operating System: FreeBSD 4.8 stable PHP Version: 4.3.8 New Comment: Our web host, pair Networks, installed the PHP version to the server. I believe they compiled from source, and I know they are experts at installing and configuring PHP as they manage hundreds of servers. >From a phpinfo() command here are the configure command options they used on Aug 18/04: './configure' '--with-apache=/usr/pair/sw/apache_1.3.29' '--with-config-file-path=/usr/local/etc' '--enable-magic-quotes' '--enable-bcmath' '--without-cdb' '--with-zlib-dir=/usr/local' '--with-gd' '--with-ttf' '--without-msql' '--with-mysql=/usr/local' '--with-iodbc' '--with-pdflib' '--enable-inline-optimization' '--disable-memory-limit' '--with-db' '--without-gdbm' '--with-ndbm' '--without-db2' '--without-dbm' '--with-gettext' '--without-readline' '--with-recode' '--without-openssl' '--with-mcrypt' '--without-db3' '--enable-dba' '--with-curl' '--with-png-dir=/usr/local/lib' '--with-jpeg-dir=/usr/local/lib' '--enable-calendar' '--with-mhash' '--enable-xslt' '--with-xslt-sablot' '--with-expat-dir=/usr/local' '--enable-gd-lzw-gif' '--enable-mstring' Previous Comments: [2004-09-02 08:20:28] [EMAIL PROTECTED] Did you compile PHP from source or did you use the ports? If you used the ports, can you check what patches were applied to the clean php source? [2004-09-01 22:40:40] justin at timelesstech dot com Description: We have had scripts running for a while now fine on PHP 4.3.4 that assume that the $_FILES['name'] value on file uploads contains the full /path/to/the/filename.txt However after our server admins upgraded to PHP 4.3.8 the $FILES['name'] now only contains the filename, with no path. This makes it impossible for our recursive file uploader script to work, since it NEEDS the pathname of those files to know what directory/subdir on the server to upload the file(s) to! The changelog does not mention this, but does anybody have any ideas? -- Edit this bug report at http://bugs.php.net/?id=29937&edit=1