Bug #62971 [Com]: cannot get ./configure and make to both complete - one or the other fails
Edit report at https://bugs.php.net/bug.php?id=62971edit=1 ID: 62971 Comment by: mamfelt at gmail dot com Reported by:mamfelt at gmail dot com Summary:cannot get ./configure and make to both complete - one or the other fails Status: Open Type: Bug Package:Compile Failure Operating System: AIX PHP Version:5.4.6 Block user comment: N Private report: N New Comment: FYI: I understand why the 5.2.17 ./configure complained - no intent on sqlite3, was just sqlite back then. From below you can see the version of sqlite I have pre-loaded is 3.6.22 root@x104:[/data/prj]find . -name sqlite3.c -ls 733476 4419 -rw-r- 1 michael staff 4524415 Aug 15 19:05 ./php-5.3.16/ext/sqlite3/libsqlite/sqlite3.c 733446 66 -rw-r- 1 michael staff67532 Aug 15 19:05 ./php-5.3.16/ext/sqlite3/sqlite3.c 292548 4419 -rw-r--r-- 1 michael nobody 4524464 Aug 9 2011 ./php-5.3.8/ext/sqlite3/libsqlite/sqlite3.c 292518 63 -rw-r--r-- 1 michael nobody 63743 Aug 10 2011 ./php-5.3.8/ext/sqlite3/sqlite3.c 741218 4419 -rw-r--r-- 1 michael staff 4524426 Aug 15 06:26 ./php-5.4.6/ext/sqlite3/libsqlite/sqlite3.c 741176 66 -rw-r--r-- 1 michael staff67221 Aug 15 06:26 ./php-5.4.6/ext/sqlite3/sqlite3.c 102500 4419 -rw--- 1 michael staff 4524415 Jun 13 10:18 ./php-5.3.14/ext/sqlite3/libsqlite/sqlite3.c 102438 66 -rw--- 1 michael staff67501 Jun 13 10:18 ./php-5.3.14/ext/sqlite3/sqlite3.c 329718 4419 -rw--- 1 michael staff 4524415 Jun 13 06:54 ./php-5.4.4/ext/sqlite3/libsqlite/sqlite3.c 704810 66 -rw--- 1 michael staff67153 Jun 13 06:54 ./php-5.4.4/ext/sqlite3/sqlite3.c 426064 3782 -rw-r--r-- 1 michael nobody 3872493 Jan 5 2010 ./sqlite-3.6.22/sqlite3.c root@x104:[/data/prj]find . -name sqlite.c -ls 637193 83 -rw-r--r-- 1 michael nobody 84573 Apr 28 2010 ./php-5.2.17/ext/sqlite/sqlite.c 756929 95 -rw-r- 1 michael staff96718 Aug 15 19:05 ./php-5.3.16/ext/sqlite/sqlite.c 553336 95 -rw-r--r-- 1 michael nobody 96804 Jan 1 2011 ./php-5.3.8/ext/sqlite/sqlite.c 119415 95 -rw--- 1 michael staff96712 Jun 13 10:18 ./php-5.3.14/ext/sqlite/sqlite.c root@x104:[/data/prj]lslpp -L | grep sql aixtools.sqlite.rte 3.6.22.0C Fsqlite version 3.6.22 I hope this provides sufficient detail to determine a next step/question. Thanks! p.s. php-5.3.14 and php-5.3.16 also complain about the --without-sqlite3=DIR (and also with --without-sqlite=DIR) root@x104:[/data/prj/php-5.3.16]./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --without-sqlite3=/opt configure: error: sqlite3=/opt: invalid package name root@x104:[/data/prj/php-5.3.16]./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --without-sqlite=/opt configure: error: sqlite=/opt: invalid package name Previous Comments: [2012-08-30 05:45:33] mamfelt at gmail dot com with php 5.2.7: # ./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --with-sqlite3=/opt configure finishes with: Thank you for using PHP. Notice: Following unknown configure options were used: --with-sqlite3=/opt Check './configure --help' for available options make completes successfully - however, ext/sqlite was also compiled without fatal errors. Considering the error message (--with-sqlite3 unknown) - not surprising. [2012-08-29 20:02:55] mamfelt at gmail dot com Description: Trying to package php 5.4.6 - stuck in logic loop regarding sqlite3. --with-sqlite3=DIR seems to be ignored --without-sqlite3=DIR is not accepted --without-sqlite3 causes ./configure to fail with checking for PDO includes... checking for PDO includes... /data/prj/php-5.4.6/ext configure: error: You've configured extension pdo_sqlite, which depends on extension sqlite3, but you've either not enabled sqlite3, or have disabled it. Test script: --- Example 1. ## configure completes but the embedded sqlite3 attempts to build anyway. This has a compile error that I have not researched. I have sqlite3 in /opt root@x104:[/data/prj/php-5.2.17]ls -l /opt/*/*sql* -rwxr-xr-x 1 root system 2026673 Jun 13 21:52 /opt/bin/sqlite3 -rw-r--r-- 1 root system 268351 Jun 13 21:52 /opt/include/sqlite3.h -rw-r--r-- 1 root system 20686 Jun 13 21:52 /opt/include/sqlite3ext.h -rw-r--r-- 1 root system 1927674 Jun 13 21:52 /opt/lib/libsqlite3.a -rwxr-xr-x 1 root system 743 Jun 13 21:52 /opt/lib/libsqlite3.la # ./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --with-sqlite3=/opt +++ Example 2. ### provide --without-sqlite3=DIR (per ./configure --help) # ./configure
Bug #62971 [Opn]: cannot get ./configure and make to both complete - one or the other fails
Edit report at https://bugs.php.net/bug.php?id=62971edit=1 ID: 62971 Updated by: paj...@php.net Reported by:mamfelt at gmail dot com Summary:cannot get ./configure and make to both complete - one or the other fails Status: Open Type: Bug Package:Compile Failure Operating System: AIX PHP Version:5.4.6 Block user comment: N Private report: N New Comment: sqlite3 is enabled by default, use --without-sqlite3 only if you do not want it. PHP also includes libsqlite as well as part of the distribution, so you do not have to install or use the system one. However you can still do it by using: --with-sqlite3=/usr for example. Previous Comments: [2012-08-30 06:03:33] mamfelt at gmail dot com FYI: I understand why the 5.2.17 ./configure complained - no intent on sqlite3, was just sqlite back then. From below you can see the version of sqlite I have pre-loaded is 3.6.22 root@x104:[/data/prj]find . -name sqlite3.c -ls 733476 4419 -rw-r- 1 michael staff 4524415 Aug 15 19:05 ./php-5.3.16/ext/sqlite3/libsqlite/sqlite3.c 733446 66 -rw-r- 1 michael staff67532 Aug 15 19:05 ./php-5.3.16/ext/sqlite3/sqlite3.c 292548 4419 -rw-r--r-- 1 michael nobody 4524464 Aug 9 2011 ./php-5.3.8/ext/sqlite3/libsqlite/sqlite3.c 292518 63 -rw-r--r-- 1 michael nobody 63743 Aug 10 2011 ./php-5.3.8/ext/sqlite3/sqlite3.c 741218 4419 -rw-r--r-- 1 michael staff 4524426 Aug 15 06:26 ./php-5.4.6/ext/sqlite3/libsqlite/sqlite3.c 741176 66 -rw-r--r-- 1 michael staff67221 Aug 15 06:26 ./php-5.4.6/ext/sqlite3/sqlite3.c 102500 4419 -rw--- 1 michael staff 4524415 Jun 13 10:18 ./php-5.3.14/ext/sqlite3/libsqlite/sqlite3.c 102438 66 -rw--- 1 michael staff67501 Jun 13 10:18 ./php-5.3.14/ext/sqlite3/sqlite3.c 329718 4419 -rw--- 1 michael staff 4524415 Jun 13 06:54 ./php-5.4.4/ext/sqlite3/libsqlite/sqlite3.c 704810 66 -rw--- 1 michael staff67153 Jun 13 06:54 ./php-5.4.4/ext/sqlite3/sqlite3.c 426064 3782 -rw-r--r-- 1 michael nobody 3872493 Jan 5 2010 ./sqlite-3.6.22/sqlite3.c root@x104:[/data/prj]find . -name sqlite.c -ls 637193 83 -rw-r--r-- 1 michael nobody 84573 Apr 28 2010 ./php-5.2.17/ext/sqlite/sqlite.c 756929 95 -rw-r- 1 michael staff96718 Aug 15 19:05 ./php-5.3.16/ext/sqlite/sqlite.c 553336 95 -rw-r--r-- 1 michael nobody 96804 Jan 1 2011 ./php-5.3.8/ext/sqlite/sqlite.c 119415 95 -rw--- 1 michael staff96712 Jun 13 10:18 ./php-5.3.14/ext/sqlite/sqlite.c root@x104:[/data/prj]lslpp -L | grep sql aixtools.sqlite.rte 3.6.22.0C Fsqlite version 3.6.22 I hope this provides sufficient detail to determine a next step/question. Thanks! p.s. php-5.3.14 and php-5.3.16 also complain about the --without-sqlite3=DIR (and also with --without-sqlite=DIR) root@x104:[/data/prj/php-5.3.16]./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --without-sqlite3=/opt configure: error: sqlite3=/opt: invalid package name root@x104:[/data/prj/php-5.3.16]./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --without-sqlite=/opt configure: error: sqlite=/opt: invalid package name [2012-08-30 05:45:33] mamfelt at gmail dot com with php 5.2.7: # ./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --with-sqlite3=/opt configure finishes with: Thank you for using PHP. Notice: Following unknown configure options were used: --with-sqlite3=/opt Check './configure --help' for available options make completes successfully - however, ext/sqlite was also compiled without fatal errors. Considering the error message (--with-sqlite3 unknown) - not surprising. [2012-08-29 20:02:55] mamfelt at gmail dot com Description: Trying to package php 5.4.6 - stuck in logic loop regarding sqlite3. --with-sqlite3=DIR seems to be ignored --without-sqlite3=DIR is not accepted --without-sqlite3 causes ./configure to fail with checking for PDO includes... checking for PDO includes... /data/prj/php-5.4.6/ext configure: error: You've configured extension pdo_sqlite, which depends on extension sqlite3, but you've either not enabled sqlite3, or have disabled it. Test script: --- Example 1. ## configure completes but the embedded sqlite3 attempts to build anyway. This has a compile error that I have not researched. I have sqlite3 in /opt root@x104:[/data/prj/php-5.2.17]ls -l /opt/*/*sql* -rwxr-xr-x 1 root system 2026673 Jun 13 21:52 /opt/bin/sqlite3 -rw-r--r-- 1 root system 268351 Jun 13 21:52 /opt/include/sqlite3.h -rw-r--r-- 1 root system
Req #53439 [Com]: DatePeriod does not expose any properties
Edit report at https://bugs.php.net/bug.php?id=53439edit=1 ID: 53439 Comment by: rdo...@php.net Reported by:from dot php dot net at brainbox dot cz Summary:DatePeriod does not expose any properties Status: Assigned Type: Feature/Change Request Package:Date/time related Operating System: Windows XP SP3 PHP Version:5.3.3 Assigned To:derick Block user comment: N Private report: N New Comment: Same thing happens with DateInterval Previous Comments: [2012-05-30 19:15:28] krebs dot seb at googlemail dot com Anything new here? As far as I understood cataphract a patch exists. What happened to it? [2011-01-09 06:00:13] cataphr...@php.net Reassigning to Derick, as the patch I've written is under his consideration. [2010-12-01 17:58:19] from dot php dot net at brainbox dot cz Description: The DatePeriod instance does not expose its internal properties, thus makes impossible to extend the class. The properties are not visible in the reflection as well. Also, when I cast the instance to array (which usually exposes all properties), no props are shown. The draft of the test follows. Test script: --- $dp = new DatePeriod(new DateTime('2010-01-01'), new DateInterval('P1D'), 2); $r = new ReflectionObject($dp); $arr = (array)$dp; // cast to array to see the values of propeties echo Properties:\r\n; foreach($r-getProperties() as $v) { echo $v-getName().\r\n; } echo \r\n; echo Methods:\r\n; foreach($r-getMethods() as $v) { echo $v-getName().\r\n; } echo \r\n; echo Array cast:\r\n; echo strtr(print_r($arr, true), \0, '_'); Expected result: Properties: any_valid_properties... ...listed_here_after_implementing Array cast: Array ( any_valid_properties... ...listed_here_after_implementing ) Actual result: -- Properties: Array cast: Array ( ) -- Edit this bug report at https://bugs.php.net/bug.php?id=53439edit=1
[PHP-BUG] Bug #62973 [NEW]: $_POST or $_GET don't work with 'id' attribute in XHTML form
From: me at walkinraven dot name Operating system: Ubuntu PHP version: 5.3.16 Package: Variables related Bug Type: Bug Bug description:$_POST or $_GET don't work with 'id' attribute in XHTML form Description: XHTML 1.1 specification says: drop 'name', but 'id' only. But if really follow so, the PHP can't deal with such 'standard form' -- Edit bug report at https://bugs.php.net/bug.php?id=62973edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62973r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62973r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62973r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62973r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62973r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62973r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62973r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62973r=needscript Try newer version: https://bugs.php.net/fix.php?id=62973r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62973r=support Expected behavior: https://bugs.php.net/fix.php?id=62973r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62973r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62973r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62973r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62973r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62973r=dst IIS Stability: https://bugs.php.net/fix.php?id=62973r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62973r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62973r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62973r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62973r=mysqlcfg
Bug #62971 [Opn]: cannot get ./configure and make to both complete - one or the other fails
Edit report at https://bugs.php.net/bug.php?id=62971edit=1 ID: 62971 User updated by:mamfelt at gmail dot com Reported by:mamfelt at gmail dot com Summary:cannot get ./configure and make to both complete - one or the other fails Status: Open Type: Bug Package:Compile Failure Operating System: AIX PHP Version:5.4.6 Block user comment: N Private report: N New Comment: reply to pajoye My first example is: # ./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --with-sqlite3=/opt configure completes correctly, but make fails (also version 5.3.16 - tested today, and 5.3.14 from memory.) Right now I am try to 'not' comment on the reason for a syntax error in the embedded sqlite3. That is not exciting to me right now (maybe later). Right now I am focusing on getting a minimum build complete so I can move on to the packaging scripts to create an installp file. Then I shall try to make a maximum capability - i.e., as many as I get to build - version of php. If I understand your comment the --help text should be read as: --without-sqlite3 || --with-sqlite3=DIR Second question: If I use the --with-sqlite3=DIR option should make still be trying to build (and I assume link) the embedded version? From your comments I would think not. Previous Comments: [2012-08-30 08:01:30] paj...@php.net sqlite3 is enabled by default, use --without-sqlite3 only if you do not want it. PHP also includes libsqlite as well as part of the distribution, so you do not have to install or use the system one. However you can still do it by using: --with-sqlite3=/usr for example. [2012-08-30 06:03:33] mamfelt at gmail dot com FYI: I understand why the 5.2.17 ./configure complained - no intent on sqlite3, was just sqlite back then. From below you can see the version of sqlite I have pre-loaded is 3.6.22 root@x104:[/data/prj]find . -name sqlite3.c -ls 733476 4419 -rw-r- 1 michael staff 4524415 Aug 15 19:05 ./php-5.3.16/ext/sqlite3/libsqlite/sqlite3.c 733446 66 -rw-r- 1 michael staff67532 Aug 15 19:05 ./php-5.3.16/ext/sqlite3/sqlite3.c 292548 4419 -rw-r--r-- 1 michael nobody 4524464 Aug 9 2011 ./php-5.3.8/ext/sqlite3/libsqlite/sqlite3.c 292518 63 -rw-r--r-- 1 michael nobody 63743 Aug 10 2011 ./php-5.3.8/ext/sqlite3/sqlite3.c 741218 4419 -rw-r--r-- 1 michael staff 4524426 Aug 15 06:26 ./php-5.4.6/ext/sqlite3/libsqlite/sqlite3.c 741176 66 -rw-r--r-- 1 michael staff67221 Aug 15 06:26 ./php-5.4.6/ext/sqlite3/sqlite3.c 102500 4419 -rw--- 1 michael staff 4524415 Jun 13 10:18 ./php-5.3.14/ext/sqlite3/libsqlite/sqlite3.c 102438 66 -rw--- 1 michael staff67501 Jun 13 10:18 ./php-5.3.14/ext/sqlite3/sqlite3.c 329718 4419 -rw--- 1 michael staff 4524415 Jun 13 06:54 ./php-5.4.4/ext/sqlite3/libsqlite/sqlite3.c 704810 66 -rw--- 1 michael staff67153 Jun 13 06:54 ./php-5.4.4/ext/sqlite3/sqlite3.c 426064 3782 -rw-r--r-- 1 michael nobody 3872493 Jan 5 2010 ./sqlite-3.6.22/sqlite3.c root@x104:[/data/prj]find . -name sqlite.c -ls 637193 83 -rw-r--r-- 1 michael nobody 84573 Apr 28 2010 ./php-5.2.17/ext/sqlite/sqlite.c 756929 95 -rw-r- 1 michael staff96718 Aug 15 19:05 ./php-5.3.16/ext/sqlite/sqlite.c 553336 95 -rw-r--r-- 1 michael nobody 96804 Jan 1 2011 ./php-5.3.8/ext/sqlite/sqlite.c 119415 95 -rw--- 1 michael staff96712 Jun 13 10:18 ./php-5.3.14/ext/sqlite/sqlite.c root@x104:[/data/prj]lslpp -L | grep sql aixtools.sqlite.rte 3.6.22.0C Fsqlite version 3.6.22 I hope this provides sufficient detail to determine a next step/question. Thanks! p.s. php-5.3.14 and php-5.3.16 also complain about the --without-sqlite3=DIR (and also with --without-sqlite=DIR) root@x104:[/data/prj/php-5.3.16]./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --without-sqlite3=/opt configure: error: sqlite3=/opt: invalid package name root@x104:[/data/prj/php-5.3.16]./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --without-sqlite=/opt configure: error: sqlite=/opt: invalid package name [2012-08-30 05:45:33] mamfelt at gmail dot com with php 5.2.7: # ./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --with-sqlite3=/opt configure finishes with: Thank you for using PHP. Notice: Following unknown configure options were used: --with-sqlite3=/opt Check './configure --help' for available options make completes successfully - however, ext/sqlite was also compiled without fatal errors. Considering the error message
Bug #62971 [Opn]: cannot get ./configure and make to both complete - one or the other fails
Edit report at https://bugs.php.net/bug.php?id=62971edit=1 ID: 62971 User updated by:mamfelt at gmail dot com Reported by:mamfelt at gmail dot com Summary:cannot get ./configure and make to both complete - one or the other fails Status: Open Type: Bug Package:Compile Failure Operating System: AIX PHP Version:5.4.6 Block user comment: N Private report: N New Comment: p.s. I have peeked at ext/sqlite3/sqlite3.c and the only issue is this is the one place in PHP code that is using // comments rather than /* comments */ The AIX compiler can recognize // comments - however, may I interject that this is the ONLY file in PHP that seems to be using them. Maybe /* comment */ is the norm in PHP and this could be adjusted. Not a bug! just not consistent. My questions regarding the behavior of --with-sqlite3 is still open. Thank you for your consideration. Previous Comments: [2012-08-30 11:38:53] mamfelt at gmail dot com reply to pajoye My first example is: # ./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --with-sqlite3=/opt configure completes correctly, but make fails (also version 5.3.16 - tested today, and 5.3.14 from memory.) Right now I am try to 'not' comment on the reason for a syntax error in the embedded sqlite3. That is not exciting to me right now (maybe later). Right now I am focusing on getting a minimum build complete so I can move on to the packaging scripts to create an installp file. Then I shall try to make a maximum capability - i.e., as many as I get to build - version of php. If I understand your comment the --help text should be read as: --without-sqlite3 || --with-sqlite3=DIR Second question: If I use the --with-sqlite3=DIR option should make still be trying to build (and I assume link) the embedded version? From your comments I would think not. [2012-08-30 08:01:30] paj...@php.net sqlite3 is enabled by default, use --without-sqlite3 only if you do not want it. PHP also includes libsqlite as well as part of the distribution, so you do not have to install or use the system one. However you can still do it by using: --with-sqlite3=/usr for example. [2012-08-30 06:03:33] mamfelt at gmail dot com FYI: I understand why the 5.2.17 ./configure complained - no intent on sqlite3, was just sqlite back then. From below you can see the version of sqlite I have pre-loaded is 3.6.22 root@x104:[/data/prj]find . -name sqlite3.c -ls 733476 4419 -rw-r- 1 michael staff 4524415 Aug 15 19:05 ./php-5.3.16/ext/sqlite3/libsqlite/sqlite3.c 733446 66 -rw-r- 1 michael staff67532 Aug 15 19:05 ./php-5.3.16/ext/sqlite3/sqlite3.c 292548 4419 -rw-r--r-- 1 michael nobody 4524464 Aug 9 2011 ./php-5.3.8/ext/sqlite3/libsqlite/sqlite3.c 292518 63 -rw-r--r-- 1 michael nobody 63743 Aug 10 2011 ./php-5.3.8/ext/sqlite3/sqlite3.c 741218 4419 -rw-r--r-- 1 michael staff 4524426 Aug 15 06:26 ./php-5.4.6/ext/sqlite3/libsqlite/sqlite3.c 741176 66 -rw-r--r-- 1 michael staff67221 Aug 15 06:26 ./php-5.4.6/ext/sqlite3/sqlite3.c 102500 4419 -rw--- 1 michael staff 4524415 Jun 13 10:18 ./php-5.3.14/ext/sqlite3/libsqlite/sqlite3.c 102438 66 -rw--- 1 michael staff67501 Jun 13 10:18 ./php-5.3.14/ext/sqlite3/sqlite3.c 329718 4419 -rw--- 1 michael staff 4524415 Jun 13 06:54 ./php-5.4.4/ext/sqlite3/libsqlite/sqlite3.c 704810 66 -rw--- 1 michael staff67153 Jun 13 06:54 ./php-5.4.4/ext/sqlite3/sqlite3.c 426064 3782 -rw-r--r-- 1 michael nobody 3872493 Jan 5 2010 ./sqlite-3.6.22/sqlite3.c root@x104:[/data/prj]find . -name sqlite.c -ls 637193 83 -rw-r--r-- 1 michael nobody 84573 Apr 28 2010 ./php-5.2.17/ext/sqlite/sqlite.c 756929 95 -rw-r- 1 michael staff96718 Aug 15 19:05 ./php-5.3.16/ext/sqlite/sqlite.c 553336 95 -rw-r--r-- 1 michael nobody 96804 Jan 1 2011 ./php-5.3.8/ext/sqlite/sqlite.c 119415 95 -rw--- 1 michael staff96712 Jun 13 10:18 ./php-5.3.14/ext/sqlite/sqlite.c root@x104:[/data/prj]lslpp -L | grep sql aixtools.sqlite.rte 3.6.22.0C Fsqlite version 3.6.22 I hope this provides sufficient detail to determine a next step/question. Thanks! p.s. php-5.3.14 and php-5.3.16 also complain about the --without-sqlite3=DIR (and also with --without-sqlite=DIR) root@x104:[/data/prj/php-5.3.16]./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --without-sqlite3=/opt configure: error: sqlite3=/opt: invalid package name root@x104:[/data/prj/php-5.3.16]./configure --prefix=/opt --sysconfdir=/etc
Bug #62973 [Opn-Nab]: $_POST or $_GET don't work with 'id' attribute in XHTML form
Edit report at https://bugs.php.net/bug.php?id=62973edit=1 ID: 62973 Updated by: ahar...@php.net Reported by:me at walkinraven dot name Summary:$_POST or $_GET don't work with 'id' attribute in XHTML form -Status: Open +Status: Not a bug Type: Bug Package:Variables related Operating System: Ubuntu PHP Version:5.3.16 Block user comment: N Private report: N New Comment: This really isn't up to PHP: it's entirely down to the user-agent to decide what should get sent. It's all a key = value map as far as PHP is concerned. Previous Comments: [2012-08-30 11:02:43] me at walkinraven dot name Description: XHTML 1.1 specification says: drop 'name', but 'id' only. But if really follow so, the PHP can't deal with such 'standard form' -- Edit this bug report at https://bugs.php.net/bug.php?id=62973edit=1
Bug #62955 [Asn-Csd]: Only one directive is loaded from Per Directory Values Windows registry
Edit report at https://bugs.php.net/bug.php?id=62955edit=1 ID: 62955 Updated by: fel...@php.net Reported by:aserbulov at parallels dot com Summary:Only one directive is loaded from Per Directory Values Windows registry -Status: Assigned +Status: Closed Type: Bug Package:PHP options/info functions Operating System: Windows PHP Version:5.3.16 Assigned To:felipe Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. 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/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Thanks. Previous Comments: [2012-08-30 12:22:09] fel...@php.net Automatic comment on behalf of felipe...@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=de884997e0bc5cfc49b955099f369d1beae941b0 Log: - Fixed bug #62955 (Only one directive is loaded from quot;Per Directory Valuesquot; Windows registry) [2012-08-28 05:56:58] aserbulov at parallels dot com Description: Only one directive is loaded from Per Directory Values Windows registry. Bug has been introduced by commit: https://github.com/php/php-src/commit/93c91c733cf2259263e4d8c0f3ccc254246d404d Test script: --- Put some directives in Windows registry: --- [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\PHP\Per Directory Values\C\inetpub\wwwroot] open_basedir=C:\\Inetpub\\wwwroot\\;C:\\Windows\\Temp\\ memory_limit=1M error_reporting=E_ALL ~E_NOTICE --- Put script to C:\Inetpub\wwwroot directory and browse it. --- ?php phpinfo(); --- Expected result: open_basedir, memory_limit and error_reporting directives in result have the same values as in Windows registry. Actual result: -- error_reporting directive have the same value as in Windows registry, but open_basedir and memory_limit directives have default values. -- Edit this bug report at https://bugs.php.net/bug.php?id=62955edit=1
[PHP-BUG] Bug #62976 [NEW]: Notice: could not be converted to int when comparing some builtin classes
From: ladislav at marek dot su Operating system: Linux PHP version: 5.4Git-2012-08-30 (Git) Package: Class/Object related Bug Type: Bug Bug description:Notice: could not be converted to int when comparing some builtin classes Description: Comparing instance of some builtin class with instance of different class issues notice: Object of class ArrayObject could not be converted to int. Test script: --- new stdClass == new ArrayObject; // but new stdClass == new Exception works without notice Actual result: -- Notice: Object of class ArrayObject could not be converted to int in Command line code on line 1 Notice: Object of class stdClass could not be converted to int in Command line code on line 1 -- Edit bug report at https://bugs.php.net/bug.php?id=62976edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62976r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62976r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62976r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62976r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62976r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62976r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62976r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62976r=needscript Try newer version: https://bugs.php.net/fix.php?id=62976r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62976r=support Expected behavior: https://bugs.php.net/fix.php?id=62976r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62976r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62976r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62976r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62976r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62976r=dst IIS Stability: https://bugs.php.net/fix.php?id=62976r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62976r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62976r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62976r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62976r=mysqlcfg
[PHP-BUG] Bug #62977 [NEW]: array_unique() misbehaves with array of DateTimes
From: ladislav at marek dot su Operating system: Linux PHP version: 5.4Git-2012-08-30 (Git) Package: Class/Object related Bug Type: Bug Bug description:array_unique() misbehaves with array of DateTimes Description: array_unique() returns duplicates for array which contains objects with DateTime instances. Test script: --- ?php class Foo { public $dt; function __construct($dt) { $this-dt = $dt; } } $foo = new Foo(new DateTime); $std = new stdClass; $arr = [$foo, $foo, $std, $std, $std]; var_dump(array_unique($arr, SORT_REGULAR)); Expected result: array(4) { [0]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [2]= object(stdClass)#3 (0) { } } Actual result: -- array(4) { [0]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [1]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [2]= object(stdClass)#3 (0) { } [4]= object(stdClass)#3 (0) { } } -- Edit bug report at https://bugs.php.net/bug.php?id=62977edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62977r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62977r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62977r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62977r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62977r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62977r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62977r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62977r=needscript Try newer version: https://bugs.php.net/fix.php?id=62977r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62977r=support Expected behavior: https://bugs.php.net/fix.php?id=62977r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62977r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62977r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62977r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62977r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62977r=dst IIS Stability: https://bugs.php.net/fix.php?id=62977r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62977r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62977r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62977r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62977r=mysqlcfg
Bug #62971 [Opn]: cannot get ./configure and make to both complete - one or the other fails
Edit report at https://bugs.php.net/bug.php?id=62971edit=1 ID: 62971 User updated by:mamfelt at gmail dot com Reported by:mamfelt at gmail dot com Summary:cannot get ./configure and make to both complete - one or the other fails Status: Open Type: Bug Package:Compile Failure Operating System: AIX PHP Version:5.4.6 Block user comment: N Private report: N New Comment: Update: After correcting the comments to /* */ (will use compiler flag in the future) I ran make and it completed with an error for both 5.3.16 and 5.4.6 5.3.16 /cli/php_cli.lo sapi/cli/php_cli_readline.lo main/internal_functions_cli.lo -lrt -liconv -lsqlite3 -lrt -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -o sapi/cli/php ld: 0711-317 ERROR: Undefined symbol: .sqlite3_column_table_name ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. make: *** [sapi/cli/php] Error 8 5.4.6 i/cli/php_cli_server.lo -lrt -liconv -lsqlite3 -lrt -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -o sapi/cli/php ld: 0711-319 WARNING: Exported symbol not defined: php_register_internal_extensions ld: 0711-317 ERROR: Undefined symbol: php_register_internal_extensions ld: 0711-317 ERROR: Undefined symbol: .sqlite3_column_table_name ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. make: *** [sapi/cli/php] Error 8 === After performing a 'make distclean' on both I reran configure with no extra statement re: sqlite3, i.e. for both 5.3.16 and 5.4.6 # ./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man configure and make for 5.3.16 complete as expected configure completes, but make fails for 5.4.6 -lxml2 -liconv -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -lxml2 -liconv -lm -o sapi/cli/php ld: 0711-319 WARNING: Exported symbol not defined: php_register_internal_extensions ld: 0711-317 ERROR: Undefined symbol: php_register_internal_extensions ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. make: *** [sapi/cli/php] Error 8 root@x104:[/data/prj/php-5.4.6] -- maybe for this (ERROR: Undefined symbol: php_register_internal_extensions) -- I should submit a new bug - please advise. Previous Comments: [2012-08-30 11:47:06] mamfelt at gmail dot com p.s. I have peeked at ext/sqlite3/sqlite3.c and the only issue is this is the one place in PHP code that is using // comments rather than /* comments */ The AIX compiler can recognize // comments - however, may I interject that this is the ONLY file in PHP that seems to be using them. Maybe /* comment */ is the norm in PHP and this could be adjusted. Not a bug! just not consistent. My questions regarding the behavior of --with-sqlite3 is still open. Thank you for your consideration. [2012-08-30 11:38:53] mamfelt at gmail dot com reply to pajoye My first example is: # ./configure --prefix=/opt --sysconfdir=/etc --mandir=/usr/share/man --with-sqlite3=/opt configure completes correctly, but make fails (also version 5.3.16 - tested today, and 5.3.14 from memory.) Right now I am try to 'not' comment on the reason for a syntax error in the embedded sqlite3. That is not exciting to me right now (maybe later). Right now I am focusing on getting a minimum build complete so I can move on to the packaging scripts to create an installp file. Then I shall try to make a maximum capability - i.e., as many as I get to build - version of php. If I understand your comment the --help text should be read as: --without-sqlite3 || --with-sqlite3=DIR Second question: If I use the --with-sqlite3=DIR option should make still be trying to build (and I assume link) the embedded version? From your comments I would think not. [2012-08-30 08:01:30] paj...@php.net sqlite3 is enabled by default, use --without-sqlite3 only if you do not want it. PHP also includes libsqlite as well as part of the distribution, so you do not have to install or use the system one. However you can still do it by using: --with-sqlite3=/usr for example. [2012-08-30 06:03:33] mamfelt at gmail dot com FYI: I understand why the 5.2.17 ./configure complained - no intent on sqlite3, was just sqlite back then. From below you can see the version of sqlite I have pre-loaded is 3.6.22 root@x104:[/data/prj]find . -name sqlite3.c -ls 733476 4419 -rw-r- 1 michael staff 4524415 Aug 15 19:05 ./php-5.3.16/ext/sqlite3/libsqlite/sqlite3.c 733446 66 -rw-r- 1 michael staff
Bug #62977 [PATCH]: array_unique() misbehaves with array of DateTimes
Edit report at https://bugs.php.net/bug.php?id=62977edit=1 ID: 62977 Patch added by: larue...@php.net Reported by:ladislav at marek dot su Summary:array_unique() misbehaves with array of DateTimes Status: Assigned Type: Bug Package:Class/Object related Operating System: Linux PHP Version:5.4Git-2012-08-30 (Git) Assigned To:laruence Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: bug62977.patch Revision: 1346341925 URL: https://bugs.php.net/patch-display.php?bug=62977patch=bug62977.patchrevision=1346341925 Previous Comments: [2012-08-30 13:24:49] ladislav at marek dot su Description: array_unique() returns duplicates for array which contains objects with DateTime instances. Test script: --- ?php class Foo { public $dt; function __construct($dt) { $this-dt = $dt; } } $foo = new Foo(new DateTime); $std = new stdClass; $arr = [$foo, $foo, $std, $std, $std]; var_dump(array_unique($arr, SORT_REGULAR)); Expected result: array(4) { [0]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [2]= object(stdClass)#3 (0) { } } Actual result: -- array(4) { [0]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [1]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [2]= object(stdClass)#3 (0) { } [4]= object(stdClass)#3 (0) { } } -- Edit this bug report at https://bugs.php.net/bug.php?id=62977edit=1
Bug #62976 [Opn]: Notice: could not be converted to int when comparing some builtin classes
Edit report at https://bugs.php.net/bug.php?id=62976edit=1 ID: 62976 Updated by: larue...@php.net Reported by:ladislav at marek dot su Summary:Notice: could not be converted to int when comparing some builtin classes Status: Open Type: Bug Package:Class/Object related Operating System: Linux PHP Version:5.4Git-2012-08-30 (Git) Block user comment: N Private report: N New Comment: Arrayobject is share the same object handlers as stdClass, but exception does. anyway, I think there is a room to improve.. Previous Comments: [2012-08-30 13:16:10] ladislav at marek dot su Description: Comparing instance of some builtin class with instance of different class issues notice: Object of class ArrayObject could not be converted to int. Test script: --- new stdClass == new ArrayObject; // but new stdClass == new Exception works without notice Actual result: -- Notice: Object of class ArrayObject could not be converted to int in Command line code on line 1 Notice: Object of class stdClass could not be converted to int in Command line code on line 1 -- Edit this bug report at https://bugs.php.net/bug.php?id=62976edit=1
Bug #62929 [Com]: Segmentation fault on Zend Framework application
Edit report at https://bugs.php.net/bug.php?id=62929edit=1 ID: 62929 Comment by: sergiu dot ionescu at gmail dot com Reported by:sergiu dot ionescu at gmail dot com Summary:Segmentation fault on Zend Framework application Status: Open Type: Bug Package:*General Issues Operating System: Ubuntu 10.04.4 LTS PHP Version:PHP 5.3.16 Block user comment: N Private report: N New Comment: Setting apc.enable_cli=0 so far has eliminated the issue. I don't this fixed the underlying issue but at least it gets rid of the nasty exit code at the end on the script. Previous Comments: [2012-08-28 08:04:19] larue...@php.net if I don't get a script to reproduce it, then I think,, I can do nothing.. since there is not much info can get from the backtrace [2012-08-28 07:02:45] sergiu dot ionescu at gmail dot com I could, but i think it won't help much. As i stated initially it's a cli script form a Magento/ZF application with quite a few contributed modules. If i can get to a one file script that produces the error i will post it. Is there anything else you can do while you don't have that? [2012-08-28 02:47:44] larue...@php.net could you give us a reproducable script, or scripts? thanks, :) [2012-08-27 16:15:38] sergiu dot ionescu at gmail dot com After updating all the extensions i still get the same thing. I extra detail i can provide is that i occasionally get zend_mm_heap corrupted instead of segmentation fault and the line where the segfault occurs is the condition line from: #if ZEND_MM_SAFE_UNLINKING if (UNEXPECTED(prev-next_free_block != mm_block) || UNEXPECTED(next-prev_free_block != mm_block)) { zend_mm_panic(zend_mm_heap corrupted); } #endif [2012-08-27 14:55:12] sergiu dot ionescu at gmail dot com Hello, I have compiled PHP 5.3.16(http://kr.php.net/get/php-5.3.16.tar.bz2) and i am experiencing similar issues. The new back-trace is: [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x0068a7fb in zend_mm_remove_from_free_list (heap=0xe73290, mm_block=0x2ee4168) at /home/vagrant/php-5.3.16/Zend/zend_alloc.c:845 845 if (UNEXPECTED(prev-next_free_block != mm_block) || UNEXPECTED(next-prev_free_block != mm_block)) { (gdb) bt #0 0x0068a7fb in zend_mm_remove_from_free_list (heap=0xe73290, mm_block=0x2ee4168) at /home/vagrant/php-5.3.16/Zend/zend_alloc.c:845 #1 0x0068a9ab in _zend_mm_free_int (heap=0xe73290, p=0x2ee4128) at /home/vagrant/php-5.3.16/Zend/zend_alloc.c:2029 #2 0x0069fcd0 in destroy_zend_class (pce=value optimized out) at /home/vagrant/php-5.3.16/Zend/zend_opcode.c:187 #3 0x006b43d5 in zend_hash_apply_deleter (ht=0xe73be0, p=0x142dda0) at /home/vagrant/php-5.3.16/Zend/zend_hash.c:612 #4 0x006b44e9 in zend_hash_reverse_apply (ht=0xe73be0, apply_func=0x69aed0 clean_non_persistent_class) at /home/vagrant/php-5.3.16/Zend/zend_hash.c:762 #5 0x0069bbbe in shutdown_executor () at /home/vagrant/php-5.3.16/Zend/zend_execute_API.c:312 #6 0x006a85c2 in zend_deactivate () at /home/vagrant/php-5.3.16/Zend/zend.c:891 #7 0x00654305 in php_request_shutdown (dummy=value optimized out) at /home/vagrant/php-5.3.16/main/main.c:1661 #8 0x00733dfa in main (argc=value optimized out, argv=value optimized out) at /home/vagrant/php-5.3.16/sapi/cli/php_cli.c:1368 I am still using some on the old php5.3.2 extensions but i am upgrading the one by one - just in case i catch the culprit. Please let me know if i can provide additional details. Thanks. 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 https://bugs.php.net/bug.php?id=62929 -- Edit this bug report at https://bugs.php.net/bug.php?id=62929edit=1
Bug #44545 [Com]: Numeric keys in sessions fail silently
Edit report at https://bugs.php.net/bug.php?id=44545edit=1 ID: 44545 Comment by: william at piecewise dot com Reported by:info at concept47 dot com Summary:Numeric keys in sessions fail silently Status: Not a bug Type: Bug Package:Session related Operating System: Windows Xp sp2 PHP Version:5.2.5 Block user comment: N Private report: N New Comment: I would have to agree. I had no idea about this rule for session vars and as a result lost about an hour and a half before I stumbled across this post. Previous Comments: [2008-03-27 12:46:57] info at concept47 dot com And as this $_SESSION is special we can not add any errors when it's passed invalid data --- can you elaborate more on this? because that it is what I don't understand. Why will $1234 = me; fail fantastically but ... $_SESSION['1234'] = me not. [2008-03-27 11:31:14] j...@php.net And as this $_SESSION is special we can not add any errors when it's passed invalid data. You just have to _know_ this. [2008-03-27 11:30:28] j...@php.net RTFM: The keys in the $_SESSION associative array are subject to the same limitations as regular variable names in PHP, i.e. they cannot start with a number and must start with a letter or underscore. For more details see the section on variables in this manual. Found at http://php.net/session [2008-03-27 10:42:02] info at concept47 dot com Description: trying to use numeric keys for sessions vars, fails, silently. This is bad and can lead to lost hours/money for developer. I am just asking for this sort of assignment to fail in a far more obvious manner. Reproduce code: --- $_SESSION['1234'] = b! Expected result: I expect the session variable to be stored or else fail miserably like this assignment would $123 = dummy! Actual result: -- the session variable with a numeric key is never stored ... and it might take a developer a while to figure out why, as other session vars are stored just fine. -- Edit this bug report at https://bugs.php.net/bug.php?id=44545edit=1
Bug #62929 [Opn]: Segmentation fault on Zend Framework application
Edit report at https://bugs.php.net/bug.php?id=62929edit=1 ID: 62929 Updated by: larue...@php.net Reported by:sergiu dot ionescu at gmail dot com Summary:Segmentation fault on Zend Framework application Status: Open Type: Bug Package:*General Issues Operating System: Ubuntu 10.04.4 LTS PHP Version:PHP 5.3.16 Block user comment: N Private report: N New Comment: so, this is related to apc? Previous Comments: [2012-08-30 16:13:15] sergiu dot ionescu at gmail dot com Setting apc.enable_cli=0 so far has eliminated the issue. I don't this fixed the underlying issue but at least it gets rid of the nasty exit code at the end on the script. [2012-08-28 08:04:19] larue...@php.net if I don't get a script to reproduce it, then I think,, I can do nothing.. since there is not much info can get from the backtrace [2012-08-28 07:02:45] sergiu dot ionescu at gmail dot com I could, but i think it won't help much. As i stated initially it's a cli script form a Magento/ZF application with quite a few contributed modules. If i can get to a one file script that produces the error i will post it. Is there anything else you can do while you don't have that? [2012-08-28 02:47:44] larue...@php.net could you give us a reproducable script, or scripts? thanks, :) [2012-08-27 16:15:38] sergiu dot ionescu at gmail dot com After updating all the extensions i still get the same thing. I extra detail i can provide is that i occasionally get zend_mm_heap corrupted instead of segmentation fault and the line where the segfault occurs is the condition line from: #if ZEND_MM_SAFE_UNLINKING if (UNEXPECTED(prev-next_free_block != mm_block) || UNEXPECTED(next-prev_free_block != mm_block)) { zend_mm_panic(zend_mm_heap corrupted); } #endif 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 https://bugs.php.net/bug.php?id=62929 -- Edit this bug report at https://bugs.php.net/bug.php?id=62929edit=1
Bug #62929 [Com]: Segmentation fault on Zend Framework application
Edit report at https://bugs.php.net/bug.php?id=62929edit=1 ID: 62929 Comment by: sergiu dot ionescu at gmail dot com Reported by:sergiu dot ionescu at gmail dot com Summary:Segmentation fault on Zend Framework application Status: Open Type: Bug Package:*General Issues Operating System: Ubuntu 10.04.4 LTS PHP Version:PHP 5.3.16 Block user comment: N Private report: N New Comment: apc alone does not generate this. It's related to apc+Magento+a Multi-location module for Magento... That's why it's hard to give you a script to reproduce it. All i can say that the specific module uses allot of weird obfuscation: eval's and other stuff you don't necessarily need. Previous Comments: [2012-08-30 16:39:29] larue...@php.net so, this is related to apc? [2012-08-30 16:13:15] sergiu dot ionescu at gmail dot com Setting apc.enable_cli=0 so far has eliminated the issue. I don't this fixed the underlying issue but at least it gets rid of the nasty exit code at the end on the script. [2012-08-28 08:04:19] larue...@php.net if I don't get a script to reproduce it, then I think,, I can do nothing.. since there is not much info can get from the backtrace [2012-08-28 07:02:45] sergiu dot ionescu at gmail dot com I could, but i think it won't help much. As i stated initially it's a cli script form a Magento/ZF application with quite a few contributed modules. If i can get to a one file script that produces the error i will post it. Is there anything else you can do while you don't have that? [2012-08-28 02:47:44] larue...@php.net could you give us a reproducable script, or scripts? thanks, :) 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 https://bugs.php.net/bug.php?id=62929 -- Edit this bug report at https://bugs.php.net/bug.php?id=62929edit=1
Bug #62977 [Asn]: array_unique() misbehaves with array of DateTimes
Edit report at https://bugs.php.net/bug.php?id=62977edit=1 ID: 62977 Updated by: cataphr...@php.net Reported by:ladislav at marek dot su Summary:array_unique() misbehaves with array of DateTimes Status: Assigned Type: Bug Package:Class/Object related Operating System: Linux PHP Version:5.4Git-2012-08-30 (Git) Assigned To:laruence Block user comment: N Private report: N New Comment: laruuence: The patch is very strange. Why are making all the elements of the same class being compared equal? Objects can be compared. Perhaps you should fix the DateTime's compare_objects() object handler. Previous Comments: [2012-08-30 15:52:05] larue...@php.net The following patch has been added/updated: Patch Name: bug62977.patch Revision: 1346341925 URL: https://bugs.php.net/patch-display.php?bug=62977patch=bug62977.patchrevision=1346341925 [2012-08-30 13:24:49] ladislav at marek dot su Description: array_unique() returns duplicates for array which contains objects with DateTime instances. Test script: --- ?php class Foo { public $dt; function __construct($dt) { $this-dt = $dt; } } $foo = new Foo(new DateTime); $std = new stdClass; $arr = [$foo, $foo, $std, $std, $std]; var_dump(array_unique($arr, SORT_REGULAR)); Expected result: array(4) { [0]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [2]= object(stdClass)#3 (0) { } } Actual result: -- array(4) { [0]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [1]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [2]= object(stdClass)#3 (0) { } [4]= object(stdClass)#3 (0) { } } -- Edit this bug report at https://bugs.php.net/bug.php?id=62977edit=1
Bug #62976 [Com]: Notice: could not be converted to int when comparing some builtin classes
Edit report at https://bugs.php.net/bug.php?id=62976edit=1 ID: 62976 Comment by: reeze dot xia at gmail dot com Reported by:ladislav at marek dot su Summary:Notice: could not be converted to int when comparing some builtin classes Status: Open Type: Bug Package:Class/Object related Operating System: Linux PHP Version:5.4Git-2012-08-30 (Git) Block user comment: N Private report: N New Comment: After the fix for #61326 ArrayObject have different compare_objects handler: http://git.php.net/?p=php- src.git;a=commit;h=23e65a9dcc71cf11ee5ec82c256588626545d4db There is an test case the same as bug report: https://github.com/php/php-src/blob/master/tests/lang/compare_objects_basic2.phpt I agree with @laruence that it could be improved. if both of the object couldn't be cast to compare. they ARE not equal. Previous Comments: [2012-08-30 16:13:03] larue...@php.net Arrayobject is share the same object handlers as stdClass, but exception does. anyway, I think there is a room to improve.. [2012-08-30 13:16:10] ladislav at marek dot su Description: Comparing instance of some builtin class with instance of different class issues notice: Object of class ArrayObject could not be converted to int. Test script: --- new stdClass == new ArrayObject; // but new stdClass == new Exception works without notice Actual result: -- Notice: Object of class ArrayObject could not be converted to int in Command line code on line 1 Notice: Object of class stdClass could not be converted to int in Command line code on line 1 -- Edit this bug report at https://bugs.php.net/bug.php?id=62976edit=1
Bug #62976 [Com]: Notice: could not be converted to int when comparing some builtin classes
Edit report at https://bugs.php.net/bug.php?id=62976edit=1 ID: 62976 Comment by: reeze dot xia at gmail dot com Reported by:ladislav at marek dot su Summary:Notice: could not be converted to int when comparing some builtin classes Status: Open Type: Bug Package:Class/Object related Operating System: Linux PHP Version:5.4Git-2012-08-30 (Git) Block user comment: N Private report: N New Comment: Hi, I proposed a patch for this: https://github.com/php/php-src/pull/179 Previous Comments: [2012-08-30 17:40:24] reeze dot xia at gmail dot com After the fix for #61326 ArrayObject have different compare_objects handler: http://git.php.net/?p=php- src.git;a=commit;h=23e65a9dcc71cf11ee5ec82c256588626545d4db There is an test case the same as bug report: https://github.com/php/php-src/blob/master/tests/lang/compare_objects_basic2.phpt I agree with @laruence that it could be improved. if both of the object couldn't be cast to compare. they ARE not equal. [2012-08-30 16:13:03] larue...@php.net Arrayobject is share the same object handlers as stdClass, but exception does. anyway, I think there is a room to improve.. [2012-08-30 13:16:10] ladislav at marek dot su Description: Comparing instance of some builtin class with instance of different class issues notice: Object of class ArrayObject could not be converted to int. Test script: --- new stdClass == new ArrayObject; // but new stdClass == new Exception works without notice Actual result: -- Notice: Object of class ArrayObject could not be converted to int in Command line code on line 1 Notice: Object of class stdClass could not be converted to int in Command line code on line 1 -- Edit this bug report at https://bugs.php.net/bug.php?id=62976edit=1
Req #47494 [Com]: htmlspecialchars does not throw E_WARNING on multibyte problems
Edit report at https://bugs.php.net/bug.php?id=47494edit=1 ID: 47494 Comment by: another_disappointed_php_programmer at example dot com Reported by:philipp dot feigl at gmail dot com Summary:htmlspecialchars does not throw E_WARNING on multibyte problems Status: Not a bug Type: Feature/Change Request Package:Strings related Operating System: CentOS5 PHP Version:5.2.8 Block user comment: N Private report: N New Comment: This is very sad. This is a bug, and it's sad that PHP core developers said that it's a feature and it won't be fixed. I'm disappointed. Previous Comments: [2012-07-01 15:34:03] ras...@php.net This really isn't a bug. I do agree that the approach isn't ideal, but we shouldn't throw warnings on bad input here because htmlspecialchars() is explicitly designed to clean up bad input and it is run directly on user data most of the time. In order for someone to avoid this warning they would need to first call something like iconv('utf-8','utf-8') to clean up the input data and that doesn't make much sense since htmlspecialchars() essentially does that already. But, in order to help debugging there should be some way to see why an htmlspecialchars() call failed so a last_error() function similar to how it is handled for json decoding would make sense. [2012-07-01 15:12:31] chris at cbsinteractive dot com Happening our production servers, can replicate, PHP 5.3.10, Centos 5.6 [2011-09-27 22:43:02] rudd-o at rudd-o dot com Reported to /r/lolphp here: http://www.reddit.com/r/lolphp/comments/kso6p/if_error_reporting_is_on_htmlspecia lchars_will/ Do you guys realize there is an ENTIRE COMMUNITY of people devoted to the collective practice of FACEPALMING at PHP's fails? Hahaha. [2011-06-01 18:36:28] larry at garfieldtech dot com This bug should be reopened, not just documented. Haven't we learned our lesson with magic_quotes and its ilk? Designing PHP to try and save the user when the user does something stupid always backfires. Always. MySQL has the same problem, and it backfires there, too. The current logic is simply backward. When display_errors is on, you get all errors except from this function. When display_errors is off, you get no errors except from this one function. There is no logical reason for that. I'm working on a project that has been stalled for over a week while we try to figure out what's wrong with the character encoding configuration on our production server, only to realize that the data is (probably) bad but we didn't know it because of this bug. This is a bug and should be fixed, not simply documented as dumb. If a production server is misconfigured, that's not the job of the language to fix. All that does is, as another commenter noted, punish those who configure their servers properly. If anything, it is a security hole for people who DO configure their server properly by turning off display_errors, as then these strings would get echoed in production. How is that helpful to anyone? [2011-05-03 17:48:02] pinkgothic at gmail dot com Could this bug please get REOPENED as a documentation bug then? As already stated, the absence of the information in the documentation can be crippling for people who do things -right-. (Admittedly right now htmlspecialchars has my comment on the subject, but that's hardly official...) (Sidenote: You might also want to close Bug #54109 as bogus for consistency.) 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 https://bugs.php.net/bug.php?id=47494 -- Edit this bug report at https://bugs.php.net/bug.php?id=47494edit=1
Bug #60380 [Com]: preg_split and old version split
Edit report at https://bugs.php.net/bug.php?id=60380edit=1 ID: 60380 Comment by: cjbf at cam dot ac dot uk Reported by:evrinoma at gmail dot com Summary:preg_split and old version split Status: Open Type: Bug Package:*Programming Data Structures Operating System: Linux CenOS5 CentOS6 PHP Version:5.3.8 Block user comment: N Private report: N New Comment: Put simply, preg_split treats \\ wrongly. It ought to search for an actual \ but never matches it. Previous Comments: [2011-11-25 07:15:00] evrinoma at gmail dot com Description: --splite--- array[0]=0123456789-- array[1]=qwertyuiop-- array[2]=9876543210-- array[3]=poiuytrewq-- array[4]=0123456789-- array[5]=asdfghjkl-- --preg_splite-- array[0]=0123456789\qwertyuiop-- ??? array[1]=9876543210-- array[2]=poiuytrewq-- array[3]=0123456789-- array[4]=asdfghjkl-- array[5]=-- --- Test script: --- HTML HEAD TITLE BUG /TITLE /HEAD BODY ? printf( --splite--- BR\n); $date=0123456789\\qwertyuiop 9876543210.poiuytrewq:0123456789 asdfghjkl; $var = split( [-\\. :],$date ); printf( array[0]=%s-- BR\n,$var[0]); printf( array[1]=%s-- BR\n,$var[1]); printf( array[2]=%s-- BR\n,$var[2]); printf( array[3]=%s-- BR\n,$var[3]); printf( array[4]=%s-- BR\n,$var[4]); printf( array[5]=%s-- BR\n,$var[5]); printf( --preg_splite-- BR\n); $var = preg_split( #[-\\. :]#,$date); printf( array[0]=%s-- BR\n,$var[0]); printf( array[1]=%s-- BR\n,$var[1]); printf( array[2]=%s-- BR\n,$var[2]); printf( array[3]=%s-- BR\n,$var[3]); printf( array[4]=%s-- BR\n,$var[4]); printf( array[5]=%s-- BR\n,$var[5]); printf( --- BR\n); ? /BODY /HTML -- Edit this bug report at https://bugs.php.net/bug.php?id=60380edit=1
Req #12129 [Com]: array_remove()
Edit report at https://bugs.php.net/bug.php?id=12129edit=1 ID: 12129 Comment by: KayL at cust dot in Reported by:dmertens at zyprexia dot com Summary:array_remove() Status: Not a bug Type: Feature/Change Request Package:Feature/Change Request Operating System: Linux PHP Version:4.0.6 Block user comment: N Private report: N New Comment: No it is not. What if I do not know the key, but want to delete exactly that array element? Examples: - $needle = foo; $hackstack = Array(foo=bar, 0=red, would be=cool); array_remove($needle, $hackstack) = Array(0=red, would be=cool); $needle = Array(would be, 0); $hackstack = Array(foo=bar, 0=red, would be=cool); array_remove($needle, $hackstack) = Array(foo=bar); Function: - function array_remove(mixed $needle, Array $hackstack) { if(empty($hackstack)) return Array(); $new_array = Array(); foreach($hackstack as $key=$value) { if($value != $needle) { $new_array[$key] = $value; } } return $new_array; } Previous Comments: [2001-07-13 03:44:41] z...@php.net Thank you for the suggestion! However this functionality is already part of PHP. Use: unset ($array['key']); [2001-07-13 03:21:58] dmertens at zyprexia dot com I would like to see an function called array_remove(needle, haystack) with removes an item from an associative (or indexed) array. Currently i have a workaround which loops the array. During the loop a new array is created. When the loop finds the item which has to be removed, it skip the current item. After the loop, the new array is returned. A function like this would complete the array functions. Dave Mertens dmert...@zyprexia.com -- Edit this bug report at https://bugs.php.net/bug.php?id=12129edit=1
Req #12129 [Com]: array_remove()
Edit report at https://bugs.php.net/bug.php?id=12129edit=1 ID: 12129 Comment by: KayL at cust dot in Reported by:dmertens at zyprexia dot com Summary:array_remove() Status: Not a bug Type: Feature/Change Request Package:Feature/Change Request Operating System: Linux PHP Version:4.0.6 Block user comment: N Private report: N New Comment: Fcuk. Ofc I meant: $needle = bar; $hackstack = Array(foo=bar, 0=red, would be=cool); array_remove($needle, $hackstack) = Array(0=red, would be=cool); $needle = Array(cool, 0xB16B00B5); $hackstack = Array(foo=bar, 8=0xB16B00B5, would be=cool); array_remove($needle, $hackstack) = Array(foo=bar); Previous Comments: [2012-08-30 19:14:31] KayL at cust dot in No it is not. What if I do not know the key, but want to delete exactly that array element? Examples: - $needle = foo; $hackstack = Array(foo=bar, 0=red, would be=cool); array_remove($needle, $hackstack) = Array(0=red, would be=cool); $needle = Array(would be, 0); $hackstack = Array(foo=bar, 0=red, would be=cool); array_remove($needle, $hackstack) = Array(foo=bar); Function: - function array_remove(mixed $needle, Array $hackstack) { if(empty($hackstack)) return Array(); $new_array = Array(); foreach($hackstack as $key=$value) { if($value != $needle) { $new_array[$key] = $value; } } return $new_array; } [2001-07-13 03:44:41] z...@php.net Thank you for the suggestion! However this functionality is already part of PHP. Use: unset ($array['key']); [2001-07-13 03:21:58] dmertens at zyprexia dot com I would like to see an function called array_remove(needle, haystack) with removes an item from an associative (or indexed) array. Currently i have a workaround which loops the array. During the loop a new array is created. When the loop finds the item which has to be removed, it skip the current item. After the loop, the new array is returned. A function like this would complete the array functions. Dave Mertens dmert...@zyprexia.com -- Edit this bug report at https://bugs.php.net/bug.php?id=12129edit=1
Req #47494 [Nab]: htmlspecialchars does not throw E_WARNING on multibyte problems
Edit report at https://bugs.php.net/bug.php?id=47494edit=1 ID: 47494 Updated by: ni...@php.net Reported by:philipp dot feigl at gmail dot com Summary:htmlspecialchars does not throw E_WARNING on multibyte problems Status: Not a bug Type: Feature/Change Request Package:Strings related Operating System: CentOS5 PHP Version:5.2.8 Block user comment: N Private report: N New Comment: @the disappointed user: PHP 5.4 no longer throws said warning (it was just confusing). Instead there are several new options for dealing with incorrect encoding. Of particular interest is ENT_SUBSTITUTE, which will replace invalid code unit sequences with the Unicode Replacement Character (instead of returning a rather unhelpful empty string). This way you can easily spot where the string is incorrectly encoded. Furthermore this option has the additional advantage of being more graceful (it just removed individual incorrectly encoded bytes, not the whole string). Hope this helps you. More info in the docs: http://de2.php.net/htmlspecialchars Previous Comments: [2012-08-30 19:01:22] another_disappointed_php_programmer at exam This is very sad. This is a bug, and it's sad that PHP core developers said that it's a feature and it won't be fixed. I'm disappointed. [2012-07-01 15:34:03] ras...@php.net This really isn't a bug. I do agree that the approach isn't ideal, but we shouldn't throw warnings on bad input here because htmlspecialchars() is explicitly designed to clean up bad input and it is run directly on user data most of the time. In order for someone to avoid this warning they would need to first call something like iconv('utf-8','utf-8') to clean up the input data and that doesn't make much sense since htmlspecialchars() essentially does that already. But, in order to help debugging there should be some way to see why an htmlspecialchars() call failed so a last_error() function similar to how it is handled for json decoding would make sense. [2012-07-01 15:12:31] chris at cbsinteractive dot com Happening our production servers, can replicate, PHP 5.3.10, Centos 5.6 [2011-09-27 22:43:02] rudd-o at rudd-o dot com Reported to /r/lolphp here: http://www.reddit.com/r/lolphp/comments/kso6p/if_error_reporting_is_on_htmlspecia lchars_will/ Do you guys realize there is an ENTIRE COMMUNITY of people devoted to the collective practice of FACEPALMING at PHP's fails? Hahaha. [2011-06-01 18:36:28] larry at garfieldtech dot com This bug should be reopened, not just documented. Haven't we learned our lesson with magic_quotes and its ilk? Designing PHP to try and save the user when the user does something stupid always backfires. Always. MySQL has the same problem, and it backfires there, too. The current logic is simply backward. When display_errors is on, you get all errors except from this function. When display_errors is off, you get no errors except from this one function. There is no logical reason for that. I'm working on a project that has been stalled for over a week while we try to figure out what's wrong with the character encoding configuration on our production server, only to realize that the data is (probably) bad but we didn't know it because of this bug. This is a bug and should be fixed, not simply documented as dumb. If a production server is misconfigured, that's not the job of the language to fix. All that does is, as another commenter noted, punish those who configure their servers properly. If anything, it is a security hole for people who DO configure their server properly by turning off display_errors, as then these strings would get echoed in production. How is that helpful to anyone? 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 https://bugs.php.net/bug.php?id=47494 -- Edit this bug report at https://bugs.php.net/bug.php?id=47494edit=1
Bug #60380 [Com]: preg_split and old version split
Edit report at https://bugs.php.net/bug.php?id=60380edit=1 ID: 60380 Comment by: cjbf at cam dot ac dot uk Reported by:evrinoma at gmail dot com Summary:preg_split and old version split Status: Open Type: Bug Package:*Programming Data Structures Operating System: Linux CenOS5 CentOS6 PHP Version:5.3.8 Block user comment: N Private report: N New Comment: Three \s are needed to match one \. Could that at least be documented if it's not wrong? $text='AA\\nB and B\r';// contains \n and \r print_r(preg_split('/\\\n|\\\r/', $text)); gives Array ( [0] = AA [1] = B and B [2] = ) Previous Comments: [2012-08-30 19:02:43] cjbf at cam dot ac dot uk Put simply, preg_split treats \\ wrongly. It ought to search for an actual \ but never matches it. [2011-11-25 07:15:00] evrinoma at gmail dot com Description: --splite--- array[0]=0123456789-- array[1]=qwertyuiop-- array[2]=9876543210-- array[3]=poiuytrewq-- array[4]=0123456789-- array[5]=asdfghjkl-- --preg_splite-- array[0]=0123456789\qwertyuiop-- ??? array[1]=9876543210-- array[2]=poiuytrewq-- array[3]=0123456789-- array[4]=asdfghjkl-- array[5]=-- --- Test script: --- HTML HEAD TITLE BUG /TITLE /HEAD BODY ? printf( --splite--- BR\n); $date=0123456789\\qwertyuiop 9876543210.poiuytrewq:0123456789 asdfghjkl; $var = split( [-\\. :],$date ); printf( array[0]=%s-- BR\n,$var[0]); printf( array[1]=%s-- BR\n,$var[1]); printf( array[2]=%s-- BR\n,$var[2]); printf( array[3]=%s-- BR\n,$var[3]); printf( array[4]=%s-- BR\n,$var[4]); printf( array[5]=%s-- BR\n,$var[5]); printf( --preg_splite-- BR\n); $var = preg_split( #[-\\. :]#,$date); printf( array[0]=%s-- BR\n,$var[0]); printf( array[1]=%s-- BR\n,$var[1]); printf( array[2]=%s-- BR\n,$var[2]); printf( array[3]=%s-- BR\n,$var[3]); printf( array[4]=%s-- BR\n,$var[4]); printf( array[5]=%s-- BR\n,$var[5]); printf( --- BR\n); ? /BODY /HTML -- Edit this bug report at https://bugs.php.net/bug.php?id=60380edit=1
Bug #60380 [Com]: preg_split and old version split
Edit report at https://bugs.php.net/bug.php?id=60380edit=1 ID: 60380 Comment by: ni...@php.net Reported by:evrinoma at gmail dot com Summary:preg_split and old version split Status: Open Type: Bug Package:*Programming Data Structures Operating System: Linux CenOS5 CentOS6 PHP Version:5.3.8 Block user comment: N Private report: N New Comment: You are dealing with two levels of unescaping here. The first is the usual for string, the second is additionally done by PCRE. E.g. if you write the actually resulting string will just be \\ (because \\ is unescaped to \). This is then passed to PCRE, which itself again does unescaping, so the \\ is turned into \. That's why you need four backslashes to produce one literal backslash in a regular expression. In your particular case three work too, but only because the following character does not form an escape sequence. Previous Comments: [2012-08-30 19:24:38] cjbf at cam dot ac dot uk Three \s are needed to match one \. Could that at least be documented if it's not wrong? $text='AA\\nB and B\r';// contains \n and \r print_r(preg_split('/\\\n|\\\r/', $text)); gives Array ( [0] = AA [1] = B and B [2] = ) [2012-08-30 19:02:43] cjbf at cam dot ac dot uk Put simply, preg_split treats \\ wrongly. It ought to search for an actual \ but never matches it. [2011-11-25 07:15:00] evrinoma at gmail dot com Description: --splite--- array[0]=0123456789-- array[1]=qwertyuiop-- array[2]=9876543210-- array[3]=poiuytrewq-- array[4]=0123456789-- array[5]=asdfghjkl-- --preg_splite-- array[0]=0123456789\qwertyuiop-- ??? array[1]=9876543210-- array[2]=poiuytrewq-- array[3]=0123456789-- array[4]=asdfghjkl-- array[5]=-- --- Test script: --- HTML HEAD TITLE BUG /TITLE /HEAD BODY ? printf( --splite--- BR\n); $date=0123456789\\qwertyuiop 9876543210.poiuytrewq:0123456789 asdfghjkl; $var = split( [-\\. :],$date ); printf( array[0]=%s-- BR\n,$var[0]); printf( array[1]=%s-- BR\n,$var[1]); printf( array[2]=%s-- BR\n,$var[2]); printf( array[3]=%s-- BR\n,$var[3]); printf( array[4]=%s-- BR\n,$var[4]); printf( array[5]=%s-- BR\n,$var[5]); printf( --preg_splite-- BR\n); $var = preg_split( #[-\\. :]#,$date); printf( array[0]=%s-- BR\n,$var[0]); printf( array[1]=%s-- BR\n,$var[1]); printf( array[2]=%s-- BR\n,$var[2]); printf( array[3]=%s-- BR\n,$var[3]); printf( array[4]=%s-- BR\n,$var[4]); printf( array[5]=%s-- BR\n,$var[5]); printf( --- BR\n); ? /BODY /HTML -- Edit this bug report at https://bugs.php.net/bug.php?id=60380edit=1
Bug #62940 [Com]: getopt does not support long options without short options
Edit report at https://bugs.php.net/bug.php?id=62940edit=1 ID: 62940 Comment by: lonnyk at gmail dot com Reported by:b8kich at gmail dot com Summary:getopt does not support long options without short options Status: Open Type: Bug Package:PHP options/info functions Operating System: Linux (Centos 6.3) PHP Version:5.4.6 Block user comment: N Private report: N New Comment: I am not having any problems with this: $ php -v PHP 5.4.6RC1 (cli) (built: Aug 30 2012 20:24:11) (DEBUG) $ php ../tests/issue-62940.php --required value --optional=optional value -- option array(3) { [required]= string(5) value [optional]= string(14) optional value [option]= bool(false) } Can you please provide the _exact_ command you are using for calling the script? Previous Comments: [2012-08-26 18:37:45] b8kich at gmail dot com Description: When only long options are required in getopt (without any short options), they are not captured. Found this in 5.3.15 (CentOS 5.8) and confirmed in 5.4.6 (CentOS 6.3) Test script: --- script.php: ?php $longopts = array( required:, // Required value optional::,// Optional value option,// No value opt, // No value ); $options = getopt(, $longopts); var_dump($options); ? Expected result: The long options should be captured even if there are not short ones: array(3) { [required]= string(5) value [optional]= string(14) optional value [option]= bool(false) } Actual result: -- $ php script.php -f value for f --required value --optional=optional value --option array(0) { } Throwing in some short options does not help either: $ php script.php -f value for f -v -a --required value --optional=optional value --option array(0) { } -- Edit this bug report at https://bugs.php.net/bug.php?id=62940edit=1
Bug #62810 [Opn-Csd]: IteratorIterator changes the class of the inner iterator, breaking some calls
Edit report at https://bugs.php.net/bug.php?id=62810edit=1 ID: 62810 Updated by: tyr...@php.net Reported by:burke dot cates at gmail dot com Summary:IteratorIterator changes the class of the inner iterator, breaking some calls -Status: Open +Status: Closed Type: Bug Package:SPL related Operating System: Linux PHP Version:5.4.5 -Assigned To: +Assigned To:tyrael Block user comment: N Private report: N New Comment: closing it on the request of burke. Previous Comments: [2012-08-17 16:16:52] burke dot cates at gmail dot com I forgot the password for this bug, so I can't close it. I just tested with php 5.4.6 and this problem seems to have been fixed. I'm guessing it was part of either bug #62629 or bug #62616 [2012-08-13 15:57:26] burke dot cates at gmail dot com Description: in case the test script is unreadable, https://gist.github.com/3341836 . I have a class, A, that implements SeekableIterator, Countable in my codebase that defines all the required methods (count(), next(), seek(), valid(), current(), key()). When I have an instance of this class, $a, and construct a new IteratorIterator-extending class, B with instance $b, by passing in $a to B's constructor, a call to $b-count(), for example, will fail if A::count() is defined to use any fields also defined in A. An example is shown in my test script by simply extending ArrayIterator for the sake of simplicity. I override its count() method to echo the $extra field. The Notice line in the output shows that PHP is attempting to find $extra in B ($b), but it is not there since B is defined as an extension of IteratorIterator. This only happens when calls are going through the IteratorIterator, as a var_dump($b-getInnerIterator()) show that the innerIterator is the proper class. I tried to figure out why this is happening on my own, so I started looking through the spl_iterators.c code to figure out why this is happening. I ended up at Line 1534[1], which shows the ce of the inner getting set to the ce of the object being initialized. [1] spl_iterators.c, line 1534 : https://github.com/php/php-src/blob/master/ext/spl/spl_iterators.c#L1534 Test script: --- class A extends ArrayIterator { private $extra; public function __construct($extra) { $this-extra = $extra; parent::__construct(array(1,2,3,4,5)); } public function count() { var_dump($this); echo extra: {$this-extra}\n; return 5; } } class b extends IteratorIterator { } $a = new A(not gonna see this); $b = new B($a); echo A: ; $a-count(); echo \n\nB: ; $b-count(); Expected result: A: object(A)#1 (2) { [extra:A:private]= string(18) not gonna see this [storage:ArrayIterator:private]= array(5) { [0]= int(1) [1]= int(2) [2]= int(3) [3]= int(4) [4]= int(5) } } extra: not gonna see this B: object(b)#2 (0) { *not really sure what this should look like* } extra: not gonna see this Actual result: -- A: object(A)#1 (2) { [extra:A:private]= string(18) not gonna see this [storage:ArrayIterator:private]= array(5) { [0]= int(1) [1]= int(2) [2]= int(3) [3]= int(4) [4]= int(5) } } extra: not gonna see this B: object(b)#2 (0) { } Notice: Undefined property: b::$extra in /root/blankdir/test.php on line 12 extra: -- Edit this bug report at https://bugs.php.net/bug.php?id=62810edit=1
[PHP-BUG] Req #62979 [NEW]: Re-Request of additional function array_remove($needle, $haystack)
From: KayL at cust dot in Operating system: All PHP version: 5.4.6 Package: Arrays related Bug Type: Feature/Change Request Bug description:Re-Request of additional function array_remove($needle, $haystack) Description: I'd like to re-request the function array_remove($needle, $haystack); for the deletion of one/multiple array element/s from an existing array. Similar to Bug #12129 (by Dave Mertens), but: (zak) [...] Use: unset($array['key']); (Kay) What if I do not know the key, but still want to delete every occurrence of array elements where only the value - not key - is known (and of course keeping the original arrays order)?. This would - in my opinion as well as Mr. Mertens' - complete the native functions for arrays. Example-Input: -- $needle = red; $haystack = Array(foo=bar, 0=red, would=be cool); array_remove($needle, $haystack) -- Array(foo=bar, would=be cool); $needle = Array(be cool, 0xB16B00B5); $haystack = Array(foo=bar, 8=0xB16B00B5, would=be cool); array_remove($needle, $haystack) -- Array(foo=bar); My sample function (or this request for that matter) may not be perfect. But please be kind - it's 01:15 AM in Germany and I have to get up for work in about 5 hours... Test script: --- function array_remove($needle, Array $hackstack) { if(empty($hackstack)) return Array(); if(!is_array($needle) !is_string($needle) !is_numeric($needle)) return $hackstack; $new_array = Array(); foreach($hackstack as $key=$value) { if(is_array($needle)) { $found = FALSE; foreach($needle as $needle2) { if((string)$needle2 == (string)$value) $found = TRUE; } if(!$found) $new_array[$key] = $value; } else { if((string)$needle != (string)$value) $new_array[$key] = $value; } } return $new_array; } -- Edit bug report at https://bugs.php.net/bug.php?id=62979edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62979r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62979r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62979r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62979r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62979r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62979r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62979r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62979r=needscript Try newer version: https://bugs.php.net/fix.php?id=62979r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62979r=support Expected behavior: https://bugs.php.net/fix.php?id=62979r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62979r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62979r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62979r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62979r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62979r=dst IIS Stability: https://bugs.php.net/fix.php?id=62979r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62979r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62979r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62979r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62979r=mysqlcfg
Req #62979 [Opn]: Re-Request of additional function array_remove($needle, $haystack)
Edit report at https://bugs.php.net/bug.php?id=62979edit=1 ID: 62979 User updated by:kay dot luedtke at web dot de Reported by:kay dot luedtke at web dot de Summary:Re-Request of additional function array_remove($needle, $haystack) Status: Open Type: Feature/Change Request Package:Arrays related Operating System: All PHP Version:5.4.6 Block user comment: N Private report: N New Comment: Edit because of E-Mail-Change Previous Comments: [2012-08-30 23:28:27] kay dot luedtke at web dot de Description: I'd like to re-request the function array_remove($needle, $haystack); for the deletion of one/multiple array element/s from an existing array. Similar to Bug #12129 (by Dave Mertens), but: (zak) [...] Use: unset($array['key']); (Kay) What if I do not know the key, but still want to delete every occurrence of array elements where only the value - not key - is known (and of course keeping the original arrays order)?. This would - in my opinion as well as Mr. Mertens' - complete the native functions for arrays. Example-Input: -- $needle = red; $haystack = Array(foo=bar, 0=red, would=be cool); array_remove($needle, $haystack) -- Array(foo=bar, would=be cool); $needle = Array(be cool, 0xB16B00B5); $haystack = Array(foo=bar, 8=0xB16B00B5, would=be cool); array_remove($needle, $haystack) -- Array(foo=bar); My sample function (or this request for that matter) may not be perfect. But please be kind - it's 01:15 AM in Germany and I have to get up for work in about 5 hours... Test script: --- function array_remove($needle, Array $hackstack) { if(empty($hackstack)) return Array(); if(!is_array($needle) !is_string($needle) !is_numeric($needle)) return $hackstack; $new_array = Array(); foreach($hackstack as $key=$value) { if(is_array($needle)) { $found = FALSE; foreach($needle as $needle2) { if((string)$needle2 == (string)$value) $found = TRUE; } if(!$found) $new_array[$key] = $value; } else { if((string)$needle != (string)$value) $new_array[$key] = $value; } } return $new_array; } -- Edit this bug report at https://bugs.php.net/bug.php?id=62979edit=1
Req #62979 [Opn-Wfx]: Re-Request of additional function array_remove($needle, $haystack)
Edit report at https://bugs.php.net/bug.php?id=62979edit=1 ID: 62979 Updated by: ras...@php.net Reported by:kay dot luedtke at web dot de Summary:Re-Request of additional function array_remove($needle, $haystack) -Status: Open +Status: Wont fix Type: Feature/Change Request Package:Arrays related Operating System: All PHP Version:5.4.6 Block user comment: N Private report: N New Comment: This can be done in a simple 4-line function: function array_remove($needles, $haystack, $strict = false) { if(!is_array($needles)) $needles = array($needles); foreach($needles as $needle) while (false !== ($index = array_search($needle, $haystack, $strict))) unset($haystack[$index]); } Previous Comments: [2012-08-30 23:29:43] kay dot luedtke at web dot de Edit because of E-Mail-Change [2012-08-30 23:28:27] kay dot luedtke at web dot de Description: I'd like to re-request the function array_remove($needle, $haystack); for the deletion of one/multiple array element/s from an existing array. Similar to Bug #12129 (by Dave Mertens), but: (zak) [...] Use: unset($array['key']); (Kay) What if I do not know the key, but still want to delete every occurrence of array elements where only the value - not key - is known (and of course keeping the original arrays order)?. This would - in my opinion as well as Mr. Mertens' - complete the native functions for arrays. Example-Input: -- $needle = red; $haystack = Array(foo=bar, 0=red, would=be cool); array_remove($needle, $haystack) -- Array(foo=bar, would=be cool); $needle = Array(be cool, 0xB16B00B5); $haystack = Array(foo=bar, 8=0xB16B00B5, would=be cool); array_remove($needle, $haystack) -- Array(foo=bar); My sample function (or this request for that matter) may not be perfect. But please be kind - it's 01:15 AM in Germany and I have to get up for work in about 5 hours... Test script: --- function array_remove($needle, Array $hackstack) { if(empty($hackstack)) return Array(); if(!is_array($needle) !is_string($needle) !is_numeric($needle)) return $hackstack; $new_array = Array(); foreach($hackstack as $key=$value) { if(is_array($needle)) { $found = FALSE; foreach($needle as $needle2) { if((string)$needle2 == (string)$value) $found = TRUE; } if(!$found) $new_array[$key] = $value; } else { if((string)$needle != (string)$value) $new_array[$key] = $value; } } return $new_array; } -- Edit this bug report at https://bugs.php.net/bug.php?id=62979edit=1
Req #62979 [Wfx]: Re-Request of additional function array_remove($needle, $haystack)
Edit report at https://bugs.php.net/bug.php?id=62979edit=1 ID: 62979 Updated by: ras...@php.net Reported by:kay dot luedtke at web dot de Summary:Re-Request of additional function array_remove($needle, $haystack) Status: Wont fix Type: Feature/Change Request Package:Arrays related Operating System: All PHP Version:5.4.6 Block user comment: N Private report: N New Comment: Actually, 3 lines. We can just cast the arg to an array: function array_remove($needles, $haystack, $strict = false) { foreach((array)$needles as $needle) while (false !== ($index = array_search($needle, $haystack, $strict))) unset($haystack[$index]); } Previous Comments: [2012-08-31 00:13:12] ras...@php.net This can be done in a simple 4-line function: function array_remove($needles, $haystack, $strict = false) { if(!is_array($needles)) $needles = array($needles); foreach($needles as $needle) while (false !== ($index = array_search($needle, $haystack, $strict))) unset($haystack[$index]); } [2012-08-30 23:29:43] kay dot luedtke at web dot de Edit because of E-Mail-Change [2012-08-30 23:28:27] kay dot luedtke at web dot de Description: I'd like to re-request the function array_remove($needle, $haystack); for the deletion of one/multiple array element/s from an existing array. Similar to Bug #12129 (by Dave Mertens), but: (zak) [...] Use: unset($array['key']); (Kay) What if I do not know the key, but still want to delete every occurrence of array elements where only the value - not key - is known (and of course keeping the original arrays order)?. This would - in my opinion as well as Mr. Mertens' - complete the native functions for arrays. Example-Input: -- $needle = red; $haystack = Array(foo=bar, 0=red, would=be cool); array_remove($needle, $haystack) -- Array(foo=bar, would=be cool); $needle = Array(be cool, 0xB16B00B5); $haystack = Array(foo=bar, 8=0xB16B00B5, would=be cool); array_remove($needle, $haystack) -- Array(foo=bar); My sample function (or this request for that matter) may not be perfect. But please be kind - it's 01:15 AM in Germany and I have to get up for work in about 5 hours... Test script: --- function array_remove($needle, Array $hackstack) { if(empty($hackstack)) return Array(); if(!is_array($needle) !is_string($needle) !is_numeric($needle)) return $hackstack; $new_array = Array(); foreach($hackstack as $key=$value) { if(is_array($needle)) { $found = FALSE; foreach($needle as $needle2) { if((string)$needle2 == (string)$value) $found = TRUE; } if(!$found) $new_array[$key] = $value; } else { if((string)$needle != (string)$value) $new_array[$key] = $value; } } return $new_array; } -- Edit this bug report at https://bugs.php.net/bug.php?id=62979edit=1
Bug #62976 [Opn-Csd]: Notice: could not be converted to int when comparing some builtin classes
Edit report at https://bugs.php.net/bug.php?id=62976edit=1 ID: 62976 Updated by: larue...@php.net Reported by:ladislav at marek dot su Summary:Notice: could not be converted to int when comparing some builtin classes -Status: Open +Status: Closed Type: Bug Package:Class/Object related Operating System: Linux PHP Version:5.4Git-2012-08-30 (Git) -Assigned To: +Assigned To:laruence Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. 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/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: [2012-08-31 03:22:57] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=5dc2cef370885c552c20f3ff44bccd402850de9e Log: Fixed bug #62976 (Notice: could not be converted to int when comparing some builtin classes) [2012-08-30 17:58:53] reeze dot xia at gmail dot com Hi, I proposed a patch for this: https://github.com/php/php-src/pull/179 [2012-08-30 17:40:24] reeze dot xia at gmail dot com After the fix for #61326 ArrayObject have different compare_objects handler: http://git.php.net/?p=php- src.git;a=commit;h=23e65a9dcc71cf11ee5ec82c256588626545d4db There is an test case the same as bug report: https://github.com/php/php-src/blob/master/tests/lang/compare_objects_basic2.phpt I agree with @laruence that it could be improved. if both of the object couldn't be cast to compare. they ARE not equal. [2012-08-30 16:13:03] larue...@php.net Arrayobject is share the same object handlers as stdClass, but exception does. anyway, I think there is a room to improve.. [2012-08-30 13:16:10] ladislav at marek dot su Description: Comparing instance of some builtin class with instance of different class issues notice: Object of class ArrayObject could not be converted to int. Test script: --- new stdClass == new ArrayObject; // but new stdClass == new Exception works without notice Actual result: -- Notice: Object of class ArrayObject could not be converted to int in Command line code on line 1 Notice: Object of class stdClass could not be converted to int in Command line code on line 1 -- Edit this bug report at https://bugs.php.net/bug.php?id=62976edit=1
Bug #62977 [Asn]: array_unique() misbehaves with array of DateTimes
Edit report at https://bugs.php.net/bug.php?id=62977edit=1 ID: 62977 Updated by: larue...@php.net Reported by:ladislav at marek dot su Summary:array_unique() misbehaves with array of DateTimes Status: Assigned Type: Bug Package:Class/Object related Operating System: Linux PHP Version:5.4Git-2012-08-30 (Git) Assigned To:laruence Block user comment: N Private report: N New Comment: Cataphrac, that's why I didn't commit it, and the reason is because the comparable calss are not neighbouring after sorting. that's not much thing to do with the compare handler of specific handler. thanks Previous Comments: [2012-08-30 17:27:44] cataphr...@php.net laruuence: The patch is very strange. Why are making all the elements of the same class being compared equal? Objects can be compared. Perhaps you should fix the DateTime's compare_objects() object handler. [2012-08-30 15:52:05] larue...@php.net The following patch has been added/updated: Patch Name: bug62977.patch Revision: 1346341925 URL: https://bugs.php.net/patch-display.php?bug=62977patch=bug62977.patchrevision=1346341925 [2012-08-30 13:24:49] ladislav at marek dot su Description: array_unique() returns duplicates for array which contains objects with DateTime instances. Test script: --- ?php class Foo { public $dt; function __construct($dt) { $this-dt = $dt; } } $foo = new Foo(new DateTime); $std = new stdClass; $arr = [$foo, $foo, $std, $std, $std]; var_dump(array_unique($arr, SORT_REGULAR)); Expected result: array(4) { [0]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [2]= object(stdClass)#3 (0) { } } Actual result: -- array(4) { [0]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [1]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [2]= object(stdClass)#3 (0) { } [4]= object(stdClass)#3 (0) { } } -- Edit this bug report at https://bugs.php.net/bug.php?id=62977edit=1
Bug #62977 [Asn]: array_unique() misbehaves with array of DateTimes
Edit report at https://bugs.php.net/bug.php?id=62977edit=1 ID: 62977 Updated by: larue...@php.net Reported by:ladislav at marek dot su Summary:array_unique() misbehaves with array of DateTimes Status: Assigned Type: Bug Package:Class/Object related Operating System: Linux PHP Version:5.4Git-2012-08-30 (Git) Assigned To:laruence Block user comment: N Private report: N New Comment: fixing this we should introduce a new sorting function for objects which will make the nearest objects be neighbourings after sorting, leaving the comparing to the unique phase. but the problem is how to implement the nearest (equal same ce not equal) Previous Comments: [2012-08-31 03:41:56] larue...@php.net Cataphrac, that's why I didn't commit it, and the reason is because the comparable calss are not neighbouring after sorting. that's not much thing to do with the compare handler of specific handler. thanks [2012-08-30 17:27:44] cataphr...@php.net laruuence: The patch is very strange. Why are making all the elements of the same class being compared equal? Objects can be compared. Perhaps you should fix the DateTime's compare_objects() object handler. [2012-08-30 15:52:05] larue...@php.net The following patch has been added/updated: Patch Name: bug62977.patch Revision: 1346341925 URL: https://bugs.php.net/patch-display.php?bug=62977patch=bug62977.patchrevision=1346341925 [2012-08-30 13:24:49] ladislav at marek dot su Description: array_unique() returns duplicates for array which contains objects with DateTime instances. Test script: --- ?php class Foo { public $dt; function __construct($dt) { $this-dt = $dt; } } $foo = new Foo(new DateTime); $std = new stdClass; $arr = [$foo, $foo, $std, $std, $std]; var_dump(array_unique($arr, SORT_REGULAR)); Expected result: array(4) { [0]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [2]= object(stdClass)#3 (0) { } } Actual result: -- array(4) { [0]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [1]= object(Foo)#1 (1) { [dt]= object(DateTime)#2 (3) { [date]= string(19) 2012-08-30 15:18:01 [timezone_type]= int(3) [timezone]= string(13) Europe/Prague } } [2]= object(stdClass)#3 (0) { } [4]= object(stdClass)#3 (0) { } } -- Edit this bug report at https://bugs.php.net/bug.php?id=62977edit=1
Bug #62959 [Nab]: Wrong math
Edit report at https://bugs.php.net/bug.php?id=62959edit=1 ID: 62959 User updated by:lauris dot kuznecovs at laurisnet dot com Reported by:lauris dot kuznecovs at laurisnet dot com Summary:Wrong math Status: Not a bug Type: Bug Package:Math related Operating System: Windows 7, Centos 5.8 PHP Version:5.4.6 Block user comment: N Private report: N New Comment: I think this can be closed. No more questions. Previous Comments: [2012-08-28 19:09:35] ni...@php.net Oh, sorry, I missed rasmus second reply ;) [2012-08-28 19:00:48] ni...@php.net Floating point values have a limited precision. Hence a value might not have the same string representation after any processing. That also includes writing a floating point value in your script and directly printing it without any mathematical operations. If you would like to know more about floats and what IEEE 754 is, read this: http://www.floating-point-gui.de/ [2012-08-28 18:19:10] ras...@php.net Depends on your definition of correct. Like I said, computers cannot represent floating point with perfect accuracy. -2.8421709430404 E-14 is an extremely small number very close to 0, so it is as close to correct as you are going to get. You should probably read through this http://floating-point-gui.de/ to get up to speed on how computers treat floating point values. This isn't a PHP-specific thing. For example: Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type help, copyright, credits or license for more information. (443.292 - 193.126 - 250.166) -2.842170943040401e-14 [2012-08-28 18:11:12] lauris dot kuznecovs at laurisnet dot com Ok, lets say that the round() function works as expected, but still this calculation (443.292 - 193.126 - 250.166) return: -2.8421709430404 E-14 And that is not correct! [2012-08-28 17:57:17] ras...@php.net -0 may not exist in traditional math, but it very much exists in computer representations. Computers can't represent floating point values with complete accuracy, so if you manipulate floating point you are going to get rounding errors. -0 means a value rounded to 0 from the negative direction. You can read http://en.wikipedia.org/wiki/Signed_zero for more details. 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 https://bugs.php.net/bug.php?id=62959 -- Edit this bug report at https://bugs.php.net/bug.php?id=62959edit=1
Bug #60380 [Opn-Csd]: preg_split and old version split
Edit report at https://bugs.php.net/bug.php?id=60380edit=1 ID: 60380 User updated by:evrinoma at gmail dot com Reported by:evrinoma at gmail dot com Summary:preg_split and old version split -Status: Open +Status: Closed Type: Bug Package:*Programming Data Structures Operating System: Linux CenOS5 CentOS6 PHP Version:5.3.8 Block user comment: N Private report: N New Comment: Many thanks for help Previous Comments: [2012-08-30 19:55:06] ni...@php.net You are dealing with two levels of unescaping here. The first is the usual for string, the second is additionally done by PCRE. E.g. if you write the actually resulting string will just be \\ (because \\ is unescaped to \). This is then passed to PCRE, which itself again does unescaping, so the \\ is turned into \. That's why you need four backslashes to produce one literal backslash in a regular expression. In your particular case three work too, but only because the following character does not form an escape sequence. [2012-08-30 19:24:38] cjbf at cam dot ac dot uk Three \s are needed to match one \. Could that at least be documented if it's not wrong? $text='AA\\nB and B\r';// contains \n and \r print_r(preg_split('/\\\n|\\\r/', $text)); gives Array ( [0] = AA [1] = B and B [2] = ) [2012-08-30 19:02:43] cjbf at cam dot ac dot uk Put simply, preg_split treats \\ wrongly. It ought to search for an actual \ but never matches it. [2011-11-25 07:15:00] evrinoma at gmail dot com Description: --splite--- array[0]=0123456789-- array[1]=qwertyuiop-- array[2]=9876543210-- array[3]=poiuytrewq-- array[4]=0123456789-- array[5]=asdfghjkl-- --preg_splite-- array[0]=0123456789\qwertyuiop-- ??? array[1]=9876543210-- array[2]=poiuytrewq-- array[3]=0123456789-- array[4]=asdfghjkl-- array[5]=-- --- Test script: --- HTML HEAD TITLE BUG /TITLE /HEAD BODY ? printf( --splite--- BR\n); $date=0123456789\\qwertyuiop 9876543210.poiuytrewq:0123456789 asdfghjkl; $var = split( [-\\. :],$date ); printf( array[0]=%s-- BR\n,$var[0]); printf( array[1]=%s-- BR\n,$var[1]); printf( array[2]=%s-- BR\n,$var[2]); printf( array[3]=%s-- BR\n,$var[3]); printf( array[4]=%s-- BR\n,$var[4]); printf( array[5]=%s-- BR\n,$var[5]); printf( --preg_splite-- BR\n); $var = preg_split( #[-\\. :]#,$date); printf( array[0]=%s-- BR\n,$var[0]); printf( array[1]=%s-- BR\n,$var[1]); printf( array[2]=%s-- BR\n,$var[2]); printf( array[3]=%s-- BR\n,$var[3]); printf( array[4]=%s-- BR\n,$var[4]); printf( array[5]=%s-- BR\n,$var[5]); printf( --- BR\n); ? /BODY /HTML -- Edit this bug report at https://bugs.php.net/bug.php?id=60380edit=1