#41932 [Bgs]: fsockopen - apache2 poblem with many vhosts
ID: 41932 User updated by: yaboll at interia dot pl Reported By: yaboll at interia dot pl Status: Bogus Bug Type: Sockets related Operating System: linux PHP Version: 4.4.7 New Comment: There is no nfile limit in apache server. When i change nfile limit I have the same results (error or seqfault) Limit are set to unlimited/high value intentionally for this test: This is results in system('ulimit -a'); core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 1048576 pipe size (512 bytes, -p) 8 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) unlimited virtual memory (kbytes, -v) 25 I would like to emphasize that when I use php 5.2 everything works fine within the same limits/apache2 config. The problem is connected with php 4.4.7 in mod_php. When i use 4.4.7 in cgi, or php 5.2 in mod_php (same ulimit and apache2 config) or 5.2 in cgi mode script return good results. Previous Comments: [2007-07-09 20:32:22] [EMAIL PROTECTED] You've run into your system's file descriptor limit. Not PHP problem. [2007-07-09 08:10:19] yaboll at interia dot pl Well, as this bug is version 4.4.7 related, I hope that this is some kind of automatic reply :D Downloading 5.2 will solve the problem, but it would be nice to see it corrected in php4. [2007-07-09 07:53:00] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-07-09 07:43:44] yaboll at interia dot pl Description: I found problem in fsockopen() when I use php as module mod_php in apache2. When I create many vhost fsckopen() doesn't work good and generate child sigterm error. I made some experimets with vhost number: vhosts number - error less than 1005 - work fine 1006-1007 - white page (no error) 1008 - around 1164 - "Operation now in progress (115)" around 1150 - around 1164 - "Bad file descriptor (9)" around 1164 - around 1200 - "Operation now in progress (115)" 1200 and more - apache child sigterm core in sigterm: (gdb) bt #0 php_hostconnect (host=Cannot access memory at address 0xc ) at /srv/dev-dev/php4-debug/php4/php4-4.4.7/main/network.c:490 Cannot access memory at address 0x4 (gdb) When I use php in cgi/cli mode all works fine. Reproduce code: --- \n"; } else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host: www.onet.pl\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?> -- Edit this bug report at http://bugs.php.net/?id=41932&edit=1
#41947 [NEW]: SimpleXML incorrectly registers empty strings as namespaces
From: hubert dot roksor at gmail dot com Operating system: PHP version: 5CVS-2007-07-10 (snap) PHP Bug Type: SimpleXML related Bug description: SimpleXML incorrectly registers empty strings as namespaces Description: As per XML Namespaces specifications, "The attribute value in a default namespace declaration MAY be empty. This has the same effect, within the scope of the declaration, of there being no default namespace." (source: http://www.w3.org/TR/REC-xml-names/#defaulting) However, when creating elements using an empty string as namespace, SimpleXML seems to register the empty string as a namespace instead of just removing any inherited namespace. In the reproduce code below, we generate an empty tree to which we add a new element "child" in the namespace "http://myns";. Then we add an element "grandchild" (whose content will be "hello") to that element using an empty string as namespace so that "grandchild" does not inherit "http://myns"; as namespace. Then we attempt to transform the tree using XSLT, and verify grandchild's namespaces with getNamespaces(). Apparently, it is impossible to access "grandchild" in XSL because it belongs to an empty namespace using an empty prefix (as shown with getNamespaces()). Reloading the tree by dumping it as XML then reparsing it with simplexml_load_string() circumvents that bug. Tested on: PHP 5.2.4-dev (cli) (built: Jul 10 2007 00:04:16) libXML Version => 2.6.26 SimpleXML Revision => $Revision: 1.151.2.22.2.32 $ libxslt Version => 1.1.17 Reproduce code: --- http://myns"; />'); $grandchild = $xml->addChild('child', null, 'http://myns')->addChild('grandchild', 'hello', ''); $xslt = new XSLTProcessor; $xslt->importStylesheet(simplexml_load_string(' http://www.w3.org/1999/XSL/Transform"; xmlns:myns="http://myns";> [] ')); echo 'output before reload: ', $xslt->transformToXML($xml), "namespaces: ", print_r($grandchild->getNamespaces(), true); $xml = simplexml_load_string($xml->asXML()); $children = $xml->children('http://myns'); $grandchild = $children[0]->grandchild; echo "\noutput after reload: ", $xslt->transformToXML($xml), "namespaces: ", print_r($grandchild->getNamespaces(), true); ?> Expected result: output before reload: [hello] namespaces: Array ( ) output after reload: [hello] namespaces: Array ( ) Actual result: -- output before reload: [] namespaces: Array ( [] => ) output after reload: [hello] namespaces: Array ( ) -- Edit bug report at http://bugs.php.net/?id=41947&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41947&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41947&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41947&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41947&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41947&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41947&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=41947&r=needscript Try newer version:http://bugs.php.net/fix.php?id=41947&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41947&r=support Expected behavior:http://bugs.php.net/fix.php?id=41947&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41947&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41947&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41947&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41947&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41947&r=dst IIS Stability:http://bugs.php.net/fix.php?id=41947&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41947&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41947&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41947&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=41947&r=mysqlcfg
#41941 [Opn->Asn]: oci8 extension not lib64 savvy
ID: 41941 Updated by: [EMAIL PROTECTED] Reported By: wdierkes at 5dollarwhitebox dot org -Status: Open +Status: Assigned Bug Type: OCI8 related Operating System: Redhat Enterprise Linux PHP Version: 5.2.3 Assigned To: sixd Previous Comments: [2007-07-09 23:14:12] wdierkes at 5dollarwhitebox dot org I built, and maintain the RPMS (internally) based off of a FedoraCore SPEC with minimal changes (I believe they dropped the package though as it was hard to find). The 'lib' directory is based off of the '%{_libdir}' RPM macro (as it should be) placing the library data in '/usr/lib64' on an x86_64 box (as it should as well). This issue is not with the RPM... rather the fact that '/usr/lib' is hardcoded in the config.m4 line (as described above) that determines the '/usr/include...' path for oci.h. [2007-07-09 23:03:28] [EMAIL PROTECTED] Oracle doesn't distribute x64 RPMs for Instant Client, though there has been some discussion about it. Who created the RPMs you are using? [2007-07-09 17:29:16] wdierkes at 5dollarwhitebox dot org Description: Related to Bug 35471 - could not open/comment on that bug report. Oracle InstantClient 10.2.0.3 (RPM) Redhat Enterprise Linux 3/4 x86_64 configure --with-oci8=shared,instantclient,/usr/lib64/oracle/10.2.0.3/client/lib When compiling php-5.2.3 on x86_64, configure fails with the following: ... checking Oracle Instant Client directory... /usr/lib64/oracle/10.2.0.3/client/lib checking Oracle Instant Client SDK header directory... configure: error: Oracle Instant Client SDK header files not found The issue is at the following line (around line 345-350) in php-5.2.3/ext/oci8/config.m4: OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client/lib[/]*$!/usr/include/oracle/\1/client!'` Obviously, $OCISDKRPMINC is hardcoded to sed up the line based on '/usr/lib'. This should be 32bit/64bit savvy, or can just as easily be done differently. The following patch resolved the issue: http://devel.5dollarwhitebox.org/patches/php-5.2.3-oci8-lib64.patch --- php-5.2.3/ext/oci8/config.m4.oci8 2007-05-04 06:30:37.0 -0500 +++ php-5.2.3/ext/oci8/config.m42007-07-09 11:49:26.0 -0500 @@ -345,7 +345,8 @@ AC_MSG_CHECKING([Oracle Instant Client SDK header directory]) dnl Header directory for Instant Client SDK RPM install - OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client/lib[/]*$!/usr/include/oracle/\1/client!'` + INSTANT_CLIENT_VERSION=`echo "$PHP_OCI8_INSTANT_CLIENT" | awk -F / {' print $5 '}` + OCISDKRPMINC="/usr/include/oracle/${INSTANT_CLIENT_VERSION}/client" dnl Header directory for Instant Client SDK zip file install OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include A cleaner and more flexible solution would be to add a '--oci8-include' option along with the standard '--with-oci8' option. Basically... the directory passed to '--with-oci8' directs configure to the path where the library files are The rest of the code is assuming that the header files are in a set location '/usr/include/oracle//client'... there should be an option to override this location of oci.h. Reproduce code: --- configure --with-oci8=shared,instantclient,/usr/lib64/oracle/10.2.0.3/client/lib Expected result: configure properly finds oci.h in the default include dir for oracle. Actual result: -- checking Oracle Instant Client directory... /usr/lib64/oracle/10.2.0.3/client/lib checking Oracle Instant Client SDK header directory... configure: error: Oracle Instant Client SDK header files not found -- Edit this bug report at http://bugs.php.net/?id=41941&edit=1
#41948 [NEW]: Cant catch "PHP Catchable fatal error ... must be an instance of ..."
From: zolv at t-k dot pl Operating system: x86_64-2.6.19-gentoo-r4 PHP version: 5.2.3 PHP Bug Type: Scripting Engine problem Bug description: Cant catch "PHP Catchable fatal error ... must be an instance of ..." Description: catch ( Exception $e) { doesnt catch fatal error exception: PHP Catchable fatal error: Argument 1 passed to AaaCollection::setAaa() must be an instance of Aaa, instance of Bbb given Reproduce code: --- setAaa( $bbb ); } catch ( Exception $e) { echo 'Exception has been catched'; } Expected result: exception should be catched -- Edit bug report at http://bugs.php.net/?id=41948&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41948&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41948&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41948&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41948&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41948&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41948&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=41948&r=needscript Try newer version:http://bugs.php.net/fix.php?id=41948&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41948&r=support Expected behavior:http://bugs.php.net/fix.php?id=41948&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41948&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41948&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41948&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41948&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41948&r=dst IIS Stability:http://bugs.php.net/fix.php?id=41948&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41948&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41948&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41948&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=41948&r=mysqlcfg
#41948 [Opn]: Cant catch "PHP Catchable fatal error ... must be an instance of ..."
ID: 41948 User updated by: zolv at t-k dot pl Reported By: zolv at t-k dot pl Status: Open Bug Type: Scripting Engine problem Operating System: x86_64-2.6.19-gentoo-r4 PHP Version: 5.2.3 New Comment: more info about my environment: running on: # php --version PHP 5.2.2-pl1-gentoo (cli) (built: Jun 28 2007 10:11:51) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies with Xdebug v2.0.0RC3, Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, by Derick Rethans p.s. sory, but there is no port for php 5.2.3 on gentoo jet Previous Comments: [2007-07-10 10:04:08] zolv at t-k dot pl Description: catch ( Exception $e) { doesnt catch fatal error exception: PHP Catchable fatal error: Argument 1 passed to AaaCollection::setAaa() must be an instance of Aaa, instance of Bbb given Reproduce code: --- setAaa( $bbb ); } catch ( Exception $e) { echo 'Exception has been catched'; } Expected result: exception should be catched -- Edit this bug report at http://bugs.php.net/?id=41948&edit=1
#41948 [Opn->Bgs]: Cant catch "PHP Catchable fatal error ... must be an instance of ..."
ID: 41948 Updated by: [EMAIL PROTECTED] Reported By: zolv at t-k dot pl -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: x86_64-2.6.19-gentoo-r4 PHP Version: 5.2.3 New Comment: Of course not, it's not an exception but just plain and simple error. Previous Comments: [2007-07-10 10:07:31] zolv at t-k dot pl more info about my environment: running on: # php --version PHP 5.2.2-pl1-gentoo (cli) (built: Jun 28 2007 10:11:51) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies with Xdebug v2.0.0RC3, Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, by Derick Rethans p.s. sory, but there is no port for php 5.2.3 on gentoo jet [2007-07-10 10:04:08] zolv at t-k dot pl Description: catch ( Exception $e) { doesnt catch fatal error exception: PHP Catchable fatal error: Argument 1 passed to AaaCollection::setAaa() must be an instance of Aaa, instance of Bbb given Reproduce code: --- setAaa( $bbb ); } catch ( Exception $e) { echo 'Exception has been catched'; } Expected result: exception should be catched -- Edit this bug report at http://bugs.php.net/?id=41948&edit=1
#20490 [NoF->WFx]: enable versioning not supported on OSX
ID: 20490 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: No Feedback +Status: Wont fix Bug Type: *Configuration Issues Operating System: OSX 10.2.2 PHP Version: 4CVS-2002-11-18 (dev) Previous Comments: [2004-05-31 20:36:41] lockaby at vt dot edu This is still a problem in 4.3.6. [2003-06-30 19:27:44] [EMAIL PROTECTED] Is it some other flag or is it not needed at all for OSX? [2002-12-01 09:56:00] [EMAIL PROTECTED] I sent Marko a patch on this (I think) and he said he'd double check my work today sometime. Hopefully this can be fit into the 4.3 RC schedule. [2002-11-18 20:09:00] [EMAIL PROTECTED] ./configure --enable-versioning uses -export-sybmols in the ld command, this is not supported under osx and should be disabled in the configure script. -- Edit this bug report at http://bugs.php.net/?id=20490&edit=1
#41948 [Bgs->Csd]: Cant catch "PHP Catchable fatal error ... must be an instance of ..."
ID: 41948 User updated by: zolv at t-k dot pl Reported By: zolv at t-k dot pl -Status: Bogus +Status: Closed Bug Type: Scripting Engine problem Operating System: x86_64-2.6.19-gentoo-r4 PHP Version: 5.2.2 New Comment: thx for quick reply. Previous Comments: [2007-07-10 10:22:10] [EMAIL PROTECTED] Of course not, it's not an exception but just plain and simple error. [2007-07-10 10:04:08] zolv at t-k dot pl Description: catch ( Exception $e) { doesnt catch fatal error exception: PHP Catchable fatal error: Argument 1 passed to AaaCollection::setAaa() must be an instance of Aaa, instance of Bbb given Reproduce code: --- setAaa( $bbb ); } catch ( Exception $e) { echo 'Exception has been catched'; } Expected result: exception should be catched -- Edit this bug report at http://bugs.php.net/?id=41948&edit=1
#41489 [Opn->Fbk]: stream_select does not work on ssl stream_socket_server (works in 5.2.1!) on 64b
ID: 41489 Updated by: [EMAIL PROTECTED] Reported By: n dot escuder at intra-links dot com -Status: Open +Status: Feedback Bug Type: Streams related Operating System: Linux 2.6 PHP Version: 5.2.3 Assigned To: iliaa New Comment: Try building the latest 5.2 CVS snapshot without compiling anything as shared. And make sure you don't load any php.ini by passing -n to CLI when you run the scripts. Previous Comments: [2007-07-09 17:07:25] n dot escuder at intra-links dot com Linux zelda.intra-links.dev 2.6.21.4-atl-smp #1 SMP Mon Jun 25 20:28:57 CEST 2007 x86_64 GNU/Linux OpenSSL 0.9.8e 23 Feb 2007 I omit to say that PHP is the CLI Version. Build script of PHP : export EXTENSION_DIR=/usr/lib/php/extensions && ARGS="--prefix=/usr \ --sysconfdir=/etc \ --with-config-file-path=/etc \ --with-zlib-dir=/usr/lib \ --with-pear \ --enable-dom \ --enable-overload \ --enable-pcntl \ --enable-pdo \ --enable-simplexml \ --enable-zip \ --enable-json \ --with-bz2=shared \ --with-curl=shared \ --with-fam=shared \ --with-gettext=shared \ --with-iconv=shared \ --with-imap=shared \ --with-imap-ssl=shared \ --with-mysql=shared \ --with-openssl=shared \ --with-pdo-mysql=shared \ --with-pdo-sqlite=/usr \ --with-xml=shared \ --with-simplexml=shared \ --with-xmlreader=shared \ --with-xmlwriter=shared \ --enable-bcmath=shared \ --enable-calendar=shared \ --enable-ctype=shared \ --enable-exif=shared \ --enable-ftp=shared \ --enable-hash=shared \ --enable-mbstring=shared \ --enable-sockets=shared \ --enable-tokenizer=shared \ --enable-xmlreader=shared \ --enable-xmlwriter=shared \ --without-sqlite \ --disable-cgi" && ./configure $ARGS && make && make install It's an LFS OS. PHP is the core of the plateform it manage services and events between processs with RPC and more... I can give you an access if you need it. [2007-07-09 15:24:18] [EMAIL PROTECTED] Please give more information about your (64bit) system. And also the full configure line. I can NOT reproduce this using latest CVS on this system: # uname -a Linux linux5 2.6.20-1.2944.fc6 #1 SMP Tue Apr 10 17:46:00 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux (fedora 6) [2007-07-09 13:22:49] n dot escuder at intra-links dot com I have sent an email to [EMAIL PROTECTED] on 03/07/2007 with no answer. So i reopen the bug. Email content : I just retry with php 5.2.3 and php 5.2.4-dev On 64 bit plateform the ACCEPT never arrive. With PHP 5.2.1 on the same plateform ACCEPT arrive. I can do some try if you need. Email me. I don't known what to do ... And i need this function ;o) [2007-07-02 16:12:08] [EMAIL PROTECTED] I've just tried it on a 64 bit opteron and it definitely goes into "ACCEPT" [2007-07-01 01:50:13] [EMAIL PROTECTED] Ilia, can you check it out please? 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/41489 -- Edit this bug report at http://bugs.php.net/?id=41489&edit=1
#36561 [Opn->Fbk]: PDO_ODBC/MSSQL does not work with bound params in subquery
ID: 36561 Updated by: [EMAIL PROTECTED] Reported By: travis at raybold dot com -Status: Open +Status: Feedback Bug Type: PDO related Operating System: Windows XP PHP Version: 5.1.2 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2007-06-22 17:50:11] blohr at triad dot rr dot com This bug affects my app, too. I'm using PHP 5.2.3 on Windows XP Pro SP2, under both IIS 5.1 and Apache 2.2, with SQL Server 2005 Express. I don't know if it'll help or not, but here's some more reproduce code. Just fix the PDO DSN string to something valid. exec($createTable); $db->exec($createTable2); $ins = $db->prepare('INSERT INTO ##test (intCol, textCol) VALUES (:i, :t)'); $ins->execute(array('i'=>1, 't'=>'A String')); $ins2 = $db->prepare('INSERT INTO ##test2 (intCol2, textCol2) VALUES (:i, :t)'); $ins2->execute(array('i'=>1, 't'=>'Another String')); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE textCol2 = :t)'); $sel->execute(array('t'=>'Another String')) or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE intCol2 = :i)'); $sel->execute(array('i'=>1)) or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE textCol2 = :t)'); $sel->bindValue('t', 'Another String'); $sel->execute() or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE intCol2 = :i)'); $sel->bindValue('i', 1); $sel->execute() or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE textCol2 = :t)'); $sel->bindValue('t', 'Another String', PDO::PARAM_STR); $sel->execute() or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE intCol2 = :i)'); $sel->bindValue('i', 1, PDO::PARAM_INT); $sel->execute() or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE textCol2 = :t)'); $t = 'Another String'; $sel->bindParam('t', $t, PDO::PARAM_STR); $sel->execute() or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE intCol2 = :i)'); $i = 1; $sel->bindParam('i', $i, PDO::PARAM_INT); $sel->execute() or var_dump($sel->errorInfo()); ?> [2007-05-24 20:50:41] travis at raybold dot com Hey Wez, I never saw the feedback til I stumbled on it today, and clearly have been able to work around this, but it does keep stopping me. It happens exactly the same if I omit the PDO::PARAM_INT as the final parameter. I am still using the branched version you gave me... I'd be happy to test with the latest if you think it might be fixed there. --Travis [2006-04-09 07:57:01] [EMAIL PROTECTED] Try using: $oStatement->bindParam(':TestID', $iTestID); instead of: $oStatement->bindParam(':TestID', $iTestID,PDO::PARAM_INT ); The latter is implicitly binding for output, which might be part of your problem. [2006-02-28 17:10:09] travis at raybold dot com Description: Connecting to a MSSQL database through PDO_ODBC, I prepare a statement with a bound parameter inside of a subquery, and get a 42000 Syntax Error when I execute it. The error indicates that it is trying to compare text. ntext or image data, but the table consists solely of one integer field. Moving the bound parameter outside of the subquery makes it work. I am using PHP 5.1.2, MSSQL 2000, Windows XP, IIS6. Configure Line: cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" Reproduce code: --- MSSQL: CREATE TABLE zTest_TBL ( TestID int NULL ) INSERT INTO zTest_TBL (TestID) Values (1) PHP: prepare('SELECT TestID FROM zTest_TBL WHERE TestID IN (SELECT TestID FROM zTest_TBL WHERE TestID = :TestID)'); //$oStatement = $oConnection->prepare('SELECT TestID FROM zTest_TBL WHERE TestID = :TestID AND TestID IN (SELECT TestID FROM zTest_TBL )'); $oStatement->bindParam(':TestID', $iTestID,PDO::PARAM_INT ); $oStatement->execute() or print_r($oStatement->errorInfo()); foreach($oStatement as $aRow) { print_r($aRow); } ?> Expected result: Array ( [TestID] => 1 [0] => 1 ) Actual result: -- Array ( [0] => 42000 [1] => 306 [2] => [Microsof
#31892 [Ver->Fbk]: PHP_SELF incorrect without cgi.fix_pathinfo, but turning on screws up PATH_INFO
ID: 31892 Updated by: [EMAIL PROTECTED] Reported By: ceefour at gauldong dot net -Status: Verified +Status: Feedback Bug Type: CGI related Operating System: * PHP Version: 5CVS, 4CVS (2005-02-11) New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2006-05-29 18:47:35] php dot net at jon dot limedaley dot com I assume this isn't going to be fixed? since it has been a year since it was reported, and it is still in the "verified" state. I figured php5 would be stable by now, but it appears that php_self is broken with cgi.fix_pathinfo=0 and _SERVER["PATH_INFO"] is broken with cgi.fix_pathinfo=1. Is the official solution to use php4 instead? [2006-05-11 14:34:54] kk at keppler-it dot de These patches are based on the code from Dave; the work fine within our hosting environment. http://www.keppler-it.de/tmp/patch-31892-4.4.2.diff http://www.keppler-it.de/tmp/patch-31892-5.1.4.diff Comments welcome. :-) Here's the code in clear text (nearly identical for 4.x and 5.x): --- php-4.4.2/sapi/cgi/cgi_main.c.orig 2006-01-01 14:47:01.0 +0100 +++ php-4.4.2/sapi/cgi/cgi_main.c 2006-05-11 16:23:51.0 +0200 @@ -871,11 +871,25 @@ } else { #endif /* pre 4.3 behaviour, shouldn't be used but provides BC */ + /* if (env_path_info) { SG(request_info).request_uri = env_path_info; } else { SG(request_info).request_uri = env_script_name; } + */ + /* <[EMAIL PROTECTED]> PHP_SELF := SCRIPT_NAME + PATH_INFO */ + /* Patch based upon http://spoonguard.org/dave/classes/cs345/bugfix/php-5.1.2-31892.diff */ + SG(request_info).request_uri = sapi_cgibin_getenv("SCRIPT_NAME", 0 TSRMLS_CC); + if (SG(request_info).request_uri && (env_path_info = sapi_cgibin_getenv("PATH_INFO", 0 TSRMLS_CC))) { + int request_uri_len = strlen(SG(request_info).request_uri) + strlen(env_path_info) + 1; + char *request_uri = (char *) emalloc(request_uri_len); + *request_uri = '\0'; + strcat(request_uri, SG(request_info).request_uri); + strcat(request_uri, env_path_info); + SG(request_info).request_uri = request_uri; + } + /* */ #if !DISCARD_PATH if (env_path_translated) script_path_translated = env_path_translated; [2006-05-09 02:11:21] lwalker at magi dot net dot au I'm expreiencing the same issue on PHP 4.3 + 4.4 under Apache 1.3.33 and have had to switch back to mod_php for our hosting server. Tried to access the patch to have a look at it, however it's not loading. Do you still have a copy of the patch, or are you able to post a backported PHP 4.x version? I do believe that SCRIPT_NAME + PHP_INFO is the expected behaviour. [2006-02-06 21:52:39] php-bugs at dave dot staff dot spoonguard dot org The following patch causes $_SERVER['PHP_SELF'] to include the PATH_INFO component when running under CGI: http://spoonguard.org/dave/classes/cs345/bugfix/php-5.1.2-31892.diff Previously, PHP_SELF was being set to SCRIPT_NAME when cgi.fix_pathinfo was set. This changes the behavior, by setting PHP_SELF to SCRIPT_NAME + PATH_INFO. Is this similar to what you're looking for? Thanks, - Dave [2005-02-13 23:19:43] ceefour at gauldong dot net I have verified this problem with PHP 5.0.3 on Linux 2.4 and it also exists in PHP 5.0.3. I'm using PHP 5.0.3 as CGI under Apache 1.3.33. Check out this link: http://php5.gauldong.net/phpinfo.php/test/me?query=string It gives out the following results: _SERVER["PATH_INFO"]/test/me _SERVER["PATH_TRANSLATED"] /home/u1294/domain/php5.gauldong.net/web/test/me _SERVER["ORIG_PATH_TRANSLATED"] /home/u1294/domain/php5.gauldong.net/web/phpinfo.php/test/me _SERVER["ORIG_PATH_INFO"] /phpinfo.php/test/me _SERVER["ORIG_SCRIPT_NAME"] /cgi-bin/php _SERVER["ORIG_SCRIPT_FILENAME"] /home/u1294/domain/php5.gauldong.net/web/cgi-bin/php _SERVER["PHP_SELF"]
#41947 [Opn->Csd]: SimpleXML incorrectly registers empty strings as namespaces
ID: 41947 Updated by: [EMAIL PROTECTED] Reported By: hubert dot roksor at gmail dot com -Status: Open +Status: Closed Bug Type:SimpleXML related PHP Version: 5CVS-2007-07-10 (snap) 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: [2007-07-10 08:17:06] hubert dot roksor at gmail dot com Description: As per XML Namespaces specifications, "The attribute value in a default namespace declaration MAY be empty. This has the same effect, within the scope of the declaration, of there being no default namespace." (source: http://www.w3.org/TR/REC-xml-names/#defaulting) However, when creating elements using an empty string as namespace, SimpleXML seems to register the empty string as a namespace instead of just removing any inherited namespace. In the reproduce code below, we generate an empty tree to which we add a new element "child" in the namespace "http://myns";. Then we add an element "grandchild" (whose content will be "hello") to that element using an empty string as namespace so that "grandchild" does not inherit "http://myns"; as namespace. Then we attempt to transform the tree using XSLT, and verify grandchild's namespaces with getNamespaces(). Apparently, it is impossible to access "grandchild" in XSL because it belongs to an empty namespace using an empty prefix (as shown with getNamespaces()). Reloading the tree by dumping it as XML then reparsing it with simplexml_load_string() circumvents that bug. Tested on: PHP 5.2.4-dev (cli) (built: Jul 10 2007 00:04:16) libXML Version => 2.6.26 SimpleXML Revision => $Revision: 1.151.2.22.2.32 $ libxslt Version => 1.1.17 Reproduce code: --- http://myns"; />'); $grandchild = $xml->addChild('child', null, 'http://myns')->addChild('grandchild', 'hello', ''); $xslt = new XSLTProcessor; $xslt->importStylesheet(simplexml_load_string(' http://www.w3.org/1999/XSL/Transform"; xmlns:myns="http://myns";> [] ')); echo 'output before reload: ', $xslt->transformToXML($xml), "namespaces: ", print_r($grandchild->getNamespaces(), true); $xml = simplexml_load_string($xml->asXML()); $children = $xml->children('http://myns'); $grandchild = $children[0]->grandchild; echo "\noutput after reload: ", $xslt->transformToXML($xml), "namespaces: ", print_r($grandchild->getNamespaces(), true); ?> Expected result: output before reload: [hello] namespaces: Array ( ) output after reload: [hello] namespaces: Array ( ) Actual result: -- output before reload: [] namespaces: Array ( [] => ) output after reload: [hello] namespaces: Array ( ) -- Edit this bug report at http://bugs.php.net/?id=41947&edit=1
#41949 [NEW]: __soapCall (client) within new SoapServer object ignores uri
From: ak at greatnet dot de Operating system: Linux Debian 2.6.18 PHP version: 5.2.3 PHP Bug Type: SOAP related Bug description: __soapCall (client) within new SoapServer object ignores uri Description: calling a new client while executing a registered server function results a 'No such operation' message. Reproduce code: --- "soapserver.php5")); $server->addFunction('submitTEST'); $server->handle(); $method="somemethod"; $params=array("test1"=>"test1"); function submitTEST ($method,$params) { $client = new SoapClient('http://some.far.wsdl'); $submit = $client->__soapCall($method, $params); } ?> Expected result: Expected to see the result of the existing function on the external soap server. Actual result: -- Uncaught SoapFault exception: [Server.userException] No such operation 'somemethod' -- Edit bug report at http://bugs.php.net/?id=41949&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41949&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41949&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41949&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41949&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41949&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41949&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=41949&r=needscript Try newer version:http://bugs.php.net/fix.php?id=41949&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41949&r=support Expected behavior:http://bugs.php.net/fix.php?id=41949&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41949&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41949&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41949&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41949&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41949&r=dst IIS Stability:http://bugs.php.net/fix.php?id=41949&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41949&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41949&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41949&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=41949&r=mysqlcfg
#41489 [Fbk->Opn]: stream_select does not work on ssl stream_socket_server (works in 5.2.1!) on 64b
ID: 41489 User updated by: n dot escuder at intra-links dot com Reported By: n dot escuder at intra-links dot com -Status: Feedback +Status: Open Bug Type: Streams related Operating System: Linux 2.6 PHP Version: 5.2.3 Assigned To: iliaa New Comment: I did it with php5.2-200707101030 I ran with -n and the problems stay. ACCEPT never arrive. Previous Comments: [2007-07-10 11:30:20] [EMAIL PROTECTED] Try building the latest 5.2 CVS snapshot without compiling anything as shared. And make sure you don't load any php.ini by passing -n to CLI when you run the scripts. [2007-07-09 17:07:25] n dot escuder at intra-links dot com Linux zelda.intra-links.dev 2.6.21.4-atl-smp #1 SMP Mon Jun 25 20:28:57 CEST 2007 x86_64 GNU/Linux OpenSSL 0.9.8e 23 Feb 2007 I omit to say that PHP is the CLI Version. Build script of PHP : export EXTENSION_DIR=/usr/lib/php/extensions && ARGS="--prefix=/usr \ --sysconfdir=/etc \ --with-config-file-path=/etc \ --with-zlib-dir=/usr/lib \ --with-pear \ --enable-dom \ --enable-overload \ --enable-pcntl \ --enable-pdo \ --enable-simplexml \ --enable-zip \ --enable-json \ --with-bz2=shared \ --with-curl=shared \ --with-fam=shared \ --with-gettext=shared \ --with-iconv=shared \ --with-imap=shared \ --with-imap-ssl=shared \ --with-mysql=shared \ --with-openssl=shared \ --with-pdo-mysql=shared \ --with-pdo-sqlite=/usr \ --with-xml=shared \ --with-simplexml=shared \ --with-xmlreader=shared \ --with-xmlwriter=shared \ --enable-bcmath=shared \ --enable-calendar=shared \ --enable-ctype=shared \ --enable-exif=shared \ --enable-ftp=shared \ --enable-hash=shared \ --enable-mbstring=shared \ --enable-sockets=shared \ --enable-tokenizer=shared \ --enable-xmlreader=shared \ --enable-xmlwriter=shared \ --without-sqlite \ --disable-cgi" && ./configure $ARGS && make && make install It's an LFS OS. PHP is the core of the plateform it manage services and events between processs with RPC and more... I can give you an access if you need it. [2007-07-09 15:24:18] [EMAIL PROTECTED] Please give more information about your (64bit) system. And also the full configure line. I can NOT reproduce this using latest CVS on this system: # uname -a Linux linux5 2.6.20-1.2944.fc6 #1 SMP Tue Apr 10 17:46:00 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux (fedora 6) [2007-07-09 13:22:49] n dot escuder at intra-links dot com I have sent an email to [EMAIL PROTECTED] on 03/07/2007 with no answer. So i reopen the bug. Email content : I just retry with php 5.2.3 and php 5.2.4-dev On 64 bit plateform the ACCEPT never arrive. With PHP 5.2.1 on the same plateform ACCEPT arrive. I can do some try if you need. Email me. I don't known what to do ... And i need this function ;o) [2007-07-02 16:12:08] [EMAIL PROTECTED] I've just tried it on a 64 bit opteron and it definitely goes into "ACCEPT" 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/41489 -- Edit this bug report at http://bugs.php.net/?id=41489&edit=1
#37900 [Com]: NULL values on a first record
ID: 37900 Comment by: johnbrown at yahoo dot com Reported By: ovendrell at oip dot jazztel dot es Status: Open Bug Type: ODBC related Operating System: Linux PHP Version: 5.1.4 New Comment: leave it Previous Comments: [2006-06-23 10:10:18] ovendrell at oip dot jazztel dot es Description: I work with this environment: * OS: Linux * Web server: Apache 2.0 * DB server: Microsoft SQL server (7.0 or 2000) * PHP 5.1.2 I execute a query with odbc_query() function. when the first record result has a NULL value in a field, the next record that doesn't has a NULL value in the same field doesn't return the correct value. It returns unrecognizable chars. Reproduce code: --- $res = odbc_exec ($bd, "SELECT Id, Num, Obs FROM publicacions"); odbc_result_all ($res); --- $res = odbc_exec ($bd, "SELECT Id, Num FROM publicacions"); while (odbc_fetch_row ($res)) echo odbc_result ($res, "Id")." ".odbc_result ($res, "Num")." ".odbc_result ($res, "Obs").""; Expected result: Id Num Obs -- 1NULL NULL 2NULL comment 323NULL 445a 5NULL 612c Actual result: -- Id Num Obs -- 1NULL NULL 2NULL [EMAIL PROTECTED]@ 3èH@ NULL 445a 5NULL 612c -- Edit this bug report at http://bugs.php.net/?id=37900&edit=1
#41950 [NEW]: Sybase module complains that date strings are not null terminated
From: ivan dot s dot borisov at gmail dot com Operating system: gentoo linux PHP version: 5.2.3 PHP Bug Type: Sybase (dblib) related Bug description: Sybase module complains that date strings are not null terminated Description: Bug #30224 Sybase module complains that date strings are not null terminated I'v got result of script but i also got this warning: Warning: String is not zero-terminated (Jul 10 2007 09:40PM МЏ* ) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Reproduce code: --- #!/usr/bin/php -q 'sybase', 'username' => 'sa', 'password' => '123456', 'hostspec' => '10.1.1.101:5000', 'database' => 'kinomir' ); $DB_options = array ( 'debug' => 2, 'persistent' => TRUE, 'portability' => DB_PORTABILITY_ALL, ); $db =& DB::connect($dsn, $DB_options); if (PEAR::isError($db)) { echo 'mes:'.$db->getMessage(); exit; } $db->setFetchMode(DB_FETCHMODE_ASSOC); $q = "SELECT * FROM performance"; $res =& $db->query($q); $kol_vo_strok = $res->numRows(); if($kol_vo_strok >=1) { while($res->fetchInto($row)) { print $row['idperformance']."\n"; } } $db->disconnect(); ?> Expected result: Warning: String is not zero-terminated (Jul 11 2007 12:00AM МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4551130 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4550026 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (2 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (120.00 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (3 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (Jul 10 2007 09:40PM МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (Jul 11 2007 12:00AM МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4551130 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4550026 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (2 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (120.00 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (Jul 10 2007 09:40PM МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (Jul 11 2007 12:00AM МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4551130 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4550026 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (2 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (250.00 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (5 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/z
#39858 [Com]: Lost connection to MySQL server during query by a repeated call stored proced
ID: 39858 Comment by: matt dot keeble at gmail dot com Reported By: develar at gmail dot com Status: Assigned Bug Type: PDO related Operating System: Windows XP SP2 PHP Version: 5.2.0 Assigned To: wez New Comment: As an update to this, I'm not sure that this is a bug in PHP at all - I believe it's a bug with MySQL. Have stumbled across this bug report today after receiving MySQL lost connections from the MySQL command line, and from Navicat Terminal - in both cases there was no PHP involved at all, just an SP that calls a function in a loop which subsequently calls another function. The SP returns the first row, but then dies with the error message and goes into an irretrievable loop (in Navicat). Don't know if this will help, but thought I would share... Previous Comments: [2007-06-21 12:58:38] timo at hhesse dot de Well, this is very disappointing. A new PHP version is out and this stupid bug has not been fixed although a solution seems to be found by mike at we11er dot co dot uk. I can't use PHP5 without this hacked dll on our servers. Seems like no one feels responsible for developers on windows servers. "There's no bug on linux so what are you talking about...?" [2007-05-18 21:12:31] paulsidekick at gmail dot com I am still not able to issue two stored procedures in a row using PDO and mysql 5.0.31, php 5.2.1 and windows server 2003 when using the php pdo_mysql.dll extension. Is there any fix for this planned? It has been a very long time since it was first noted. If there is a solution other than using a hacked DLL with no source code, can somebody please advice. This is the simplest way to see it happen. $stmt = $myPdoConnection->query("CALL myStoredProc ('x', 'y')"); //this returns results print_r($stmt->fetchAll()); //this does not - says mysql lost connection print_r($stmt->fetchAll()); If I do this with SELECT statements instead I get no problem. I believe that there is an additional row set send back with stored procedures from mysql that needs to be interated over in order to issue the next statement. However, I cannot access them with $stmt->nextRowset(); as I get "Warning: PDOStatement::nextRowset() [function.PDOStatement-nextRowset]: SQLSTATE[HYC00]: Optional feature not implemented in " Please help. [2007-04-09 19:13:53] jaylehvee at srgtampa dot com I am using this modified DLL, above, and it works great, in most regards. The core issue still exists, however. Mulitple calls to stored procedures are still causing db connection loss. I've had to go lazy-load kuh-ray-zee on my objects to avoid connection failures. I shouldn't have to use the wrong patterns in order to work around a faulty db driver. Mike, any chance you can post your hacked source somewhere? [2007-03-26 19:57:43] timo at hhesse dot de Hi mike, thanks for the fixed php_pdo_mysql.dll! I tested it right now and it works perfectly! It took me quite the whole day finding out that it was a php bug what made my stored procedures producing those exceptions (on Windows IIS). But now I'm asking myself if your fix will find its way into the next PHP release so that I can be sure my code will work at my customers Windows servers too or if I should use some script language that supports stored procedures as they are meant... A reliable answer in this issue would be great! ;-) [2007-03-09 13:24:09] mike at we11er dot co dot uk Hi everyone. We have a fixed php_pdo_mysql.dll in our svn repos - but the guy that compiled it all hasn't got the source together because it involved a massive overhaul of the php and extension code to support the latest mysql libs. I know your first thoughts will be "There's no way I'm going to use a .dll from a *hackthissite*!", that's fine... but the guy that compiled it can be trusted, and I've been using it on my windows machine for a week or two now. http://source.hackthissite.org/wsvn/HTSv4/trunk/PDO/php_pdo_mysql.dll I'll see if we can get some sort of source code version together. Until then, use this at your own risk. 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/39858 -- Edit this bug report at http://bugs.php.net/?id=39858&edit=1
#41951 [NEW]: floats are stored as ints
From: rachmel at avaya dot com Operating system: WindRiver Linux PHP version: 5.2.3 PHP Bug Type: *Math Functions Bug description: floats are stored as ints Description: I am cross compiling php from i686-red-hat linux plat to ppc-windriver linux plat. The problem I see, is that when trying to assign a value bigger than MAX_INT (2147483648-1), the variable gets the value of MAX_INT-1. This is not just an explicit variable issue. Just trying to 'echo' the same value results in the same problem. When compiling for my i686 platform, this problem doesn't occur. I am upgrading from php 5.1.4, and I didn't have any problems in that version. Reproduce code: --- Expected result: float(2415919103) float(2415919103) Actual result: -- int(2147483647) int(2147483647) -- Edit bug report at http://bugs.php.net/?id=41951&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41951&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41951&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41951&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41951&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41951&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41951&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=41951&r=needscript Try newer version:http://bugs.php.net/fix.php?id=41951&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41951&r=support Expected behavior:http://bugs.php.net/fix.php?id=41951&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41951&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41951&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41951&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41951&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41951&r=dst IIS Stability:http://bugs.php.net/fix.php?id=41951&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41951&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41951&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41951&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=41951&r=mysqlcfg
#41951 [Opn->Fbk]: floats are stored as ints
ID: 41951 Updated by: [EMAIL PROTECTED] Reported By: rachmel at avaya dot com -Status: Open +Status: Feedback Bug Type: *Math Functions Operating System: WindRiver Linux PHP Version: 5.2.3 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2007-07-10 13:54:39] rachmel at avaya dot com Description: I am cross compiling php from i686-red-hat linux plat to ppc-windriver linux plat. The problem I see, is that when trying to assign a value bigger than MAX_INT (2147483648-1), the variable gets the value of MAX_INT-1. This is not just an explicit variable issue. Just trying to 'echo' the same value results in the same problem. When compiling for my i686 platform, this problem doesn't occur. I am upgrading from php 5.1.4, and I didn't have any problems in that version. Reproduce code: --- Expected result: float(2415919103) float(2415919103) Actual result: -- int(2147483647) int(2147483647) -- Edit this bug report at http://bugs.php.net/?id=41951&edit=1
#41950 [Opn->Fbk]: Sybase module complains that date strings are not null terminated
ID: 41950 Updated by: [EMAIL PROTECTED] Reported By: ivan dot s dot borisov at gmail dot com -Status: Open +Status: Feedback Bug Type: Sybase (dblib) related Operating System: gentoo linux PHP Version: 5.2.3 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2007-07-10 13:02:24] ivan dot s dot borisov at gmail dot com Description: Bug #30224 Sybase module complains that date strings are not null terminated I'v got result of script but i also got this warning: Warning: String is not zero-terminated (Jul 10 2007 09:40PM МЏ* ) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Reproduce code: --- #!/usr/bin/php -q 'sybase', 'username' => 'sa', 'password' => '123456', 'hostspec' => '10.1.1.101:5000', 'database' => 'kinomir' ); $DB_options = array ( 'debug' => 2, 'persistent' => TRUE, 'portability' => DB_PORTABILITY_ALL, ); $db =& DB::connect($dsn, $DB_options); if (PEAR::isError($db)) { echo 'mes:'.$db->getMessage(); exit; } $db->setFetchMode(DB_FETCHMODE_ASSOC); $q = "SELECT * FROM performance"; $res =& $db->query($q); $kol_vo_strok = $res->numRows(); if($kol_vo_strok >=1) { while($res->fetchInto($row)) { print $row['idperformance']."\n"; } } $db->disconnect(); ?> Expected result: Warning: String is not zero-terminated (Jul 11 2007 12:00AM МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4551130 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4550026 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (2 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (120.00 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (3 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (Jul 10 2007 09:40PM МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (Jul 11 2007 12:00AM МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4551130 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4550026 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (2 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (120.00 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (Jul 10 2007 09:40PM МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (Jul 11 2007 12:00AM МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4551130 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (4550026 МЏ*) (source: /var/tmp/portage/dev-lang/php-5.1.6-r11/work/php-5.1.6/Zend/zend_variables.h:35) in Unknown on line 0 Warning: String is not zero-terminated (2
#41489 [Opn->Fbk]: stream_select does not work on ssl stream_socket_server (works in 5.2.1!) on 64b
ID: 41489 Updated by: [EMAIL PROTECTED] Reported By: n dot escuder at intra-links dot com -Status: Open +Status: Feedback Bug Type: Streams related Operating System: Linux 2.6 PHP Version: 5.2.3 Assigned To: iliaa New Comment: Did you try cutting the configure options to the bare minimum you need for the test scripts to run and did you use --disable-all? If not, do this. Previous Comments: [2007-07-10 12:36:36] n dot escuder at intra-links dot com I did it with php5.2-200707101030 I ran with -n and the problems stay. ACCEPT never arrive. [2007-07-10 11:30:20] [EMAIL PROTECTED] Try building the latest 5.2 CVS snapshot without compiling anything as shared. And make sure you don't load any php.ini by passing -n to CLI when you run the scripts. [2007-07-09 17:07:25] n dot escuder at intra-links dot com Linux zelda.intra-links.dev 2.6.21.4-atl-smp #1 SMP Mon Jun 25 20:28:57 CEST 2007 x86_64 GNU/Linux OpenSSL 0.9.8e 23 Feb 2007 I omit to say that PHP is the CLI Version. Build script of PHP : export EXTENSION_DIR=/usr/lib/php/extensions && ARGS="--prefix=/usr \ --sysconfdir=/etc \ --with-config-file-path=/etc \ --with-zlib-dir=/usr/lib \ --with-pear \ --enable-dom \ --enable-overload \ --enable-pcntl \ --enable-pdo \ --enable-simplexml \ --enable-zip \ --enable-json \ --with-bz2=shared \ --with-curl=shared \ --with-fam=shared \ --with-gettext=shared \ --with-iconv=shared \ --with-imap=shared \ --with-imap-ssl=shared \ --with-mysql=shared \ --with-openssl=shared \ --with-pdo-mysql=shared \ --with-pdo-sqlite=/usr \ --with-xml=shared \ --with-simplexml=shared \ --with-xmlreader=shared \ --with-xmlwriter=shared \ --enable-bcmath=shared \ --enable-calendar=shared \ --enable-ctype=shared \ --enable-exif=shared \ --enable-ftp=shared \ --enable-hash=shared \ --enable-mbstring=shared \ --enable-sockets=shared \ --enable-tokenizer=shared \ --enable-xmlreader=shared \ --enable-xmlwriter=shared \ --without-sqlite \ --disable-cgi" && ./configure $ARGS && make && make install It's an LFS OS. PHP is the core of the plateform it manage services and events between processs with RPC and more... I can give you an access if you need it. [2007-07-09 15:24:18] [EMAIL PROTECTED] Please give more information about your (64bit) system. And also the full configure line. I can NOT reproduce this using latest CVS on this system: # uname -a Linux linux5 2.6.20-1.2944.fc6 #1 SMP Tue Apr 10 17:46:00 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux (fedora 6) [2007-07-09 13:22:49] n dot escuder at intra-links dot com I have sent an email to [EMAIL PROTECTED] on 03/07/2007 with no answer. So i reopen the bug. Email content : I just retry with php 5.2.3 and php 5.2.4-dev On 64 bit plateform the ACCEPT never arrive. With PHP 5.2.1 on the same plateform ACCEPT arrive. I can do some try if you need. Email me. I don't known what to do ... And i need this function ;o) 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/41489 -- Edit this bug report at http://bugs.php.net/?id=41489&edit=1
#41951 [Fbk->Opn]: floats are stored as ints
ID: 41951 User updated by: rachmel at avaya dot com Reported By: rachmel at avaya dot com -Status: Feedback +Status: Open Bug Type: *Math Functions Operating System: WindRiver Linux PHP Version: 5.2.3 New Comment: Hi, I tried the CVS head version you offered me in the above link. The problem is still there, and the numbers are not converted to float as expected. Previous Comments: [2007-07-10 14:10:06] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-07-10 13:54:39] rachmel at avaya dot com Description: I am cross compiling php from i686-red-hat linux plat to ppc-windriver linux plat. The problem I see, is that when trying to assign a value bigger than MAX_INT (2147483648-1), the variable gets the value of MAX_INT-1. This is not just an explicit variable issue. Just trying to 'echo' the same value results in the same problem. When compiling for my i686 platform, this problem doesn't occur. I am upgrading from php 5.1.4, and I didn't have any problems in that version. Reproduce code: --- Expected result: float(2415919103) float(2415919103) Actual result: -- int(2147483647) int(2147483647) -- Edit this bug report at http://bugs.php.net/?id=41951&edit=1
#16263 [Com]: session.start() create new empty session file and not resume existing session
ID: 16263 Comment by: ponas dot termas at gmail dot com Reported By: kur at natur dot cuni dot cz Status: No Feedback Bug Type: Session related Operating System: ANY PHP Version: 4.3.0-dev New Comment: Win XP IE 7 PHP 5.2.3 Apache 2.2 Suggested sollutions not helped. When I am using site as http://localhost/site it works well, session resumed. When I am using site using computer name (externally) http://computer_name/site, session is not resumed and separate files are created for it. Previous Comments: [2007-06-08 06:09:48] ddw252 at bham dot ac dot uk Found this solution: I was running a server on my pc and session data was lost when I left the page. php_info() revealved session.save_path was C:\DOCUME~1\MyUsername\LOCALS~1\Temp\php\session but when I looked on the C drive, in the temp folder, there was no php folder. So I made a php folder, with a session folder inside it, and hey presto everything works fine :) [2007-03-21 16:36:29] bagginsbh at hotmail dot com The only work around I have found is on the first call to start a session in your application capture that session id. Then pass it in the url or as a form parameter. After the session_start() call on your next page, reset the session id to the passed in session id. Also may consider archiving all session files such that can be parsed at a later time to extract the key-value pairs. This bug has been a major, major problem in my clients environment. This has been the first time I have run into it. It also has nothing to do with the time of the session as I have had the lost session occur in less than 2 minutes after session start. If not executing a session destroy, which will delete the session file from the temp location, then look at the old session files and recover the `lost` parameters. [2007-03-15 05:21:59] akk7788 at yahoo dot com Has a workaround been posted for this yet? I'm having a similar problem. THanks [2007-03-13 06:53:07] bagginsbh at hotmail dot com Generally occurs during peak server loads. Intermittently, a new session is created at session_start() call even though the cookie id has not changed. Old session file remains with associated data. New session wipes out all key value pairs resulting in lost data. PHP Version: 4.3.9 Server: Apache 2.0 OS: wsprolinux kernel: 2.6.9-42 [2007-02-20 16:03:58] george at edynamo dot com same problem here - FC4, PHP 5.0.2 - session files are empty. possible solution ( sometimes works ) - use session_register insted of $_SESSION to set a new value to the session 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/16263 -- Edit this bug report at http://bugs.php.net/?id=16263&edit=1
#41489 [Fbk->Opn]: stream_select does not work on ssl stream_socket_server (works in 5.2.1!) on 64b
ID: 41489 User updated by: n dot escuder at intra-links dot com Reported By: n dot escuder at intra-links dot com -Status: Feedback +Status: Open Bug Type: Streams related Operating System: Linux 2.6 PHP Version: 5.2.3 Assigned To: iliaa New Comment: I just retry with : ./configure --prefix=/usr --sysconfdir=/etc --disable-all --enable-sockets --with-openssl --disable-cgi and the same append. Previous Comments: [2007-07-10 14:13:34] [EMAIL PROTECTED] Did you try cutting the configure options to the bare minimum you need for the test scripts to run and did you use --disable-all? If not, do this. [2007-07-10 12:36:36] n dot escuder at intra-links dot com I did it with php5.2-200707101030 I ran with -n and the problems stay. ACCEPT never arrive. [2007-07-10 11:30:20] [EMAIL PROTECTED] Try building the latest 5.2 CVS snapshot without compiling anything as shared. And make sure you don't load any php.ini by passing -n to CLI when you run the scripts. [2007-07-09 17:07:25] n dot escuder at intra-links dot com Linux zelda.intra-links.dev 2.6.21.4-atl-smp #1 SMP Mon Jun 25 20:28:57 CEST 2007 x86_64 GNU/Linux OpenSSL 0.9.8e 23 Feb 2007 I omit to say that PHP is the CLI Version. Build script of PHP : export EXTENSION_DIR=/usr/lib/php/extensions && ARGS="--prefix=/usr \ --sysconfdir=/etc \ --with-config-file-path=/etc \ --with-zlib-dir=/usr/lib \ --with-pear \ --enable-dom \ --enable-overload \ --enable-pcntl \ --enable-pdo \ --enable-simplexml \ --enable-zip \ --enable-json \ --with-bz2=shared \ --with-curl=shared \ --with-fam=shared \ --with-gettext=shared \ --with-iconv=shared \ --with-imap=shared \ --with-imap-ssl=shared \ --with-mysql=shared \ --with-openssl=shared \ --with-pdo-mysql=shared \ --with-pdo-sqlite=/usr \ --with-xml=shared \ --with-simplexml=shared \ --with-xmlreader=shared \ --with-xmlwriter=shared \ --enable-bcmath=shared \ --enable-calendar=shared \ --enable-ctype=shared \ --enable-exif=shared \ --enable-ftp=shared \ --enable-hash=shared \ --enable-mbstring=shared \ --enable-sockets=shared \ --enable-tokenizer=shared \ --enable-xmlreader=shared \ --enable-xmlwriter=shared \ --without-sqlite \ --disable-cgi" && ./configure $ARGS && make && make install It's an LFS OS. PHP is the core of the plateform it manage services and events between processs with RPC and more... I can give you an access if you need it. [2007-07-09 15:24:18] [EMAIL PROTECTED] Please give more information about your (64bit) system. And also the full configure line. I can NOT reproduce this using latest CVS on this system: # uname -a Linux linux5 2.6.20-1.2944.fc6 #1 SMP Tue Apr 10 17:46:00 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux (fedora 6) 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/41489 -- Edit this bug report at http://bugs.php.net/?id=41489&edit=1
#41952 [NEW]: Problem with PHP6 and Byte Order Mark
From: hedvall at gmail dot com Operating system: Win2k SP4 PHP version: 6CVS-2007-07-10 (snap) PHP Bug Type: Compile Warning Bug description: Problem with PHP6 and Byte Order Mark Description: After upgrading to the latest PHP6 build from 6CVS-2007-06-21 the compiler no longer accepts the UTF-8 BOM (Byte Order Mark) to be sent before the headers. It might be correct to not send the headers after any other output but it hasn't caused any trouble with any newer browser on any platform (win, mac, linux). I always remove the BOM before the sites go live but when developing it's easier to leave it there until the page is finished. This is not a duplicate of 22108. Reproduce code: --- Expected result: 404 header sent without warning Actual result: -- Warning: Cannot modify header information - headers already sent by (output started at [...]/header.php:1) in [...]/header.php on line 2 -- Edit bug report at http://bugs.php.net/?id=41952&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41952&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41952&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41952&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41952&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41952&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41952&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=41952&r=needscript Try newer version:http://bugs.php.net/fix.php?id=41952&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41952&r=support Expected behavior:http://bugs.php.net/fix.php?id=41952&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41952&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41952&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41952&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41952&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41952&r=dst IIS Stability:http://bugs.php.net/fix.php?id=41952&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41952&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41952&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41952&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=41952&r=mysqlcfg
#36561 [Com]: PDO_ODBC/MSSQL does not work with bound params in subquery
ID: 36561 Comment by: blohr at triad dot rr dot com Reported By: travis at raybold dot com Status: Feedback Bug Type: PDO related Operating System: Windows XP PHP Version: 5.1.2 New Comment: I tried the code I posted previously with the snapshot you referenced. Unfortunately, it didn't fix the problem. Here are the results: > php -v PHP 5.2.4-dev (cli) (built: Jul 10 2007 12:04:20) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies > php mssql-odbc.php array(4) { [0]=> string(5) "42000" [1]=> int(402) [2]=> string(166) "[Microsoft][SQL Native Client][SQL Server]The data types varchar and text are incompatible in the equal to operator. (SQLExecute[402] at ext\pdo_odbc\odbc_stmt.c:133)" [3]=> string(5) "42000" } array(4) { [0]=> string(5) "22018" [1]=> int(206) [2]=> string(141) "[Microsoft][SQL Native Client][SQL Server]Operand type clash: text is incompatible with int (SQLExecute[206] at ext\pdo_odbc\odbc_stmt.c:133)" [3]=> string(5) "22018" } array(4) { [0]=> string(5) "42000" [1]=> int(402) [2]=> string(166) "[Microsoft][SQL Native Client][SQL Server]The data types varchar and text are incompatible in the equal to operator. (SQLExecute[402] at ext\pdo_odbc\odbc_stmt.c:133)" [3]=> string(5) "42000" } array(4) { [0]=> string(5) "22018" [1]=> int(206) [2]=> string(141) "[Microsoft][SQL Native Client][SQL Server]Operand type clash: text is incompatible with int (SQLExecute[206] at ext\pdo_odbc\odbc_stmt.c:133)" [3]=> string(5) "22018" } array(4) { [0]=> string(5) "42000" [1]=> int(402) [2]=> string(166) "[Microsoft][SQL Native Client][SQL Server]The data types varchar and text are incompatible in the equal to operator. (SQLExecute[402] at ext\pdo_odbc\odbc_stmt.c:133)" [3]=> string(5) "42000" } array(4) { [0]=> string(5) "22018" [1]=> int(206) [2]=> string(141) "[Microsoft][SQL Native Client][SQL Server]Operand type clash: text is incompatible with int (SQLExecute[206] at ext\pdo_odbc\odbc_stmt.c:133)" [3]=> string(5) "22018" } array(4) { [0]=> string(5) "42000" [1]=> int(402) [2]=> string(166) "[Microsoft][SQL Native Client][SQL Server]The data types varchar and text are incompatible in the equal to operator. (SQLExecute[402] at ext\pdo_odbc\odbc_stmt.c:133)" [3]=> string(5) "42000" } array(4) { [0]=> string(5) "22018" [1]=> int(206) [2]=> string(141) "[Microsoft][SQL Native Client][SQL Server]Operand type clash: text is incompatible with int (SQLExecute[206] at ext\pdo_odbc\odbc_stmt.c:133)" [3]=> string(5) "22018" } Previous Comments: [2007-07-10 11:33:49] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-06-22 17:50:11] blohr at triad dot rr dot com This bug affects my app, too. I'm using PHP 5.2.3 on Windows XP Pro SP2, under both IIS 5.1 and Apache 2.2, with SQL Server 2005 Express. I don't know if it'll help or not, but here's some more reproduce code. Just fix the PDO DSN string to something valid. exec($createTable); $db->exec($createTable2); $ins = $db->prepare('INSERT INTO ##test (intCol, textCol) VALUES (:i, :t)'); $ins->execute(array('i'=>1, 't'=>'A String')); $ins2 = $db->prepare('INSERT INTO ##test2 (intCol2, textCol2) VALUES (:i, :t)'); $ins2->execute(array('i'=>1, 't'=>'Another String')); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE textCol2 = :t)'); $sel->execute(array('t'=>'Another String')) or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE intCol2 = :i)'); $sel->execute(array('i'=>1)) or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE textCol2 = :t)'); $sel->bindValue('t', 'Another String'); $sel->execute() or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE intCol2 = :i)'); $sel->bindValue('i', 1); $sel->execute() or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE textCol2 = :t)'); $sel->bindValue('t', 'Another String', PDO::PARAM_STR); $sel->execute() or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT intCol2 FROM ##test2 WHERE intCol2 = :i)'); $sel->bindValue('i', 1, PDO::PARAM_INT); $sel->execute() or var_dump($sel->errorInfo()); $sel = $db->prepare('SELECT * FROM ##test WHERE intCol = (SELECT in
#41953 [NEW]: ldap_add incorrectly handles the comma, even with two backslashes (\\,)
From: ahoyt at kpcommunications dot com Operating system: Mac OS X, Windows 2003 Server PHP version: 5.2.3 PHP Bug Type: LDAP related Bug description: ldap_add incorrectly handles the comma, even with two backslashes (\\,) Description: ldap_add fails when creating a new user in Active Directory with the following circumstances: 1. The DN contains a comma such as: "CN=Last, First,CN=Users,DC=example,DC=com" 2. This bug is reproducible on Mac OS X and Windows 2003 Server (Have not tried other OS's). 3. unknown whether the problem is with php_ldap module or with zend engine. Sourcecode for AD user creation from http://adldap.sourceforge.net. Class modified to make entry as straightforward as possible. See example.php user_create() and change the dn in adLDAP.php to a preset string. Reproduce code: --- //ldap connect -> $_conn (returns a valid link resource) ldap_set_option($_conn, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($_conn, LDAP_OPT_REFERRALS, 0); //ldaps bind (ldap binds with ssl) $dn = "CN=Last\\, First,CN=Users,DC=example,DC=com"; //escape twice for a single backslash in ldap echo $dn; echo ""; $attributes["samaccountname"][0] = "flast"; $attributes["anyattribute"][0] = "anything"; ldap_add($_conn,$dn,$attributes); //Error Expected result: ldap_add returns true, new user created at CN=Last\, First,CN=Users,DC=example,DC=com Note: This happens with Active Directory on Windows 2003 Server, as well as many open directory implementations. The comma character is not defined in RFC 2255, PHP or SSL does not deal with it correctly. php class located at: http://adldap.sourceforge.net Actual result: -- Program returns the following: -- CN=Last\, First,CN=Users,DC=example,DC=com Warning: ldap_add() [function.ldap-add]: Add: Invalid DN syntax in / PHP/classes/class.adLDAP.php on line 689 -- Notes: The dn syntax is completely valid, no reason why this should not work. line 689 is not the actual location of ldap_add in the original adldap class: (http://adldap.sourceforge.net), but it is near that line. In the class, it is preceeded by an @. I removed the @ to see the error messages. Notes: the phpLDAPadmin project has a similar problem but when exporting to LDIF format, the DN comes out like this: CN=Last\2C First,CN=Users,DC=example,DC=com under and Open Directory Server. Other notes: This bug also seems to appear in the PEAR package for LDAP. I have tried DN entries with commas ",", backslash commas, "\,", etc. and none of it works. -- Edit bug report at http://bugs.php.net/?id=41953&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41953&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41953&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41953&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41953&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41953&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41953&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=41953&r=needscript Try newer version:http://bugs.php.net/fix.php?id=41953&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41953&r=support Expected behavior:http://bugs.php.net/fix.php?id=41953&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41953&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41953&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41953&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41953&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41953&r=dst IIS Stability:http://bugs.php.net/fix.php?id=41953&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41953&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41953&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41953&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=41953&r=mysqlcfg
#41954 [NEW]: open_basedir and upload_tmp_dir discrepancy
From: nlgordon at iastate dot edu Operating system: RedHat Enterprise 4 PHP version: 5.2.3 PHP Bug Type: Safe Mode/open_basedir Bug description: open_basedir and upload_tmp_dir discrepancy Description: When uploading a file in a virtual host that has open_basedir enabled and upload_tmp_dir unset the upload fails. Documentation claims that move_uploaded_file is open_basedir aware, which might be all well and true, but the file upload it self is not open_basedir aware. It would also appear that upload_tmp_dir is not open_basedir aware. I believe I have isolated it down to line 230 of php_open_temporary_file.c in the php_open_temporary_fd function: if (!dir || *dir == '\0') { def_tmp: temp_dir = php_get_temporary_directory(); if (temp_dir && *temp_dir != '\0' && !php_check_open_basedir(temp_dir TSRMLS_CC)) { <--- Problem area return php_do_open_temporary_file(temp_dir, pfx, opened_path_p TSRMLS_CC); } else { return -1; } } The php_open_temporary_fd function is referenced by the file upload handling code in rfc1867.c In short the open_basedir check is unnecessary in the case of file uploads since page code can not affect the temp directory uploaded to and move_uploaded_files works correctly. Reproduce code: --- "; print_r($_FILES); move_uploaded_file($_FILES['uploaded']['tmp_name'], '/afs/iastate.edu/virtual/itssilver/WWW/uploads/' . $_FILES['uploaded']['name']); // move_uploaded_file(); } ?> Upload Expected result: $_FILES['uploaded'] should be filled with the information relating to a successful upload. Actual result: -- Apache error log: [Tue Jul 10 14:25:07 2007] [error] [client ***] PHP Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/afs/iastate.edu/virtual/itssilver/) in Unknown on line 0, referer: http://silver.its.iastate.edu/testing/upload.php [Tue Jul 10 14:25:07 2007] [error] [client ***] PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0, referer: http://silver.its.iastate.edu/testing/upload.php Also, this error is never sent to the browser, it would appear that the internal engine does not have enough information about the script being run to identify the file even being run in. -- Edit bug report at http://bugs.php.net/?id=41954&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41954&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41954&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41954&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41954&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41954&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41954&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=41954&r=needscript Try newer version:http://bugs.php.net/fix.php?id=41954&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41954&r=support Expected behavior:http://bugs.php.net/fix.php?id=41954&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41954&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41954&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41954&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41954&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41954&r=dst IIS Stability:http://bugs.php.net/fix.php?id=41954&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41954&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41954&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41954&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=41954&r=mysqlcfg
#41955 [NEW]: addChild() with no namespace defined ignores the default namespace
From: hubert dot roksor at gmail dot com Operating system: PHP version: 5CVS-2007-07-10 (snap) PHP Bug Type: SimpleXML related Bug description: addChild() with no namespace defined ignores the default namespace Description: When adding a non-namespaced element to namespaced one, the new element is created under its parent's namespace instead of the scope's default namespace. In the reproduce code below we create a tree whose root element carries an empty default namespace declaration, with one "child" element under a custom namespace. We use addChild() to add a grandchild with no namespace defined. As per my understanding of XML Namespaces specifications, that element should be created under the default namespace and since the default namespace is empty the element should not use any namespace at all. A few notes: - moving the default namespace declaration to the child node does not change the outcome - using a non-empty default namespace does not change the outcome - specifying an empty namespace using addChild()'s third parameter gives the expected result Tested on: PHP 5.2.4-dev (cli) (built: Jul 10 2007 12:04:20) libXML Version => 2.6.26 SimpleXML Revision => $Revision: 1.151.2.22.2.33 $ Thanks for reading, and thanks for fixing my previous bugs so quickly ;) Reproduce code: --- http://myns"; xmlns=""> '); $children = $xml->children('http://myns'); $children[0]->addChild('grandchild', 'hello'); echo $xml->asXML(); ?> Expected result: http://myns"; xmlns=""> hello Actual result: -- http://myns"; xmlns=""> hello -- Edit bug report at http://bugs.php.net/?id=41955&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41955&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41955&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41955&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41955&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41955&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41955&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=41955&r=needscript Try newer version:http://bugs.php.net/fix.php?id=41955&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41955&r=support Expected behavior:http://bugs.php.net/fix.php?id=41955&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41955&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41955&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41955&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41955&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41955&r=dst IIS Stability:http://bugs.php.net/fix.php?id=41955&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41955&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41955&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41955&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=41955&r=mysqlcfg
#41956 [NEW]: Warning: copy(\\server1\test\input\info.txt) [function.copy]: failed to open
From: rajakrishnan dot b at gmail dot com Operating system: windows 2000 PHP version: 5CVS-2007-07-10 (snap) PHP Bug Type: *Directory/Filesystem functions Bug description: Warning: copy(\\server1\test\input\info.txt) [function.copy]: failed to open Description: Warning: copy(\\server1\test\input\info.txt) [function.copy]: failed to open stream: Permission denied in c:\Inetpub\wwwroot\test.php on line 10. I run with IIS. Please help me to solve this -- Edit bug report at http://bugs.php.net/?id=41956&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41956&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41956&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41956&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41956&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41956&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41956&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=41956&r=needscript Try newer version:http://bugs.php.net/fix.php?id=41956&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41956&r=support Expected behavior:http://bugs.php.net/fix.php?id=41956&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41956&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41956&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41956&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41956&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41956&r=dst IIS Stability:http://bugs.php.net/fix.php?id=41956&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41956&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41956&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41956&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=41956&r=mysqlcfg
#41956 [Opn->Bgs]: Warning: copy(\\server1\test\input\info.txt) [function.copy]: failed to open
ID: 41956 Updated by: [EMAIL PROTECTED] Reported By: rajakrishnan dot b at gmail dot com -Status: Open +Status: Bogus Bug Type: *Directory/Filesystem functions Operating System: windows 2000 PHP Version: 5CVS-2007-07-10 (snap) New Comment: If the user the script is run as does not have read/write access, of course you get errors like this. It's not a bug. Previous Comments: [2007-07-10 21:10:28] rajakrishnan dot b at gmail dot com Description: Warning: copy(\\server1\test\input\info.txt) [function.copy]: failed to open stream: Permission denied in c:\Inetpub\wwwroot\test.php on line 10. I run with IIS. Please help me to solve this -- Edit this bug report at http://bugs.php.net/?id=41956&edit=1
#41957 [NEW]: utf8 data appears to become ascii after mysql_query/mysql_fetch_row
From: jhala at uoregon dot edu Operating system: Vista/Fedora 7/WinXP PHP version: 5.2.3 PHP Bug Type: MySQL related Bug description: utf8 data appears to become ascii after mysql_query/mysql_fetch_row Description: I have a fully UTF-8 MySQL database with a fully UTF-8 table. I have a php page which has "" at the top of the html section and "mysql_set_charset("utf8");" after my connection. I have all my php.ini mbstring stuff configured for utf-8: mbstring.language = Neutral mbstring.internal_encoding = UTF-8 mbstring.http_input = auto mbstring.encoding_translation = On mbstring.detect_order = auto and for what it's worth, echo mb_internal_encoding(); reports "UTF-8" and mysql_client_encoding(); reports "utf8". Reproduce code: --- $con = mysql_connect('localhost', 'user', 'password'); mysql_select_db("database", $con); mysql_set_charset("utf8"); $query = "SELECT japanese_terms.term_lang, language_en FROM japanese_terms, languages "; $query .="WHERE japanese_terms.term_id = languages.language_id ORDER BY term_id"; $result = mysql_query($query); while( $row = mysql_fetch_row($result)) { foreach($row as $field) { print($field . ""); } } Expected result: I expect the UTF-8 data to display properly, and as UTF-8 data. When I run the same query that pulls out (in this case, Japanese, but say any) UTF8 data, it displays properly in MySQL Query Browser. Actual result: -- With php in the above context however, it does not. Instead, it prints a ? corresponding to each character. When I use mb_detect_encoding(); on each such string, it tells me they are encoded as "ASCII" instead of expected "UTF-8". -- Edit bug report at http://bugs.php.net/?id=41957&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41957&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41957&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41957&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41957&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41957&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41957&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=41957&r=needscript Try newer version:http://bugs.php.net/fix.php?id=41957&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41957&r=support Expected behavior:http://bugs.php.net/fix.php?id=41957&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41957&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41957&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41957&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41957&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41957&r=dst IIS Stability:http://bugs.php.net/fix.php?id=41957&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41957&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41957&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41957&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=41957&r=mysqlcfg
#41953 [Opn->Bgs]: ldap_add incorrectly handles the comma, even with two backslashes (\\,)
ID: 41953 Updated by: [EMAIL PROTECTED] Reported By: ahoyt at kpcommunications dot com -Status: Open +Status: Bogus Bug Type: LDAP related Operating System: Mac OS X, Windows 2003 Server PHP Version: 5.2.3 New Comment: Whatever is passed as DN is passed directly to the underlying LDAP library's function. In other words: It's not PHP bug. Previous Comments: [2007-07-10 19:27:30] ahoyt at kpcommunications dot com Description: ldap_add fails when creating a new user in Active Directory with the following circumstances: 1. The DN contains a comma such as: "CN=Last, First,CN=Users,DC=example,DC=com" 2. This bug is reproducible on Mac OS X and Windows 2003 Server (Have not tried other OS's). 3. unknown whether the problem is with php_ldap module or with zend engine. Sourcecode for AD user creation from http://adldap.sourceforge.net. Class modified to make entry as straightforward as possible. See example.php user_create() and change the dn in adLDAP.php to a preset string. Reproduce code: --- //ldap connect -> $_conn (returns a valid link resource) ldap_set_option($_conn, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($_conn, LDAP_OPT_REFERRALS, 0); //ldaps bind (ldap binds with ssl) $dn = "CN=Last\\, First,CN=Users,DC=example,DC=com"; //escape twice for a single backslash in ldap echo $dn; echo ""; $attributes["samaccountname"][0] = "flast"; $attributes["anyattribute"][0] = "anything"; ldap_add($_conn,$dn,$attributes); //Error Expected result: ldap_add returns true, new user created at CN=Last\, First,CN=Users,DC=example,DC=com Note: This happens with Active Directory on Windows 2003 Server, as well as many open directory implementations. The comma character is not defined in RFC 2255, PHP or SSL does not deal with it correctly. php class located at: http://adldap.sourceforge.net Actual result: -- Program returns the following: -- CN=Last\, First,CN=Users,DC=example,DC=com Warning: ldap_add() [function.ldap-add]: Add: Invalid DN syntax in / PHP/classes/class.adLDAP.php on line 689 -- Notes: The dn syntax is completely valid, no reason why this should not work. line 689 is not the actual location of ldap_add in the original adldap class: (http://adldap.sourceforge.net), but it is near that line. In the class, it is preceeded by an @. I removed the @ to see the error messages. Notes: the phpLDAPadmin project has a similar problem but when exporting to LDIF format, the DN comes out like this: CN=Last\2C First,CN=Users,DC=example,DC=com under and Open Directory Server. Other notes: This bug also seems to appear in the PEAR package for LDAP. I have tried DN entries with commas ",", backslash commas, "\,", etc. and none of it works. -- Edit this bug report at http://bugs.php.net/?id=41953&edit=1
#41957 [Opn->Bgs]: utf8 data appears to become ascii after mysql_query/mysql_fetch_row
ID: 41957 Updated by: [EMAIL PROTECTED] Reported By: jhala at uoregon dot edu -Status: Open +Status: Bogus Bug Type: MySQL related Operating System: Vista/Fedora 7/WinXP PHP Version: 5.2.3 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. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: [2007-07-10 21:41:48] jhala at uoregon dot edu Description: I have a fully UTF-8 MySQL database with a fully UTF-8 table. I have a php page which has "" at the top of the html section and "mysql_set_charset("utf8");" after my connection. I have all my php.ini mbstring stuff configured for utf-8: mbstring.language = Neutral mbstring.internal_encoding = UTF-8 mbstring.http_input = auto mbstring.encoding_translation = On mbstring.detect_order = auto and for what it's worth, echo mb_internal_encoding(); reports "UTF-8" and mysql_client_encoding(); reports "utf8". Reproduce code: --- $con = mysql_connect('localhost', 'user', 'password'); mysql_select_db("database", $con); mysql_set_charset("utf8"); $query = "SELECT japanese_terms.term_lang, language_en FROM japanese_terms, languages "; $query .="WHERE japanese_terms.term_id = languages.language_id ORDER BY term_id"; $result = mysql_query($query); while( $row = mysql_fetch_row($result)) { foreach($row as $field) { print($field . ""); } } Expected result: I expect the UTF-8 data to display properly, and as UTF-8 data. When I run the same query that pulls out (in this case, Japanese, but say any) UTF8 data, it displays properly in MySQL Query Browser. Actual result: -- With php in the above context however, it does not. Instead, it prints a ? corresponding to each character. When I use mb_detect_encoding(); on each such string, it tells me they are encoded as "ASCII" instead of expected "UTF-8". -- Edit this bug report at http://bugs.php.net/?id=41957&edit=1
#41862 [Opn]: Errorhandler doesn't work (PHP4 only)
ID: 41862 Updated by: [EMAIL PROTECTED] Reported By: thomas at thoftware dot de Status: Open Bug Type: Scripting Engine problem Operating System: Windows XP PHP Version: 4.4.7 New Comment: right, there's a problem with PHP 4 if foo does not exist, but I doubt anybody is going to fix it. Program received signal SIGSEGV, Segmentation fault. php_strip_url_passwd (url=0x0) at /home/johannes/src/php/PHP_4_4/main/fopen_wrappers.c:481 481 while (*p) { (gdb) bt #0 php_strip_url_passwd (url=0x0) at /home/johannes/src/php/PHP_4_4/main/fopen_wrappers.c:481 #1 0x080b46d8 in php_message_handler_for_zend (message=2, data=0x0) at /home/johannes/src/php/PHP_4_4/main/main.c:812 #2 0x080f22e1 in execute (op_array=0x8df088c) at /home/johannes/src/php/PHP_4_4/Zend/zend_execute.c:2240 #3 0x080df3ab in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/johannes/src/php/PHP_4_4/Zend/zend.c:935 #4 0x080b3805 in php_execute_script (primary_file=0xbf88fed0) at /home/johannes/src/php/PHP_4_4/main/main.c:1757 #5 0x080f9d39 in main (argc=1, argv=0xbf88ff94) at /home/johannes/src/php/PHP_4_4/sapi/cli/php_cli.c:838 Previous Comments: [2007-07-09 13:45:09] thomas at thoftware dot de At 5 Jul 1:55pm UTC somebody changed the subject and added ' (PHP4 only)' with no additional comment. Since then no further action took place. Can any of you developers out there tell me what this means? [2007-07-03 08:30:22] thomas at thoftware dot de I've checked the documentation another time and did not find anything that explains or even discusses the above behaviour. As I'm not sure if anyone is reading this while the status is "Bogus", I've decided to reopen it. Maybe someone can read my additional submissions - and if you are sure it is bogus, than please give me a little more specific hint, where I can find it in the documentation (as normally done when a submission is answered with the "Thank you for taking the time"-Text). Thank you in advance. [2007-07-02 06:42:34] thomas at thoftware dot de Something I found even earlier is: "The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called.". Is that what you mean I should have read? Please note, that that isn't the problem. I don't want these error types to be handled. I simply want the whole construct to run and not to crash. The above script works fine in these 2 versions: Reproduce code 2 (works): --- function foo($foo) { return($foo); } error_reporting(E_ALL); require_once(foo('foo')); Reproduce code 3 (works): --- function ehandler($e,$t,$f,$l,$c) { echo $t; } set_error_handler('ehandler'); error_reporting(E_ALL); require_once('foo'); (Where 'fine' means, it shows the error an stops.) Can you pleease explain to me, why the first version crashes without any message? [2007-07-02 06:29:19] thomas at thoftware dot de Neither with require_once(), require(), include() nor with set_error_handler() anything about the above behaviour is explained. I checked it four times. Can you please simply give me a direct link to that part of the documentation where it is mentioned? Or am I supposed to read the comlplete documentation as in that way you always have the chance that somewhere there might be some well hidden information about it? [2007-07-02 01:34:29] [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 . 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/41862 -- Edit this bug report at http://bugs.php.net/?id=41862&edit=1
#41959 [NEW]: 5.2.3 for Windows Broken Modules
From: jcoe at market-sense dot com Operating system: Windows XP PHP version: 5.2.3 PHP Bug Type: Dynamic loading Bug description: 5.2.3 for Windows Broken Modules Description: Executing PHP.EXE shows a number of errors claiming that various modules do not exist, yet the DLLs are present in the ext directory. PHP was set up using the installer. I then tried copying the unpacked content from the latest snapshot zip with the same results. Actual result: -- C:\Documents and Settings\jcoe>php Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_exif.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_oci8.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pdo_oci.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pdo_oci8.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pdo_sqlite_external.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pspell.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_sybase_ct.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_ibm_db2.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_ifx.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_ingres.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_maxdb.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_mcve.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_netools.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_oracle.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pdo_ibm.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pdo_informix.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_svn.dll' - The specified module could not be found. in Unknown on line 0 Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module (SNMP-MPD-MIB): At line 0 in (none) Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module (SNMPv2-TM): At line 0 in (none) Notice: Constant XML_ELEMENT_NODE already defined in Unknown on line 0 Notice: Constant XML_ATTRIBUTE_NODE already defined in Unknown on line 0 Notice: Constant XML_TEXT_NODE already defined in Unknown on line 0 Notice: Constant XML_CDATA_SECTION_NODE already defined in Unknown on line 0 Notice: Constant XML_ENTITY_REF_NODE already defined in Unknown on line 0 Notice: Constant XML_ENTITY_NODE already defined in Unknown on line 0 Notice: Constant XML_PI_NODE already defined in Unknown on line 0 Notice: Constant XML_COMMENT_NODE already defined in Unknown on line 0 Notice: Constant XML_DOCUMENT_NODE already defined in Unknown on line 0 Notice: Constant XML_DOCUMENT_TYPE_NODE already defined in Unknown on line 0 Notice
#41713 [Com]: Persistent memory consumption since 5.2
ID: 41713 Comment by: spamtrap at psychoticwolf dot net Reported By: mplomer at gmx dot de Status: Open Bug Type: Performance problem Operating System: win32 only PHP Version: 5.2.4-dev 2007-06-26 00:09 New Comment: I see this with PHP 5.2.1 - 5.2.3 (mod_php5 with Apache 2.0.59 and 2.2.4 on WinXP and Win2003). I did some regression testing and it seems to have started between 5.2.0 and 5.2.1 which points at the new memory management on win32. Memload was normal under 5.2.0. After awhile, Apache consumes as previously reported, 300-600mb (usually around 330mb + 6-700mb virtual), and, curiously, PHP thows a Fatal Error that its exceeded its memory limit for that script, even though it hasn't, as the script doesn't use more than about 300k. (Only seen this last part once, so far, so that might be a fluke.) Previous Comments: [2007-07-09 13:48:22] mplomer at gmx dot de Does somebody have any ideas to track this down? Are there any PHP core developers with a windows-test-environment? Aren't there any PHP developers who have the problem, that Apache/PHP eats up all RAM after some hours of developing and testing bigger PHP-projects? [2007-06-30 11:32:59] mplomer at gmx dot de Another developer tested this on his own machine now, with the same Apache/PHP environment, and could affirm this behavior. The memory usage values are respectively 0,1-0,3 MB different, but the principle is the same. So the behavior seems not to be system dependent. [2007-06-30 10:19:26] mplomer at gmx dot de OK, it took me some time to get FastCGI running, but now it works, and yes ... I can reproduce it there, too. To be more detailed, I set up the following environment: - Apache 2.0.59 (minimalistic configuration) with mod_fastcgi-SNAP-0404142202-AP2.dll - Configured FastCGI with 1 process: FastCgiServer ../php5/php-cgi.exe -processes 1 - PHP 5.2.3 (without php.ini; only php-cgi.exe and php5ts.dll) - and the test-script with 400,000 array elements: Reproducing by looking at the Task-Manager's memory usage values after each execution of the script: - Freshly starting Apache - Child process "php-cgi.exe" is started [php-cgi.exe consumes ~ 4.1 MB] - Execute the test-script the first time: [php-cgi.exe consumes ~ 4.8 MB] - Execute one more time: [php-cgi.exe consumes ~ 4.8 MB] - Execute one more time: [php-cgi.exe consumes ~ 5.3 MB] ... might be OK so long - Execute one more time: [php-cgi.exe consumes ~ 36.4 MB !!!] ... from now on this is not OK anymore - Execute one more time: [php-cgi.exe consumes ~ 36.7 MB] - Execute one more time: [php-cgi.exe consumes ~ 6.1 MB] - Execute one more time: [php-cgi.exe consumes ~ 36.4 MB] - Execute one more time: [php-cgi.exe consumes ~ 36.5 MB] - Execute one more time: [php-cgi.exe consumes ~ 7.7 MB] - Execute one more time: [php-cgi.exe consumes ~ 36.7 MB] - Execute one more time: [php-cgi.exe consumes ~ 36.8 MB] - Execute one more time: [php-cgi.exe consumes ~ 5.8 MB] - Execute one more time: [php-cgi.exe consumes ~ 36.4 MB] - Execute one more time: [php-cgi.exe consumes ~ 36.5 MB] - Execute one more time: [php-cgi.exe consumes ~ 10.6 MB] - Execute one more time: [php-cgi.exe consumes ~ 36.7 MB] - Execute one more time: [php-cgi.exe consumes ~ 36.8 MB] - Execute one more time: [php-cgi.exe consumes ~ 5.5 MB] - ... This is always reproducable, and the memory usage values are quite the same on each reproducion. (They differ only sometimes in 4-12 KB.) But you see, there is a systematic. There are 2 executions, after which the memory is not freed, and after the third execution, the memory is mostly freed. Any ideas for further testing? [2007-06-28 00:41:49] [EMAIL PROTECTED] Thank you, at least we know it only happens with Windows. Have you tried running PHP as FastCGI under windows? That might cure this too.. [2007-06-27 20:56:14] mplomer at gmx dot de OK, no problem. ... Today I tested this with apache worker, but I still cannot reproduce it under linux. I used a Debian 4.0 system and I compiled Apache 2.2.4 with: ./configure --prefix=/usr/local/apache2 --with-included-apr --with-mpm=worker --enable-so ... and PHP 5.2.3 with: ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --enable-memory-limit So phpinfo() said, "Thread Safety" is enabled. And I played around with the elementCount ... but under linux the memory is always completely freed. If you have some tips to track this down inside PHP, please let me know. I now have a working PHP build-environment under window
#41959 [Opn->Bgs]: 5.2.3 for Windows Broken Modules
ID: 41959 Updated by: [EMAIL PROTECTED] Reported By: jcoe at market-sense dot com -Status: Open +Status: Bogus Bug Type: Dynamic loading Operating System: Windows XP PHP Version: 5.2.3 New Comment: You've clearly went and enabled every single possible module thats there, unfortunately the installer doesn't include all of the external dependencies that are required as well as including modules that don't function correctly under Windows. I suggest you reinstall and only enable the ones you actually require. Previous Comments: [2007-07-10 22:45:49] jcoe at market-sense dot com Description: Executing PHP.EXE shows a number of errors claiming that various modules do not exist, yet the DLLs are present in the ext directory. PHP was set up using the installer. I then tried copying the unpacked content from the latest snapshot zip with the same results. Actual result: -- C:\Documents and Settings\jcoe>php Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_exif.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_oci8.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pdo_oci.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pdo_oci8.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pdo_sqlite_external.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pspell.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_sybase_ct.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_ibm_db2.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_ifx.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_ingres.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_maxdb.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_mcve.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_netools.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_oracle.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pdo_ibm.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_pdo_informix.dll' - The specified module could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\p hp_svn.dll' - The specified module could not be found. in Unknown on line 0 Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module (SNMP-MPD-MIB): At line 0 in (none) Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module (SNMPv2-TM): At line 0 in (none) Notice: Constant XML_ELEMENT_NODE already defined in Unknown on line 0 Notice: Constant XML_ATTRIBUTE_NODE already defined in Unknown on line 0 Notice: Constant XML_TEXT_NODE already defined in
#41834 [Bgs->Opn]: pathinfo() parse a path like "/opt/" in wrong result
ID: 41834 User updated by: donyad at gmail dot com Reported By: donyad at gmail dot com -Status: Bogus +Status: Open Bug Type: URL related Operating System: Window2000 PHP Version: 5.2.3 New Comment: I still think it is a bug, please reconsider. Previous Comments: [2007-06-28 09:21:23] donyad at gmail dot com Actually, I am parsing URL such like "www.php.net/manual/", "/opt/" just an example Even parse string "/opt/" under my Debian4.0-apache2-PHP5.2.0, this example code return the same result to me. [2007-06-28 08:17:15] [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 That's because "/opt/" is not a valid path on Win32. [2007-06-28 07:32:08] donyad at gmail dot com Description: Use pathinfo() or basename() to parse a string "/opt/" it will tell me the path is "\" and the filename is "opt" Reproduce code: --- \n"); print("basename:" . basename($str) . "\n"); print("pathinfo:"); print_r(pathinfo($str)); print("\n"); } ?> Expected result: dirname:/opt basename: pathinfo:Array ( [dirname] => /opt [basename] => [filename] => ) dirname:/opt basename:file pathinfo:Array ( [dirname] => /opt [basename] => file [filename] => file ) even return the "/" as "\" is acceptable dirname:\opt basename: pathinfo:Array ( [dirname] => \opt [basename] => [filename] => ) dirname:/opt basename:file pathinfo:Array ( [dirname] => /opt [basename] => file [filename] => file ) Actual result: -- dirname:\ basename:opt pathinfo:Array ( [dirname] => \ [basename] => opt [filename] => opt ) dirname:/opt basename:file pathinfo:Array ( [dirname] => /opt [basename] => file [filename] => file ) -- Edit this bug report at http://bugs.php.net/?id=41834&edit=1