#29672 [NEW]: sem_get undefined function
From: ayor at evaseiya dot com Operating system: fedora core II PHP version: 4.3.8 PHP Bug Type: Semaphore related Bug description: sem_get undefined function Description: Hi, I have rebuild apache on my dedicated server to fork some process (fork... with "--enable-pcntl"), and it's ok now. late I rebuild apache a second time to get some functions like sem_get, sem_acquire... (--enable-sysvsem), and I don't know what's happened When I execute the php script from my browser, all it's ok. And when I execute it from the command line (ssh), there is no problem too. but when I try to plan a cron like ( Code: php /home/a/b/c/the_php_script.php ) I get a error message which says : ""PHP Fatal error: Call to undefined function: sem_get() in /home/nva0404/public_html/a/b/notify.php on line 19"" if somebodys know anything about this pb, please tell me about the solutions I had to install, cause after many tries, I ve no idea anymore thanks __ I'm french, so can you excuse my broken english Expected result: no message "PHP Fatal error: Call to undefined function: sem_get() in /home/nva0404/public_html/a/b/notify.php on line 19" Actual result: -- "PHP Fatal error: Call to undefined function: sem_get() in /home/nva0404/public_html/a/b/notify.php on line 19" -- Edit bug report at http://bugs.php.net/?id=29672&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29672&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29672&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29672&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29672&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29672&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29672&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29672&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29672&r=support Expected behavior: http://bugs.php.net/fix.php?id=29672&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29672&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29672&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29672&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29672&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29672&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29672&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29672&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29672&r=float
#29671 [NEW]: Request Flash Intigration
From: admin at php-secure dot tk Operating system: WinXP pro PHP version: Irrelevant PHP Bug Type: Feature/Change Request Bug description: Request Flash Intigration Description: I've been having trouble making a program known as "Koopa Cards" because I've found no way that PHP can read variables from a flash document. I've made a way to feed back information to the Flash program though a PHP external document, but no way to get it without an Iframe or location change, thus changing the flash to the original again. So, I request a Flashvar(varname, object) function that can recieve data without refreshing. -- Edit bug report at http://bugs.php.net/?id=29671&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29671&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29671&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29671&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29671&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29671&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29671&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29671&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29671&r=support Expected behavior: http://bugs.php.net/fix.php?id=29671&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29671&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29671&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29671&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29671&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29671&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29671&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29671&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29671&r=float
#29658 [Bgs->Opn]: #!php with paramters is broken
ID: 29658 User updated by: xuefer at 21cn dot com Reported By: xuefer at 21cn dot com -Status: Bogus +Status: Open -Bug Type: CGI related +Bug Type: Feature/Change Request -Operating System: xp/linux +Operating System: xp+cygwin &linux PHP Version: 4.3.8 New Comment: changed to feature request updated os how about: #!/usr/bin/php -p "" p means parameters (or -o options) and the string after it is parsed as command line options as shell do Previous Comments: [2004-08-13 19:21:04] [EMAIL PROTECTED] #! is a unixy thing that is not supported on windows. Additionally, most OS's don't support more than a single parameter there. Not a PHP bug. [2004-08-13 19:04:41] xuefer at 21cn dot com Description: touch php.ini ./test | grep php.ini -i paramter works but -c not seems those spaces is not convert to '\0' sapi/cli/php_cli.c while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0))!=-1) { switch (c) { case 'c': cli_sapi_module.php_ini_path_override = strdup(php_optarg); /*debug*/ printf("%d %d '%s'\n", (int) php_optarg[0], strlen(php_opt_arg), php_optarg); break; case 'n': cli_sapi_module.php_ini_ignore = 1; break; } } got "32 2 ' .'" seems a problem of the shell if -c is ok to be left broken. -i shouldn't be working too but allowing options in #! is very useful Reproduce code: --- #!/usr/bin/php -i -c . // empty file Expected result: Configuration File (php.ini) Path => /etc/php.ini Actual result: -- Configuration File (php.ini) Path => ./php.ini -- Edit this bug report at http://bugs.php.net/?id=29658&edit=1
#29669 [Opn]: Setting ADO RecordSet CursorLocation to adUseClient causes query delay
ID: 29669 User updated by: www dot spam at whoah dot net Reported By: www dot spam at whoah dot net Status: Open Bug Type: COM related Operating System: Windows 2000 Professional PHP Version: 5.0.1 New Comment: Further: The delay seems to be related to the size of the results data being returned. The table referenced by my query has some 11000 records whereas the same query on another table with only a few records experiences no delay. Querying the same table (11000 records) using a server-side cursor causes no delay. ASP experiences no such delay using the same COM objects and routines, on the same server. Previous Comments: [2004-08-14 03:29:38] www dot spam at whoah dot net Description: When attempting to use ADODB.RecordSet COM object to query an MS Access database via a DSNless connection, setting the CursorLocation to adUseClient causes a significant delay on the processing of a query execution. ASP has no such issue with this, so maybe PHP's support can be improved (client-side cursor location allows the use of additional RecordSet features such as ->Sort() and ->Filter(), handy for porting ASP code that uses it instead of writing a dynamic query). Any database and query should reproduce this, so please modify the 'reproduce code' appropriately (to point to your own database and use your own query). Reproduce code: --- define("adLockReadOnly",1); define("adOpenStatic",3); define("adUseClient",3); function simpleRS($conn,$q) { $rs = new COM('ADODB.RecordSet'); $rs->ActiveConnection = $conn; $rs->LockType = adLockReadOnly; $rs->CursorLocation = adUseClient; //comment this line to remove the delay $rs->CursorType = adOpenStatic; $rs->Source = $q; echo 'opening... '; $rs->Open(); echo 'done'; return $rs; } $dbconn = new COM('ADODB.Connection'); $dbconn->open('Provider=Microsoft.Jet.OLEDB.4.0; Data Source='. realpath('../../data/phpbb2.mdb')); $rsUserList = simpleRS($dbconn,'SELECT * FROM phpbb_users'); $dbconn->close(); Expected result: opening... *almost instant* done Actual result: -- opening... *delay* done -- Edit this bug report at http://bugs.php.net/?id=29669&edit=1
#29670 [NEW]: Error declare variable
From: caspersvn at yahoo dot com Operating system: windows 2000 pro PHP version: 5.0.0 PHP Bug Type: Unknown/Other Function Bug description: Error declare variable Description: when i run this page i receive an error Notice: Undefined variable: fname in E:\GPO\Webphp\guestbook\guestbook.php on line 52 and i can receive the value of variable if i submit from page 'A' to page 'B' (page B can not receive the value of variable what sent from page A) please show me the way to solve it. Thanks Reproduce code: --- Name: -- Edit bug report at http://bugs.php.net/?id=29670&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29670&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29670&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29670&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29670&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29670&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29670&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29670&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29670&r=support Expected behavior: http://bugs.php.net/fix.php?id=29670&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29670&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29670&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29670&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29670&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29670&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29670&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29670&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29670&r=float
#29568 [Fbk->Opn]: GD causes an segmentation fault
ID: 29568 User updated by: bram at x-plose dot be Reported By: bram at x-plose dot be -Status: Feedback +Status: Open Bug Type: GD related Operating System: debian PHP Version: 4.3.8 New Comment: I tried the cvs version and when i start the program with gdb and run -X this happens when i call a the script: GNU gdb 6.1-debian This GDB was configured as "i386-linux"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run -X Starting program: /usr/local/apache2/bin/httpd -X [Thread debugging using libthread_db enabled] [New Thread 1024 (LWP 2163)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (LWP 2163)] 0x0019 in ?? () the bt shows this: (gdb) bt #0 0x0019 in ?? () #1 0x405a4302 in png_create_struct_2 (type=2, malloc_fn=0x19, mem_ptr=0x5a5a5a5a) at pngmem.c:351 #2 0x4063c168 in png_create_info_struct () from /usr/local/lib/libpng.so.3 #3 0x40388faf in gdImageCreateFromPngCtx (infile=0x82814ac) at /var/src/webserv/php4-STABLE-200408132230/ext/gd/libgd/gd_png.c:149 #4 0x40388e44 in gdImageCreateFromPng (inFile=0x82819f8) at /var/src/webserv/php4-STABLE-200408132230/ext/gd/libgd/gd_png.c:90 #5 0x403706bc in _php_image_create_from (ht=1, return_value=0x8281824, this_ptr=0x0, return_value_used=1, image_type=2, tn=0x404e74c7 "PNG", func_p=0x40388e10 , ioctx_func_p=0x40388ed0 ) at /var/src/webserv/php4-STABLE-200408132230/ext/gd/gd.c:1470 #6 0x4037083d in zif_imagecreatefrompng (ht=1, return_value=0x8281824, this_ptr=0x0, return_value_used=1) at /var/src/webserv/php4-STABLE-200408132230/ext/gd/gd.c:1516 #7 0x404d4ab2 in execute (op_array=0x82cea34) at /var/src/webserv/php4-STABLE-200408132230/Zend/zend_execute.c:1640 #8 0x404c15d4 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /var/src/webserv/php4-STABLE-200408132230/Zend/zend.c:891 #9 0x4048578c in php_execute_script (primary_file=0xb79c) at /var/src/webserv/php4-STABLE-200408132230/main/main.c:1734 #10 0x404db4bc in php_handler (r=0x82e1b70) at /var/src/webserv/php4-STABLE-200408132230/sapi/apache2handler/sapi_apache2.c:540 #11 0x080ae589 in ap_run_handler (r=0x82e1b70) at config.c:151 #12 0x080aead3 in ap_invoke_handler (r=0x82e1b70) at config.c:358 #13 0x08096ae6 in ap_process_request (r=0x82e1b70) at http_request.c:246 #14 0x08092a6a in ap_process_http_connection (c=0x8264510) at http_core.c:250 #15 0x080b7a98 in ap_run_process_connection (c=0x8264510) at connection.c:42 #16 0x080b7d5c in ap_process_connection (c=0x8264510, csd=0x8264438) at connection.c:175 #17 0x080ad210 in child_main (child_num_arg=0) at prefork.c:609 #18 0x080ad2cc in make_child (s=0x81d1500, slot=0) at prefork.c:649 #19 0x080ad3c1 in startup_children (number_to_start=40) at prefork.c:721 #20 0x080ad6c3 in ap_mpm_run (_pconf=0x8193e90, plog=0x81cbf70, s=0x81d1500) at prefork.c:940 #21 0x080b2e7e in main (argc=2, argv=0xbb84) at main.c:617 Previous Comments: [2004-08-08 22:59:01] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2004-08-08 04:29:32] bram at x-plose dot be Description: When i open an php script that uses GD it shows an segmentation fault in error.log Server software: Apache/1.3.26 (deb package) (Unix) Debian GNU/Linux PHP/4.3.8 The script is comming from php.net so i dont supose there's an error in it. I included /usr/local/lib/php in php.ini and i added extension = gd.so './configure' '--with-jpeg-dir=../jpeg-6b/' '--with-pdflib' '--with-tiff-dir=../tiff-v3.6.1/' '--with-png-dir=../libpng-1.2.5/' '--with-zlib-dir=../zlib-1.1.4/' '--enable-static-pdflib' '--enable-gd-imgstrttf' '--with-gd' '--with-mysql' '--with-apxs' '--enable-fast-cgi-redirect' '--with-freetype-dir=/usr/local/freetype2/' '--with-iconv' '--with-gettext' Reproduce code: --- Actual result: -- I only get, Cant find server and in error.log i find [Sun Aug 8 04:12:51 2004] [notice] child pid 24310 exit signal Segmentation fault (11) [Sun Aug 8 04:12:51 2004] [notice] child pid 2085 exit signal Segmentation fault (11) -- Edit this bug report at http://bugs.php.net/?id=29568&edit=1
#29669 [NEW]: Setting ADO RecordSet CursorLocation to adUseClient causes query delay
From: www dot spam at whoah dot net Operating system: Windows 2000 Professional PHP version: 5.0.1 PHP Bug Type: COM related Bug description: Setting ADO RecordSet CursorLocation to adUseClient causes query delay Description: When attempting to use ADODB.RecordSet COM object to query an MS Access database via a DSNless connection, setting the CursorLocation to adUseClient causes a significant delay on the processing of a query execution. ASP has no such issue with this, so maybe PHP's support can be improved (client-side cursor location allows the use of additional RecordSet features such as ->Sort() and ->Filter(), handy for porting ASP code that uses it instead of writing a dynamic query). Any database and query should reproduce this, so please modify the 'reproduce code' appropriately (to point to your own database and use your own query). Reproduce code: --- define("adLockReadOnly",1); define("adOpenStatic",3); define("adUseClient",3); function simpleRS($conn,$q) { $rs = new COM('ADODB.RecordSet'); $rs->ActiveConnection = $conn; $rs->LockType = adLockReadOnly; $rs->CursorLocation = adUseClient; //comment this line to remove the delay $rs->CursorType = adOpenStatic; $rs->Source = $q; echo 'opening... '; $rs->Open(); echo 'done'; return $rs; } $dbconn = new COM('ADODB.Connection'); $dbconn->open('Provider=Microsoft.Jet.OLEDB.4.0; Data Source='. realpath('../../data/phpbb2.mdb')); $rsUserList = simpleRS($dbconn,'SELECT * FROM phpbb_users'); $dbconn->close(); Expected result: opening... *almost instant* done Actual result: -- opening... *delay* done -- Edit bug report at http://bugs.php.net/?id=29669&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29669&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29669&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29669&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29669&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29669&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29669&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29669&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29669&r=support Expected behavior: http://bugs.php.net/fix.php?id=29669&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29669&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29669&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29669&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29669&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29669&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29669&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29669&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29669&r=float
#29668 [NEW]: Memory leak when looping an associative array
From: thecanadiancrappler at hotmail dot com Operating system: Windows XP SP 1 PHP version: 4.3.8 PHP Bug Type: Reproducible crash Bug description: Memory leak when looping an associative array Description: When looping numerically through an associative array, certain operations cause a massive memory leak in Apache, eating up all available ram at about 60mb/s. Windows grinds to a halt as 1gb of Virtual Memory is gobbled up. Trying to echo each element of the array returns nothing as would be expected, but concatting or executing a function such a stripslashes on the elements causes the memory leak. My php.ini differs only in max_execution time and the maximum size of POST uploads. Reproduce code: --- $array['a'] = 'Some text'; $array['b'] = "It\'s nice text"; // prints 2 echo count($array); // prints nothing echo $array[0]; // does nothing $array[0] = stripslashes($array[0]); for ($i=0; $ihttp://bugs.php.net/?id=29668&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29668&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29668&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29668&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29668&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29668&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29668&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29668&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29668&r=support Expected behavior: http://bugs.php.net/fix.php?id=29668&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29668&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29668&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29668&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29668&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29668&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29668&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29668&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29668&r=float
#29104 [Opn]: Function declaration in method doesn't work
ID: 29104 Updated by: [EMAIL PROTECTED] Reported By: tomas_matousek at hotmail dot com Status: Open Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5.0.0 Assigned To: Andi New Comment: While nested functions are maybe useful feature for someone declaration of a function inside the body of a method (which happens to be a function inside a class) is _ambigious_ . Why? There is no reserved word "method" for marking methods of a class and "function" is used so when it is between {} after class name "function" creates a method of the class. IMO "function" inside a method should not be possible. Previous Comments: [2004-07-16 18:00:35] postings-php-bug at hans-spath dot de Wait a minute, PHP doesn't support nested functions? Holy shit, documentation lies! http://www.php.net/manual/en/language.functions.php "Example 12-3. Functions within functions" Do we need to file a documentation bug, too? [2004-07-13 21:46:59] [EMAIL PROTECTED] PHP does not support nested functions. Still we need to disable this. [2004-07-13 21:42:52] tomas_matousek at hotmail dot com PHP supports declaring functions "inline", i.e. almost anywhere in a code. Such function is declared as global wherever it is declared. Hence, I don't see any ambiguity if a function is declared inside a method. PHP doesn't support adding new methods into existing class. That's why a function declared in method can only be a global one. [2004-07-13 17:45:57] Jason at hybd dot net >From what I gather, like most languages, PHP doesn't support 'nested' methods. (And therefore I doubt this is a bug) Where you are calling f() is ambigous. As far as PHP is concerned f() is probably a global function and not a method embedded inside a::g(). [2004-07-12 09:41:23] tomas_matousek at hotmail dot com Description: Declaration of a function in a method doesn't work. IMHO by declaring a function in a method one creates a function not a method. It it was a method it would be possible to call it by $a->f(). That works neither. See the code below: Reproduce code: --- class A { function g() { echo "function g - begin\n"; function f() { echo "function f\n"; } echo "function g - end\n"; } } $a = new A; $a->g(); f(); Expected result: function g - begin function g - end function f Actual result: -- function g - begin function g - end Fatal error: Non-static method A::f() cannot be called statically ... -- Edit this bug report at http://bugs.php.net/?id=29104&edit=1
#4538 [Com]: Error with odbc_exec and an Insert query
ID: 4538 Comment by: anand_immer at yahoo dot fr Reported By: guillaume dot patry at netcourrier dot com Status: Closed Bug Type: ODBC related Operating System: Windows2000 Pro PHP Version: 4.0 Release Candidate 1 New Comment: This could rather be a case of access (authorisation) to database for writing; you have to check this and ALSO the rights you have fixed for each folder including the database. You must share each folder where your application is put (not just the web sharing but the mere sharing of a folder, like you do for transfers between two computers in a LAN) and then try and see if the insert works. Previous Comments: [2000-06-20 11:15:42] kara at cvs dot php dot net Either use $AddPrepare = odbc_prepare($odbc, $SQL_Insert); odbc_execute($AddPrepare); or $res = odbc_exec($odbc, $SQL_Insert); Additionally, your odbc_commit() is bogus. You are normally in autocommit mode, meaning your statements are automatically commited on success. If you were in manual commit mode, you should check the result of odbc_execute() / odbc_exec() and then commit / rollback, not the result of odbc_prepare() [2000-05-22 05:09:05] guillaume dot patry at netcourrier dot com my php script : --- $idCon = odbc_connect("DataWeb","","", SQL_CUR_USE_ODBC); $SQL_Insert = "INSERT INTO Users (name, firm, username, password, email) VALUES ('$nom', '$firm', '$login', '$pass', '$mail')"; $AddPrepare = odbc_prepare($odbc, $SQL_Insert); if ($AddPrepare) { $QueryAdd = odbc_exec($odbc, $SQL_Insert); odbc_commit($odbc); } else echo "Error on The Serveur "; } The Error Message : --- Warning: SQL error: [Microsoft][Pilote ODBC Microsoft Access] L'opération doit utiliser une requête qui peut être mise à jour., SQL state S1000 in SQLExecute in C:\Inetpub\wwwroot\php\register.php on line 123 Warning: SQL error: , SQL state 0 in SQLExecute in C:\Inetpub\wwwroot\php\register.php on line 123 Configuration : --- I use Windows2000 pro with php4 and IIS 5. All the select queries works but the Insert Into dosen't work... My php.ini file is OK, i don't have make any changes on it. -- Edit this bug report at http://bugs.php.net/?id=4538&edit=1
#28892 [Opn->Ver]: Object id that's still in use gets reassigned/removing one reference deletes obj
ID: 28892 Updated by: [EMAIL PROTECTED] -Summary: Object id that's still in use gets reassigned Reported By: paranoid at pcwereld dot be -Status: Open +Status: Verified Bug Type: Zend Engine 2 problem -Operating System: Windows 2k +Operating System: All -PHP Version: 5.0.0RC3 +PHP Version: 5.0.0+ New Comment: Shorter reproduce script. It shows that removing one reference with setting the variable holding it to NULL deletes the object thus leaving one reference handing. In the script of the original reporter this interferes with a creation of a new object of the class of the innormally deleted one and the new objects hooks on the nirvana reference created by the bug. text = $m; } } class C { public $e; public $e2; function __construct($elem){ $this->e = $elem; $this->e2 = $elem; $this->e = null; var_dump($this); } } ?> Output : object(C)#1 (2) { ["e"]=> NULL ["e2"]=> NULL } // "e2" has been deleted when $this->e =null; which is not correct IMHO Similar example works correctly : php -r '$a=new stdclass();$b=$a; $a=null; var_dump($a,$b);' Previous Comments: [2004-06-24 10:38:27] paranoid at pcwereld dot be When using new C($a = new A()) instead of new C(new A()) the code seems to work like expected. [2004-06-23 12:59:04] paranoid at pcwereld dot be Description: PHP reassigns an allready-in-use object id to a newly created object, after the first object (that loses it's id) was removed from an array, but was still referenced in another object. Reproduce code: --- http://users.pandora.be/paranet/poc.html Expected result: I expected that object C would still contain a reference to the first A object (A-1) i created, ... Actual result: -- (see comments in code for the actual output) ... instead A-1 was overwritten with a second A object (A-2) i created, that (!) used the same object id as the first A object. PHP seems to be missing the fact that A-1 is still referenced inside the C object, and thus assigns the object id A-1 was using to A-2 Removing the part marked "important" in list_remove results in a normal behaviour, eg. C refers to A-1, not A-2. And A-2 doesn't get the same object id as A-1. The bug is probably somewhere in the code that removes an object from an array. -- Edit this bug report at http://bugs.php.net/?id=28892&edit=1
#29639 [Opn]: php crashes when getimagesize run on corrupt swf
ID: 29639 User updated by: edman007x at mac dot com Reported By: edman007x at mac dot com Status: Open Bug Type: Reproducible crash Operating System: Linux (slackware-current) PHP Version: 4.3.8 New Comment: i just tested it in php 5.0.1 and php 4.3.9RC1 and they both crashed Previous Comments: [2004-08-12 23:34:05] edman007x at mac dot com Description: i have a corrupt swf file (i think thats why) but when i getimagesize on it should it just return false, all i get is it FATAL: erealloc(): Unable to allocate -70365184 bytes in my apache error log Reproduce code: --- http://homepage.mac.com/rodneytool/prank.swf')); ?> Expected result: getimagesize should return false Actual result: -- php crashes in the error log is this FATAL: erealloc(): Unable to allocate -70365184 bytes and the backtrace is this [EMAIL PROTECTED]:/home/edman007/apache# gdb /usr/local/ apache/bin/httpd GNU gdb 6.2 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-slackware- linux"...Using host libthread_db library "/lib/ libthread_db.so.1". (gdb) run -X Starting program: /usr/local/apache/bin/httpd -X Program received signal SIGSEGV, Segmentation fault. 0x400d71b1 in kill () from /lib/libc.so.6 (gdb) bt #0 0x400d71b1 in kill () from /lib/libc.so.6 #1 0x40323f60 in _erealloc (ptr=0x408c302c, size=4224602112, allow_failure=0, __zend_filename=0x40364660 "/root/php/ext/standard/ image.c", __zend_lineno=229, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /root/php/Zend/zend_alloc.c:334 #2 0x402a07e5 in php_handle_swc (stream=0x8141a3c) at / root/php/ext/standard/image.c:229 #3 0x402a2787 in zif_getimagesize (ht=1, return_value=0x814895c, this_ptr=0x0, return_value_used=1) at /root/php/ext/standard/image.c: 1230 #4 0x40348e86 in execute (op_array=0x813fb34) at /root/ php/Zend/zend_execute.c:1635 #5 0x40337741 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php/Zend/zend.c:891 #6 0x40300766 in php_execute_script (primary_file=0xbfffdc60) at /root/php/main/main.c:1734 #7 0x4034dff8 in apache_php_module_main (r=0x8138914, display_source_mode=0) at /root/php/sapi/apache/ sapi_apache.c:54 #8 0x4034efad in send_php (r=0x8138914, display_source_mode=0, filename=0x8139504 "/usr/local/ apache/htdocs/antiwindows/flash.php") at /root/php/sapi/apache/mod_php4.c:620 #9 0x4034f026 in send_parsed_php (r=0x8138914) at / root/php/sapi/apache/mod_php4.c:635 #10 0x0807566f in ap_invoke_handler () #11 0x0808a6a9 in process_request_internal () #12 0x0808a708 in ap_process_request () #13 0x0808172a in child_main () #14 0x080818d2 in make_child () #15 0x08081a38 in startup_children () #16 0x080820f8 in standalone_main () #17 0x08082916 in main () (gdb) frame 4 #4 0x40348e86 in execute (op_array=0x813fb34) at /root/ php/Zend/zend_execute.c:1635 1635 ((zend_internal_function *) EX(function_state).function)->handler(EX(opline)- >extended_value, EX(Ts)[EX(opline)- >result.u.var].var.ptr, EX(object).ptr, return_value_used TSRMLS_CC); (gdb) print (char *)(executor_globals.function_state_ptr->function)- >common.function_name $1 = 0x4035f44a "getimagesize" (gdb) -- Edit this bug report at http://bugs.php.net/?id=29639&edit=1
#29432 [Fbk->NoF]: error message when adding an event to calendar
ID: 29432 Updated by: [EMAIL PROTECTED] Reported By: martin at academyx dot com -Status: Feedback +Status: No Feedback Bug Type:Calendar related PHP Version: Irrelevant New Comment: No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: [2004-07-29 00:57:47] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. [2004-07-28 18:11:22] martin at academyx dot com Description: error message when adding an event to calendar it would not allow me to post a class. no error about incorrect data, etc. -- Edit this bug report at http://bugs.php.net/?id=29432&edit=1
#29015 [Opn->Ver]: Incorrect behavior of member vars(non string ones)-numeric mem vars und others
ID: 29015 Updated by: [EMAIL PROTECTED] -Summary: Strange behavior of field which names are not strings Reported By: tomas_matousek at hotmail dot com -Status: Open +Status: Verified Bug Type: Zend Engine 2 problem -Operating System: WinXP +Operating System: All -PHP Version: 5.0.0RC3 +PHP Version: 5.0.0+ Previous Comments: [2004-08-14 00:43:06] php at hristov dot com AFAUK, internally the private member variables are stored in such a way that the first byte is \0, which maybe you emulate with your test case. ":private" means that the member var is private one. shorter example for "creating" of a private variable : php -r '$a=new stdclass();$a->$b=3;var_dump($a);' and of "integer" member variable php -r '$a=new stdclass();$b=3;$a->$b=3;var_dump($a);' andrey [2004-07-05 15:02:12] tomas_matousek at hotmail dot com Description: If I try to use variable with non-string name (e.g. $x = 10; $$x = ...) the name is converted to a string using standard conversion rules. That's ok. But this doesn't work on object's field which is IMHO a bug and it implies some a buggy behavior. See the code bellow. It seems that by: $x = null; $a->$x = "whatever"; one can somehow create a private variable (or something like that, don't know what ":private" means)! Moreover, there is possibly a bug in get_object_vars when a field name is a numeric string (e.g. "10") (compare the first item of results of get_object_vars and var_dump). Reproduce code: --- function field_names_test() { $a = new stdClass(); $x = 10; $a->$x = "int(10)"; $x = "10"; $a->$x = "string('10')"; $x = ""; $a->$x = "string('')"; $x = null; $a->$x = "null"; $x = 1.8; $a->$x = "double(1.8)"; $x = false; $a->$x = "bool(false)"; $x = array(1,2,3); $a->$x = "array(1,2,3)"; var_dump(get_object_vars($a)); var_dump($a); } field_names_test(); Expected result: array(4) { ["10"]=> string(12) "string('10')" [""]=> string(11) "bool(false)" ["1.8"]=> string(11) "double(1.8)" ["Array"]=> string(12) "array(1,2,3)" } object(stdClass)#1 (4) { ["10"]=> string(12) "string('10')" [""]=> string(11) "bool(false)" ["1.8"]=> string(11) "double(1.8)" ["Array"]=> string(12) "array(1,2,3)" } Actual result: -- array(3) { [10]=> string(12) "string('10')" ["1.8"]=> string(11) "double(1.8)" ["Array"]=> string(12) "array(1,2,3)" } object(stdClass)#1 (4) { ["10"]=> string(12) "string('10')" [":private"]=> string(11) "bool(false)" ["1.8"]=> string(11) "double(1.8)" ["Array"]=> string(12) "array(1,2,3)" } -- Edit this bug report at http://bugs.php.net/?id=29015&edit=1
#29015 [Com]: Strange behavior of field which names are not strings
ID: 29015 Comment by: php at hristov dot com Reported By: tomas_matousek at hotmail dot com Status: Open Bug Type: Zend Engine 2 problem Operating System: WinXP PHP Version: 5.0.0RC3 New Comment: AFAUK, internally the private member variables are stored in such a way that the first byte is \0, which maybe you emulate with your test case. ":private" means that the member var is private one. shorter example for "creating" of a private variable : php -r '$a=new stdclass();$a->$b=3;var_dump($a);' and of "integer" member variable php -r '$a=new stdclass();$b=3;$a->$b=3;var_dump($a);' andrey Previous Comments: [2004-07-05 15:02:12] tomas_matousek at hotmail dot com Description: If I try to use variable with non-string name (e.g. $x = 10; $$x = ...) the name is converted to a string using standard conversion rules. That's ok. But this doesn't work on object's field which is IMHO a bug and it implies some a buggy behavior. See the code bellow. It seems that by: $x = null; $a->$x = "whatever"; one can somehow create a private variable (or something like that, don't know what ":private" means)! Moreover, there is possibly a bug in get_object_vars when a field name is a numeric string (e.g. "10") (compare the first item of results of get_object_vars and var_dump). Reproduce code: --- function field_names_test() { $a = new stdClass(); $x = 10; $a->$x = "int(10)"; $x = "10"; $a->$x = "string('10')"; $x = ""; $a->$x = "string('')"; $x = null; $a->$x = "null"; $x = 1.8; $a->$x = "double(1.8)"; $x = false; $a->$x = "bool(false)"; $x = array(1,2,3); $a->$x = "array(1,2,3)"; var_dump(get_object_vars($a)); var_dump($a); } field_names_test(); Expected result: array(4) { ["10"]=> string(12) "string('10')" [""]=> string(11) "bool(false)" ["1.8"]=> string(11) "double(1.8)" ["Array"]=> string(12) "array(1,2,3)" } object(stdClass)#1 (4) { ["10"]=> string(12) "string('10')" [""]=> string(11) "bool(false)" ["1.8"]=> string(11) "double(1.8)" ["Array"]=> string(12) "array(1,2,3)" } Actual result: -- array(3) { [10]=> string(12) "string('10')" ["1.8"]=> string(11) "double(1.8)" ["Array"]=> string(12) "array(1,2,3)" } object(stdClass)#1 (4) { ["10"]=> string(12) "string('10')" [":private"]=> string(11) "bool(false)" ["1.8"]=> string(11) "double(1.8)" ["Array"]=> string(12) "array(1,2,3)" } -- Edit this bug report at http://bugs.php.net/?id=29015&edit=1
#29667 [NEW]: mysqli functions do not work in 5.0.1
From: yrob at mail dot crpower dot com Operating system: Linux 2.6.5-7.104-default PHP version: 5.0.1 PHP Bug Type: MySQL related Bug description: mysqli functions do not work in 5.0.1 Description: I'm using MySQL 5.0.1. The main problem here is that now the mysqli functions don't work. Configuration, make, and make install run just fine. When I try to load a web page, nothing displays (displayed just fine using PHP 5.0.0). When I use the CLI on PHP 5.0.1 to test the web page, it seems to run just fine. Had to go back to PHP 5.0.0 so my mysqli functions will work. The other problem is that I wasn't able to get mysql functions to work at all. It wouldn't even pass configuration "--with-mysql=/usr/lib/mysql". Configuration said it couldn't find libmysql, though I pointed it directly to the MySQL 5.0.1 library directory. Reproduce code: --- $db = new mysqli( 'dbhost', 'username', 'pw'); if (!$db) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $db->select_db("dbname"); $sql = "SELECT * FROM test"; $select = $db->query( $sql ); $result = $select->fetch_array(MYSQLI_BOTH); $something = $result['something']; Expected result: Loaded web page. Actual result: -- Web page does not load, but the CLI runs just fine. -- Edit bug report at http://bugs.php.net/?id=29667&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29667&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29667&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29667&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29667&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29667&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29667&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29667&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29667&r=support Expected behavior: http://bugs.php.net/fix.php?id=29667&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29667&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29667&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29667&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29667&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29667&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29667&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29667&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29667&r=float
#29665 [NEW]: PHP Fails to compile when soap is enabled
From: moontumbo at hotmail dot com Operating system: Red Hat Enterprise Linux WS 3.0 PHP version: 5.0.1 PHP Bug Type: Compile Failure Bug description: PHP Fails to compile when soap is enabled Description: When PHP 5.0.1 is configured with SOAP support, the compilation fails. We are using the same configure command that we used on PHP 5.0.0. When soap is removed from the configure, it compiles cleanly. Reproduce code: --- './configure' \ '--with-config-file-path=/usr/local/apache/conf' \ '--with-apxs=/usr/local/apache/bin/apxs' \ '--enable-sigchild' \ '--with-gd' \ '--enable-gd-native-ttf' \ '--with-freetype-dir=/usr/local/lib' \ '--with-jpeg-dir=/usr/lib' \ '--with-png-dir=/usr/local/lib' \ '--with-zlib-dir=/usr/local/lib' \ '--with-xpm-dir=/usr/lib' \ '--with-openssl' \ '--with-mysql' \ '--enable-soap' \ '--with-ldap' \ '--with-t1lib' \ '--enable-bcmath' \ '--enable-calendar' \ '--enable-ftp' \ "$@" //Configures fine. Make fails. make Expected result: Successful compilation and installation upon make install. Actual result: -- ext/soap/php_encoding.lo(.text+0x5b7): In function `to_zval_string': /usr/local/src/php/php-5.0.1/ext/soap/php_encoding.c:467: undefined reference to `xmlBufferCreateStatic' ext/soap/php_encoding.lo(.text+0x8d5): In function `to_zval_stringr': /usr/local/src/php/php-5.0.1/ext/soap/php_encoding.c:503: undefined reference to `xmlBufferCreateStatic' ext/soap/php_encoding.lo(.text+0xbf3): In function `to_zval_stringc': /usr/local/src/php/php-5.0.1/ext/soap/php_encoding.c:539: undefined reference to `xmlBufferCreateStatic' ext/soap/php_encoding.lo(.text+0x1125): In function `to_xml_string': /usr/local/src/php/php-5.0.1/ext/soap/php_encoding.c:607: undefined reference to `xmlBufferCreateStatic' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 -- Edit bug report at http://bugs.php.net/?id=29665&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29665&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29665&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29665&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29665&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29665&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29665&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29665&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29665&r=support Expected behavior: http://bugs.php.net/fix.php?id=29665&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29665&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29665&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29665&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29665&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29665&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29665&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29665&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29665&r=float
#29663 [Opn->Bgs]: php://stdin does not wait for input after first run
ID: 29663 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: CGI related Operating System: Win32 & Linux PHP Version: 5.0.1 New Comment: Apparently this in intended behaviour for CLI scripts. Previous Comments: [2004-08-13 21:40:44] [EMAIL PROTECTED] Using the STDIN constant works. Removing fclose() in the above example does not solve the problem. [2004-08-13 21:22:28] [EMAIL PROTECTED] Description: The code below works in PHP4, but not in PHP 5.0.1 After first being prompted for stdin input and clicking enter the rest of the loop finishes without waiting for user interaction Run the code below in CLI. Enter "foo"[ENTER] Reproduced in both Win32 and Linux Reproduce code: --- Expected result: Please enter something: foo string(3) "foo" Please enter something: Actual result: -- Please enter something: foo string(3) "foo" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" -- Edit this bug report at http://bugs.php.net/?id=29663&edit=1
#29663 [Opn]: php://stdin does not wait for input after first run
ID: 29663 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: CGI related Operating System: Win32 & Linux PHP Version: 5.0.1 New Comment: Using the STDIN constant works. Removing fclose() in the above example does not solve the problem. Previous Comments: [2004-08-13 21:22:28] [EMAIL PROTECTED] Description: The code below works in PHP4, but not in PHP 5.0.1 After first being prompted for stdin input and clicking enter the rest of the loop finishes without waiting for user interaction Run the code below in CLI. Enter "foo"[ENTER] Reproduced in both Win32 and Linux Reproduce code: --- Expected result: Please enter something: foo string(3) "foo" Please enter something: Actual result: -- Please enter something: foo string(3) "foo" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" -- Edit this bug report at http://bugs.php.net/?id=29663&edit=1
#29663 [NEW]: php://stdin does not wait for input after first run
From: [EMAIL PROTECTED] Operating system: Win32 & Linux PHP version: 5.0.1 PHP Bug Type: CGI related Bug description: php://stdin does not wait for input after first run Description: The code below works in PHP4, but not in PHP 5.0.1 After first being prompted for stdin input and clicking enter the rest of the loop finishes without waiting for user interaction Run the code below in CLI. Enter "foo"[ENTER] Reproduced in both Win32 and Linux Reproduce code: --- Expected result: Please enter something: foo string(3) "foo" Please enter something: Actual result: -- Please enter something: foo string(3) "foo" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" Please enter something: string(0) "" -- Edit bug report at http://bugs.php.net/?id=29663&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29663&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29663&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29663&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29663&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29663&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29663&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29663&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29663&r=support Expected behavior: http://bugs.php.net/fix.php?id=29663&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29663&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29663&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29663&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29663&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29663&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29663&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29663&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29663&r=float
#29549 [Opn]: xpath() output makes PHP segfault or run out of memory when used in preg_match
ID: 29549 Updated by: [EMAIL PROTECTED] Reported By: r dot korving at xit dot nl Status: Open Bug Type: SimpleXML related Operating System: debian linux 2.4.26 kernel PHP Version: 5.0.0 New Comment: looks like an engine bug. when it parsers the arguments for a function and tries to do its auto string conversion magic, the zval gets hosed since it uses the zval as both the read and write object for the cast_object call in zend_parse_arg_impl. simple script: "); str_split($xml); // any function requiring string paremeter var_dump($xml); // $xml is foobar at this point ?> Previous Comments: [2004-08-13 12:34:33] [EMAIL PROTECTED] I don't know, if it's an Engine or a SimpleXML problem, but here's the backtrace to it #0 _efree (ptr=0x) at /opt/cvs/php5.0/Zend/zend_alloc.c:263 #1 0x001452f4 in _zval_ptr_dtor (zval_ptr=0xffef) at /opt/cvs/php5.0/Zend/zend_execute_API.c:391 #2 0x001452f4 in _zval_ptr_dtor (zval_ptr=0x1982538) at /opt/cvs/php5.0/Zend/zend_execute_API.c:391 #3 0x001728a0 in zend_do_fcall_common_helper (execute_data=0xbfffeb70, opline=0x2009f7c, op_array=0x19868e0) at /opt/cvs/php5.0/Zend/zend_execute.h:124 #4 0x0016effc in execute (op_array=0x19868e0) at /opt/cvs/php5.0/Zend/zend_execute.c:1400 #5 0x0015103c in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /opt/cvs/php5.0/Zend/zend.c:1061 #6 0x00119914 in php_execute_script (primary_file=0xb5b0) at /opt/cvs/php5.0/main/main.c:1627 #7 0x0017c548 in main (argc=2, argv=0xbaf4) at /opt/cvs/php5.0/sapi/cli/php_cli.c:943 [2004-08-06 15:24:06] r dot korving at xit dot nl Description: When I use the output of $xmlobject->xpath() in a preg_match("/whatever pattern/", $xpathoutput) it makes memory usage explode or the whole script segfaults. The problem can be manually solved by typecasting the $xpathoutput to a string, but nonetheless, a segfault should never ever be desired behaviour. In fact, in one case I actually saw PHP tried to allocate over 1 gigabyte of memory. Reproduce code: --- #!/usr/bin/php5 xpath("/rootelem/testelems"); for ($i=0; $i < 20; $i++) { if (preg_match("/abc/", $val[0])) echo "Y"; else echo "N"; } ?> test.xml: this is one this is another one ! Expected result: Actual result: -- NSegmentation fault -- Edit this bug report at http://bugs.php.net/?id=29549&edit=1
#29653 [Ctl->Csd]: make fails when compiling ./ext/sqlite/libsqlite/src/parse.y
ID: 29653 Updated by: [EMAIL PROTECTED] Reported By: peter at webvision dot co dot za -Status: Critical +Status: Closed Bug Type: Compile Failure Operating System: Mandrake Linux 10.0 PHP Version: 5.0.1 Previous Comments: [2004-08-13 19:27:58] [EMAIL PROTECTED] closed then [2004-08-13 17:20:37] peter at webvision dot co dot za I did a clean extract into a new directory and then the make succeeded, so please ignore this report and put it down to user error. [2004-08-13 16:41:46] peter at webvision dot co dot za Description: make fails when compiling ./ext/sqlite/libsqlite/src/parse.y Reproduce code: --- ./configure --with-apxs2=/usr/sbin/apxs2 --with-mysql make Actual result: -- Make fails to complete and the following message is produced php-5.0.1/ext/sqlite/libsqlite/src/parse.y:19.1-13: invalid directive: `%token_prefix' php-5.0.1/ext/sqlite/libsqlite/src/parse.y:19.15-17: syntax error, unexpected "identifier" php-5.0.1/ext/sqlite/libsqlite/src/parse.c] Error 1 -- Edit this bug report at http://bugs.php.net/?id=29653&edit=1
#29660 [Opn->Bgs]: problem reload apache
ID: 29660 Updated by: [EMAIL PROTECTED] Reported By: boern1980 at yahoo dot es -Status: Open +Status: Bogus Bug Type: *Web Server problem Operating System: suse linux 8.2 PHP Version: Irrelevant New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. . Previous Comments: [2004-08-13 19:14:53] boern1980 at yahoo dot es Description: hello i have apache 1.3.24-13 server ,when RELOAD it much relays i don't know it . thank's help me i have SUSE LINUX 8.2 Reproduce code: --- hello i have apache 1.3.24-13 server ,when RELOAD it much relays i don't know it . thank's help me i have SUSE LINUX 8.2 -- Edit this bug report at http://bugs.php.net/?id=29660&edit=1
#29659 [Opn->Bgs]: problem reload apache
ID: 29659 Updated by: [EMAIL PROTECTED] Reported By: boern1980 at yahoo dot es -Status: Open +Status: Bogus Bug Type: *Web Server problem Operating System: suse linux 8.2 PHP Version: Irrelevant New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. . Previous Comments: [2004-08-13 19:14:53] boern1980 at yahoo dot es Description: hello i have apache 1.3.24-13 server ,when RELOAD it much relays i don't know it . thank's help me i have SUSE LINUX 8.2 Reproduce code: --- hello i have apache 1.3.24-13 server ,when RELOAD it much relays i don't know it . thank's help me i have SUSE LINUX 8.2 -- Edit this bug report at http://bugs.php.net/?id=29659&edit=1
#29653 [Opn->Ctl]: make fails when compiling ./ext/sqlite/libsqlite/src/parse.y
ID: 29653 Updated by: [EMAIL PROTECTED] Reported By: peter at webvision dot co dot za -Status: Open +Status: Critical Bug Type: Compile Failure Operating System: Mandrake Linux 10.0 PHP Version: 5.0.1 New Comment: closed then Previous Comments: [2004-08-13 17:20:37] peter at webvision dot co dot za I did a clean extract into a new directory and then the make succeeded, so please ignore this report and put it down to user error. [2004-08-13 16:41:46] peter at webvision dot co dot za Description: make fails when compiling ./ext/sqlite/libsqlite/src/parse.y Reproduce code: --- ./configure --with-apxs2=/usr/sbin/apxs2 --with-mysql make Actual result: -- Make fails to complete and the following message is produced php-5.0.1/ext/sqlite/libsqlite/src/parse.y:19.1-13: invalid directive: `%token_prefix' php-5.0.1/ext/sqlite/libsqlite/src/parse.y:19.15-17: syntax error, unexpected "identifier" php-5.0.1/ext/sqlite/libsqlite/src/parse.c] Error 1 -- Edit this bug report at http://bugs.php.net/?id=29653&edit=1
#29647 [Opn->Bgs]: self:: into child class seems to refer to parent class
ID: 29647 Updated by: [EMAIL PROTECTED] Reported By: mrpyle at libero dot it -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: ANY PHP Version: 5.0.0 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php self is bound at compile time. Previous Comments: [2004-08-13 12:17:33] mrpyle at libero dot it Description: self:: into child class seems to refer to parent class, is this a bug? Reproduce code: --- Expected result: ChildClass::$a == 'some value' ; Actual result: -- Fatal error: Access to undeclared static property: ParentClass::$a in c:\phproot\static\bug.php5 on line 9 -- Edit this bug report at http://bugs.php.net/?id=29647&edit=1
#29658 [Opn->Bgs]: #!php with paramters is broken
ID: 29658 Updated by: [EMAIL PROTECTED] Reported By: xuefer at 21cn dot com -Status: Open +Status: Bogus Bug Type: CGI related Operating System: xp/linux PHP Version: 4.3.8 New Comment: #! is a unixy thing that is not supported on windows. Additionally, most OS's don't support more than a single parameter there. Not a PHP bug. Previous Comments: [2004-08-13 19:04:41] xuefer at 21cn dot com Description: touch php.ini ./test | grep php.ini -i paramter works but -c not seems those spaces is not convert to '\0' sapi/cli/php_cli.c while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0))!=-1) { switch (c) { case 'c': cli_sapi_module.php_ini_path_override = strdup(php_optarg); /*debug*/ printf("%d %d '%s'\n", (int) php_optarg[0], strlen(php_opt_arg), php_optarg); break; case 'n': cli_sapi_module.php_ini_ignore = 1; break; } } got "32 2 ' .'" seems a problem of the shell if -c is ok to be left broken. -i shouldn't be working too but allowing options in #! is very useful Reproduce code: --- #!/usr/bin/php -i -c . // empty file Expected result: Configuration File (php.ini) Path => /etc/php.ini Actual result: -- Configuration File (php.ini) Path => ./php.ini -- Edit this bug report at http://bugs.php.net/?id=29658&edit=1
#29660 [NEW]: problem reload apache
From: boern1980 at yahoo dot es Operating system: suse linux 8.2 PHP version: Irrelevant PHP Bug Type: *Web Server problem Bug description: problem reload apache Description: hello i have apache 1.3.24-13 server ,when RELOAD it much relays i don't know it . thank's help me i have SUSE LINUX 8.2 Reproduce code: --- hello i have apache 1.3.24-13 server ,when RELOAD it much relays i don't know it . thank's help me i have SUSE LINUX 8.2 -- Edit bug report at http://bugs.php.net/?id=29660&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29660&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29660&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29660&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29660&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29660&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29660&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29660&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29660&r=support Expected behavior: http://bugs.php.net/fix.php?id=29660&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29660&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29660&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29660&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29660&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29660&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29660&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29660&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29660&r=float
#29659 [NEW]: problem reload apache
From: boern1980 at yahoo dot es Operating system: suse linux 8.2 PHP version: Irrelevant PHP Bug Type: *Web Server problem Bug description: problem reload apache Description: hello i have apache 1.3.24-13 server ,when RELOAD it much relays i don't know it . thank's help me i have SUSE LINUX 8.2 Reproduce code: --- hello i have apache 1.3.24-13 server ,when RELOAD it much relays i don't know it . thank's help me i have SUSE LINUX 8.2 -- Edit bug report at http://bugs.php.net/?id=29659&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29659&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29659&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29659&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29659&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29659&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29659&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29659&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29659&r=support Expected behavior: http://bugs.php.net/fix.php?id=29659&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29659&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29659&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29659&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29659&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29659&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29659&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29659&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29659&r=float
#29658 [NEW]: #!php with paramters is broken
From: xuefer at 21cn dot com Operating system: xp/linux PHP version: 4.3.8 PHP Bug Type: CGI related Bug description: #!php with paramters is broken Description: touch php.ini ./test | grep php.ini -i paramter works but -c not seems those spaces is not convert to '\0' sapi/cli/php_cli.c while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0))!=-1) { switch (c) { case 'c': cli_sapi_module.php_ini_path_override = strdup(php_optarg); /*debug*/ printf("%d %d '%s'\n", (int) php_optarg[0], strlen(php_opt_arg), php_optarg); break; case 'n': cli_sapi_module.php_ini_ignore = 1; break; } } got "32 2 ' .'" seems a problem of the shell if -c is ok to be left broken. -i shouldn't be working too but allowing options in #! is very useful Reproduce code: --- #!/usr/bin/php -i -c . // empty file Expected result: Configuration File (php.ini) Path => /etc/php.ini Actual result: -- Configuration File (php.ini) Path => ./php.ini -- Edit bug report at http://bugs.php.net/?id=29658&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29658&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29658&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29658&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29658&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29658&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29658&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29658&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29658&r=support Expected behavior: http://bugs.php.net/fix.php?id=29658&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29658&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29658&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29658&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29658&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29658&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29658&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29658&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29658&r=float
#29656 [Asn->Csd]: $mysqli->num_rows causes segfault
ID: 29656 Updated by: [EMAIL PROTECTED] Reported By: misc at sopic dot com -Status: Assigned +Status: Closed Bug Type: Reproducible crash Operating System: Suse Linux 9.0 PHP Version: 5.0.1 Assigned To: georg New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2004-08-13 17:59:06] [EMAIL PROTECTED] happens on all non mysql objects. Looks like my fix for another bug (properties for not connected object) was kind of suboptimal. [2004-08-13 17:22:42] misc at sopic dot com Description: Execution of the code below causes Apache 2.0.49 (Prefork) to exit with a segfault. Apache error_log: [Fri Aug 13 17:03:35 2004] [notice] child pid 7022 exit signal Segmentation fault (11) [Fri Aug 13 17:10:07 2004] [notice] child pid 7023 exit signal Segmentation fault (11) [Fri Aug 13 17:10:08 2004] [notice] child pid 7024 exit signal Segmentation fault (11) [Fri Aug 13 17:10:08 2004] [notice] child pid 7026 exit signal Segmentation fault (11) [Fri Aug 13 17:10:08 2004] [notice] child pid 7168 exit signal Segmentation fault (11) './configure' '--with-apxs2=/usr/local/apache2-php5/bin/apxs' '--without-mysql' '--with-mysqli=/usr/local/mysql-4.1/bin/mysql_config' '--with-zlib' '--with-xml' '--with-gd' '--with-ttf=/usr' '--with-jpeg-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-mcrypt=/usr' '--enable-calendar' '--enable-bcmath' '--with-dom' '--with-xmlrpc' '--with-gettext' '--with-ftp' '--enable-shared' '--enable-memory-limit' '--with-freetype-dir=/usr' '--with-ldap=/usr' '--disable-short-tags' '--with-dom=/usr' '--enable-debug' MySQL is self compiled MySQL 4.1.3-beta. Reproduce code: --- "; $mysqli = new mysqli("localhost", "root", "", "test", '3307', '/tmp/mysql-4.1.sock'); if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } print_r($mysqli); if ($result = $mysqli->query("SELECT * FROM test")) { $row_cnt = $result->num_rows; printf("Result set has %d rows.\n", $row_cnt); $result->close(); } $mysqli->close(); ?> Expected result: Int with number of affected rows. Actual result: -- [New Thread 16384 (LWP 7410)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 7410)] 0x403162fc in mysqli_read_property (object=0x820895c, member=0x820d7ec, type=0) at /usr/local/src/php-5.0.1/ext/mysqli/mysqli.c:204 204 if (!obj->ptr || (gdb) bt #0 0x403162fc in mysqli_read_property (object=0x820895c, member=0x820d7ec, type=0) at /usr/local/src/php-5.0.1/ext/mysqli/mysqli.c:204 #1 0x40496db2 in zend_fetch_property_address_read (result=0x820d7c0, op1=0x820d7d4, op2=0x820d7e8, Ts=0xbfffcc90, type=0) at /usr/local/src/php-5.0.1/Zend/zend_execute.c:1158 #2 0x40499700 in zend_fetch_obj_r_handler (execute_data=0xbfffcf50, opline=0x820d7bc, op_array=0x8208804) at /usr/local/src/php-5.0.1/Zend/zend_execute.c:2129 #3 0x4049776e in execute (op_array=0x8208804) at /usr/local/src/php-5.0.1/Zend/zend_execute.c:1400 #4 0x40473fcd in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php-5.0.1/Zend/zend.c:1061 #5 0x4042c967 in php_execute_script (primary_file=0xb200) at /usr/local/src/php-5.0.1/main/main.c:1627 #6 0x404a46ee in php_handler (r=0x81f7888) at /usr/local/src/php-5.0.1/sapi/apache2handler/sapi_apache2.c:535 #7 0x0807d83b in ap_run_handler (r=0x81f7888) at config.c:152 #8 0x0807ddbe in ap_invoke_handler (r=0x81f7888) at config.c:358 #9 0x0806c98b in ap_process_request (r=0x81f7888) at http_request.c:246 #10 0x080686ac in ap_process_http_connection (c=0x81f3098) at http_core.c:250 #11 0x080874db in ap_run_process_connection (c=0x81f3098) at connection.c:42 #12 0x0807c31d in child_main (child_num_arg=2) at prefork.c:609 #13 0x0807c42d in make_child (s=0x80dbf18, slot=0) at prefork.c:649 #14 0x0807c4f4 in startup_children (number_to_start=5) at prefork.c:721 #15 0x0807cb5d in ap_mpm_run (_pconf=0x80d97e8, plog=0x81118c8, s=0x0) at prefork.c:940 #16 0x08081f7a in main (argc=2, argv=0xb584) at main.c:617 -- Edit this bug report at http://bugs.php.net/?id=29656&edit=1
#29655 [Opn->Bgs]: dom_import_simplexml() doesn't behave as expected
ID: 29655 Updated by: [EMAIL PROTECTED] Reported By: mc at genetech dot co dot za -Status: Open +Status: Bogus Bug Type: DOM XML related Operating System: Windows XP SP1 PHP Version: 5.0.1 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php it returns the current simplexml node as a domelement Previous Comments: [2004-08-13 17:06:56] mc at genetech dot co dot za Description: dom_import_simplexml() as described in the following document: http://www.zend.com/php5/articles/php5-xmlphp.php#Heading16, is meant to return a DOMDocument, but instead returns a DOMElement. Reproduce code: --- schemaValidate($schema_file); ?> Expected result: A validation message based on the XML schema file and the XML instance file. Actual result: -- Output: Fatal error: Call to undefined method DOMElement::schemaValidate() -- Edit this bug report at http://bugs.php.net/?id=29655&edit=1
#29656 [Opn->Asn]: $mysqli->num_rows causes segfault
ID: 29656 Updated by: [EMAIL PROTECTED] Reported By: misc at sopic dot com -Status: Open +Status: Assigned Bug Type: Reproducible crash Operating System: Suse Linux 9.0 PHP Version: 5.0.1 -Assigned To: +Assigned To: georg New Comment: happens on all non mysql objects. Looks like my fix for another bug (properties for not connected object) was kind of suboptimal. Previous Comments: [2004-08-13 17:22:42] misc at sopic dot com Description: Execution of the code below causes Apache 2.0.49 (Prefork) to exit with a segfault. Apache error_log: [Fri Aug 13 17:03:35 2004] [notice] child pid 7022 exit signal Segmentation fault (11) [Fri Aug 13 17:10:07 2004] [notice] child pid 7023 exit signal Segmentation fault (11) [Fri Aug 13 17:10:08 2004] [notice] child pid 7024 exit signal Segmentation fault (11) [Fri Aug 13 17:10:08 2004] [notice] child pid 7026 exit signal Segmentation fault (11) [Fri Aug 13 17:10:08 2004] [notice] child pid 7168 exit signal Segmentation fault (11) './configure' '--with-apxs2=/usr/local/apache2-php5/bin/apxs' '--without-mysql' '--with-mysqli=/usr/local/mysql-4.1/bin/mysql_config' '--with-zlib' '--with-xml' '--with-gd' '--with-ttf=/usr' '--with-jpeg-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-mcrypt=/usr' '--enable-calendar' '--enable-bcmath' '--with-dom' '--with-xmlrpc' '--with-gettext' '--with-ftp' '--enable-shared' '--enable-memory-limit' '--with-freetype-dir=/usr' '--with-ldap=/usr' '--disable-short-tags' '--with-dom=/usr' '--enable-debug' MySQL is self compiled MySQL 4.1.3-beta. Reproduce code: --- "; $mysqli = new mysqli("localhost", "root", "", "test", '3307', '/tmp/mysql-4.1.sock'); if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } print_r($mysqli); if ($result = $mysqli->query("SELECT * FROM test")) { $row_cnt = $result->num_rows; printf("Result set has %d rows.\n", $row_cnt); $result->close(); } $mysqli->close(); ?> Expected result: Int with number of affected rows. Actual result: -- [New Thread 16384 (LWP 7410)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 7410)] 0x403162fc in mysqli_read_property (object=0x820895c, member=0x820d7ec, type=0) at /usr/local/src/php-5.0.1/ext/mysqli/mysqli.c:204 204 if (!obj->ptr || (gdb) bt #0 0x403162fc in mysqli_read_property (object=0x820895c, member=0x820d7ec, type=0) at /usr/local/src/php-5.0.1/ext/mysqli/mysqli.c:204 #1 0x40496db2 in zend_fetch_property_address_read (result=0x820d7c0, op1=0x820d7d4, op2=0x820d7e8, Ts=0xbfffcc90, type=0) at /usr/local/src/php-5.0.1/Zend/zend_execute.c:1158 #2 0x40499700 in zend_fetch_obj_r_handler (execute_data=0xbfffcf50, opline=0x820d7bc, op_array=0x8208804) at /usr/local/src/php-5.0.1/Zend/zend_execute.c:2129 #3 0x4049776e in execute (op_array=0x8208804) at /usr/local/src/php-5.0.1/Zend/zend_execute.c:1400 #4 0x40473fcd in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php-5.0.1/Zend/zend.c:1061 #5 0x4042c967 in php_execute_script (primary_file=0xb200) at /usr/local/src/php-5.0.1/main/main.c:1627 #6 0x404a46ee in php_handler (r=0x81f7888) at /usr/local/src/php-5.0.1/sapi/apache2handler/sapi_apache2.c:535 #7 0x0807d83b in ap_run_handler (r=0x81f7888) at config.c:152 #8 0x0807ddbe in ap_invoke_handler (r=0x81f7888) at config.c:358 #9 0x0806c98b in ap_process_request (r=0x81f7888) at http_request.c:246 #10 0x080686ac in ap_process_http_connection (c=0x81f3098) at http_core.c:250 #11 0x080874db in ap_run_process_connection (c=0x81f3098) at connection.c:42 #12 0x0807c31d in child_main (child_num_arg=2) at prefork.c:609 #13 0x0807c42d in make_child (s=0x80dbf18, slot=0) at prefork.c:649 #14 0x0807c4f4 in startup_children (number_to_start=5) at prefork.c:721 #15 0x0807cb5d in ap_mpm_run (_pconf=0x80d97e8, plog=0x81118c8, s=0x0) at prefork.c:940 #16 0x08081f7a in main (argc=2, argv=0xb584) at main.c:617 -- Edit this bug report at http://bugs.php.net/?id=29656&edit=1
#29657 [NEW]: xml_* functions throw non descriptive error, compared to php4
From: black at scene-si dot org Operating system: debian PHP version: 5.0.0 PHP Bug Type: XML related Bug description: xml_* functions throw non descriptive error, compared to php4 Description: when validating an incorrectly formated xml file, the errors from php 5.0.0 are vaguely descriptive, outputting some constant name and not a human readable error message Reproduce code: --- #!/usr/bin/php5 http://bugs.php.net/?id=29657&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29657&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29657&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29657&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29657&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29657&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29657&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29657&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29657&r=support Expected behavior: http://bugs.php.net/fix.php?id=29657&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29657&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29657&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29657&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29657&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29657&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29657&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29657&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29657&r=float
#28944 [Opn->Fbk]: OCITypeByName: OCI-21522 with two connections
ID: 28944 Updated by: [EMAIL PROTECTED] Reported By: manuel at pincho dot org -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: Linux PHP Version: 4.3.6 New Comment: 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 Please, try with the latest version first. Previous Comments: [2004-06-28 11:25:19] manuel at pincho dot org Description: When I use ocinewcollection and I have to connections or more open in the same php with the same user,password and SID ; ocinewcollection fails with Warning: ocinewcollection(): OCITypeByName: OCI-21522: attempted to use an invalid connection in OCI (object mode only) Oracle version is 9.2.0.4 PHP 4.3.6: './configure' '--with-apache=/usr/local/src/apache_1.3.29' '--with-oci8=/u01/app/oracle/product/9.2.0' '--with-mnogosearch=/usr/local/mnogosearch' '--with-mysql' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-zlib-dir' '--enable-track-vars' '--enable-sigchild' '--enable-xml' '--enable-inline-optimization' '--enable-memory-limit' '--disable-debug' Reproduce code: --- // CREATE OR REPLACE TYPE local_id_array AS TABLE OF NUMBER(11); $db =OCIPLogon('XXX','XXX','XXX'); $db2=OCIPLogon('XXX','XXX','XXX'); $coll = ocinewcollection ($db2,'LOCAL_ID_ARRAY'); Actual result: -- Warning: ocinewcollection(): OCITypeByName: OCI-21522: attempted to use an invalid connection in OCI (object mode only) -- Edit this bug report at http://bugs.php.net/?id=28944&edit=1
#29013 [Opn->Asn]: Multiple logons cause handles to become invalid
ID: 29013 Updated by: [EMAIL PROTECTED] Reported By: cjbj at hotmail dot com -Status: Open +Status: Assigned Bug Type: OCI8 related Operating System: Windows, Linus PHP Version: 4.3.7, 5.0.0 Dev -Assigned To: +Assigned To: tony2001 Previous Comments: [2004-08-13 05:32:39] cjbj at hotmail dot com The given testcase has an extra semi-colon in the second query. The new testcase below shows that the initial connection is getting associated with the second user. Testcase: "; $rSth = OCIParse($c, $s); $rRet = OCIExecute($rSth); echo ""; while ($succ = OCIFetchInto($rSth, $row)) { foreach ($row as $item) { echo ($item?htmlentities($item):' ')." "; } echo "\n"; } echo "===>CLOSE"; ocifreestatement($rSth); } $statement1 = "select user from dual"; echo "===>OCINLogin #1: Connect as SCOTT"; $c1 = OCINlogon('scott', 'tiger', 'F10D' ); echo "===>Query first connection"; qry($c1, $statement1); echo "===>OCINLogin #2: Connect as HR"; $c2 = OCINlogon('hr', 'hr', 'F10D'); echo "===>Re-query first connection"; qry($c1, $statement1); ?> Actual Output: ===>OCINLogin #1: Connect as SCOTT ===>Query first connection ===>BEGIN SCOTT ===>CLOSE ===>OCINLogin #2: Connect as HR ===>Re-query first connection ===>BEGIN HR ===>CLOSE Expected output is similar with the usernames in this order: SCOTT, SCOTT [2004-07-05 09:38:01] cjbj at hotmail dot com Description: Multiple logons within the same request cause handles to become invalid and queries to fail. Also see: http://forums.oracle.com/forums/thread.jsp?forum=178&thread=251141 To reproduce, restart Apache and run the following file. The same incorrect output occurs with ocilogon() inplace of ocinlogon(). Reproduce code: --- ===>BEGIN"; $rSth = OCIParse($c, $s); $rRet = OCIExecute($rSth); echo ""; while ($succ = OCIFetchInto($rSth, $row)) { foreach ($row as $item) { echo ($item?htmlentities($item):' ')." "; } echo "\n"; } echo "===>CLOSE"; ocifreestatement($rSth); } $statement1 = "select dname from dept"; $statement2 = "select user from dual;"; echo "===>OCINLogin #1"; $c1 = OCINlogon('scott', 'tiger', 'MYDB' ); echo "===>Query first connection"; qry($c1, $statement1); echo "===>OCINLogin #2"; $c2 = OCINlogon('hr', 'hr', 'MYDB'); echo "===>Re-query first connection"; qry($c1, $statement1); echo "===>Re-query first connection"; qry($c1, $statement2); ?> Expected result: Three queries are successfully completed. Actual result: -- ===>OCINLogin #1 OCIDebug: _oci_open_server new conn=0 dname=MYDB OCIDebug: _oci_open_session new sess=3 user=scott OCIDebug: oci_do_connect: id=4 ===>Query first connection ===>BEGIN OCIDebug: oci_parse "select dname from dept" id=5 conn=4 ACCOUNTING RESEARCH SALES OPERATIONS ===>CLOSE OCIDebug: START _oci_stmt_list_dtor: id=5 last_query="select dname from dept" OCIDebug: START _oci_column_hash_dtor: DNAME OCIDebug: END _oci_column_hash_dtor: DNAME OCIDebug: END _oci_stmt_list_dtor: id=5 ===>OCINLogin #2 OCIDebug: _oci_open_session new sess=6 user=hr OCIDebug: oci_do_connect: id=7 ===>Re-query first connection ===>BEGIN OCIDebug: oci_parse "select dname from dept" id=8 conn=4 Warning: ociexecute(): OCIStmtExecute: ORA-00942: table or view does not exist in c:\cj\php\cj\contest.php on line 13 Warning: ocifetchinto(): OCIFetchInto: ORA-24374: define not done before fetch or execute and fetch in c:\cj\php\cj\contest.php on line 15 ===>CLOSE OCIDebug: START _oci_stmt_list_dtor: id=8 last_query="select dname from dept" OCIDebug: END _oci_stmt_list_dtor: id=8 ===>Re-query first connection ===>BEGIN OCIDebug: oci_parse "select user from dual;" id=9 conn=4 Warning: ociexecute(): OCIStmtExecute: ORA-00911: invalid character in c:\cj\php\cj\contest.php on line 13 Warning: ocifetchinto(): OCIFetchInto: ORA-24374: define not done before fetch or execute and fetch in c:\cj\php\cj\contest.php on line 15 ===>CLOSE OCIDebug: START _oci_stmt_list_dtor: id=9 last_query="select user from dual;" OCIDebug: END _oci_stmt_list_dtor: id=9 OCIDebug: START php_rshutdown_oci OCIDebug: END php_rshutdown_oci OCIDebug: START _oci_conn_list_dtor: id=4 OCIDebug: nothing to do.. OCIDebug: START _oci_close_session: logging-off sess=3 OCIDebug: END _oci_conn_list_dtor: id=4 OCIDebug: START _oci_conn_list_dtor: id=7 OCIDebug: nothing to do.. OCIDebug: START _oci_close_session: logging-off sess=6 OCIDebug: END _oci_conn_list_dtor: id=7 OCIDebug: START _oci_close_server: detachi
#29444 [Opn->Fbk]: Crash attemping to connect Oracle via oci8 when database is not mounted
ID: 29444 Updated by: [EMAIL PROTECTED] Reported By: oguilloux at sopragroup dot com -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: Windows 2000 SP4 PHP Version: 5.0.0 -Assigned To: +Assigned To: tony2001 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: [2004-08-03 15:41:41] oguilloux at sopragroup dot com With this code (below) only, my PHP5 (cli version) doesn't terminate properly. (The program did not finish, it seem to wait about something that never happens). => It's seem to be "OCIParse" which doesn't work. When I use comments on this line code, the script finish and not when I use the command. $argDatabasename = 'PNGRS24'; $todo = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=RS24.PA.SOPRA)(PORT=1542))(CONNECT_DATA=(SID=$argDatabasename)))"; $cn = OCILogon('SYSTEM','MANAGER', $todo); $stmt = OCIParse($cn,"select * from cols"); $res = OCIExecute($stmt); ocilogoff($cn); [2004-08-03 02:12:27] cjbj at hotmail dot com Can the filer give a better testcase? Does the DB have to be unmounted? Does ADOdb have to be used? [2004-07-29 17:53:44] oguilloux at sopragroup dot com There's a strange stuff : If I only use, the function oci8 "oci_logon" even if the database is not connected, it's works. But when I combine pure oci8 functions with ADO-DB (http://php.weblogs.com) for PHP (which is useful to be database independant). I use the "version V3.00 6 Jan 2003" of PHP AdoDB. May be, with the new Object feature, it could be create some problems ? The most strange thing is that "oracle" functions work good. I have tested the AdoDB 4.51 for PHP, but PHP still crash. [2004-07-29 16:01:25] [EMAIL PROTECTED] Yes, probably other suggestions will appear when I can reproduce it myself. ATM I can see only predictable warning and nothing more. [2004-07-29 15:33:25] oguilloux at sopragroup dot com Thank's ! sorry, but why it works with oci8/PHP4 and not with oci8/PHP5 ? I don't believe that the cause is my Oracle client. I often do EXP, IMP and SQLPLUS with my oracle 8 on oracle 9 database without any troubles. I restore my config to works with PHP4/oci8 and my web site works without any problem. The only change was to reconfig apache to use PHP4. The more strange feature is that PHP5/oracle extention works better than oci8. Have you another suggestion to try ? Thank's ! 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/29444 -- Edit this bug report at http://bugs.php.net/?id=29444&edit=1
#29524 [Opn->Fbk]: Trying to connect to an oracle 9i Db, script hangs, same script on PHP4 works
ID: 29524 Updated by: [EMAIL PROTECTED] Reported By: fadi at netways dot com -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: Windows 2000 PHP Version: 5.0.0 -Assigned To: +Assigned To: tony2001 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip There were some thread safety related changes. Please, try a snapshot. Previous Comments: [2004-08-12 05:02:38] vincomaldini at hotmail dot com I've had this SAME problem on two different machines with W2K spk4, Oracle 9.2.0.1 and IIS. It seems that any attempt to use OCILogon or oci_connect causes the script to hang indefinitely and not close the HTTP connection. [2004-08-04 14:21:22] fadi at netways dot com Description: Platform: = PHP 5.0 (Release) Windows 2000 server IIS 6.0 (PHP runs as ISAPI module) Oracle 9i Client Tools (Admin) ORACLE_HOME correctly set as system variable Oracle Databae 9i installed on a separate reachable server (i tested sqlplus). IUSR_ has correct permissions to C:\PHP and C:\Oracle\Ora92 directories. IMPORTANT: Simply replacing PHP 5 with PHP 4.3.4 works Reproduce code: --- "; print_r( $row ); } ocilogoff( $conn ); ?> Expected result: 2 rows of data Actual result: -- Script hangs indefinitly -- Edit this bug report at http://bugs.php.net/?id=29524&edit=1
#29624 [Opn->Fbk]: OCINlsEnvironmentVariableGet: referenced symbol not found
ID: 29624 Updated by: [EMAIL PROTECTED] Reported By: dmarek1 at att dot net -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: Solaris 2.8 PHP Version: 5.0.0 Previous Comments: [2004-08-13 02:17:45] cjbj at hotmail dot com I guess at runtime you're using the Oracle DB libraries that came with iAS. These are probably older than the DB environment you built with. Try building with the ORACLE_HOME that you are running with. See http://www.oracle.com/technology/products/ias/ohs/htdocs/php_ohs.htm [2004-08-12 03:01:09] dmarek1 at att dot net Description: I am okay to build oci8 with PHP 5 and the make is okay but when I start http server the error below occurs. I have iAS 10g for one home with a 9.2 client on another. I build oci8 to 9.2 home and all other to 10G iAS. Without oci8 all is good and the server runs and handles PHP but with oci8 I can't go on. Thanks for any help /opt/oracle/product/TCLB/iAS/Apache/Apache/bin/apachectl start: execing httpd Syntax error on line 232 of /opt/oracle/product/TCLB/iAS/Apache/Apache/conf/httpd.conf: Cannot load /opt/oracle/product/TCLB/iAS/Apache/Apache/libexec/libphp5.so into server: ld.so.1: /opt/oracle/product/TCLB/i AS/Apache/Apache/bin/httpd: fatal: relocation error: file /opt/oracle/product/TCLB/iAS/Apache/Apache/libexec/libphp5.so: s ymbol OCINlsEnvironmentVariableGet: referenced symbol not found Reproduce code: --- ./configure --with-oci8=/opt/oracle/product/TCLB/9.2.C --with-gd=/usr/local --with-jpeg-dir=/usr/local --with-png-dir=/usr /local --with-zlib-dir=/usr/local --with-xpm-dir=/usr/local --with-ttf=/usr/local --with-freetype-dir=/usr/local --enable- gd-native-ttf --with-mysql=/usr/local/mysql --with-apxs=/opt/oracle/product/TCLB/iAS/Apache/Apache/bin/apxs --prefix=/opt/ oracle/product/TCLB/iAS --with-config-file-path=/opt/oracle/product/TCLB/iAS/Apache/Apache/conf Expected result: Server starts and oci calls work! Actual result: -- Can't start server as error above shows. -- Edit this bug report at http://bugs.php.net/?id=29624&edit=1
#29652 [Opn->Fbk]: number of FD to ocius.msg is growing
ID: 29652 Updated by: [EMAIL PROTECTED] Reported By: yannick at agl dot fr -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: Linux Redhat 7.3 PHP Version: 4.3.7 New Comment: Does it grow constantly or it stops after reaching the number of apache childs? Can you please try the same with OCINLogon ? Btw, ocilogoff() does nothing for a long time (connections are closed by Oracle after a timeout). Previous Comments: [2004-08-13 15:54:06] yannick at agl dot fr Description: i see the number of file descriptor to ocius.msg is growing for each apache child. so i reproduce problem with this script. Reproduce code: --- Expected result: 1 file descriptor to ocius.msg 1 connection to database Actual result: -- the number of file descriptor to ocius.msg is growing. 1 connection to database -- Edit this bug report at http://bugs.php.net/?id=29652&edit=1
#29656 [NEW]: $mysqli->num_rows causes segfault
From: misc at sopic dot com Operating system: Suse Linux 9.0 PHP version: 5.0.1 PHP Bug Type: Reproducible crash Bug description: $mysqli->num_rows causes segfault Description: Execution of the code below causes Apache 2.0.49 (Prefork) to exit with a segfault. Apache error_log: [Fri Aug 13 17:03:35 2004] [notice] child pid 7022 exit signal Segmentation fault (11) [Fri Aug 13 17:10:07 2004] [notice] child pid 7023 exit signal Segmentation fault (11) [Fri Aug 13 17:10:08 2004] [notice] child pid 7024 exit signal Segmentation fault (11) [Fri Aug 13 17:10:08 2004] [notice] child pid 7026 exit signal Segmentation fault (11) [Fri Aug 13 17:10:08 2004] [notice] child pid 7168 exit signal Segmentation fault (11) './configure' '--with-apxs2=/usr/local/apache2-php5/bin/apxs' '--without-mysql' '--with-mysqli=/usr/local/mysql-4.1/bin/mysql_config' '--with-zlib' '--with-xml' '--with-gd' '--with-ttf=/usr' '--with-jpeg-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-mcrypt=/usr' '--enable-calendar' '--enable-bcmath' '--with-dom' '--with-xmlrpc' '--with-gettext' '--with-ftp' '--enable-shared' '--enable-memory-limit' '--with-freetype-dir=/usr' '--with-ldap=/usr' '--disable-short-tags' '--with-dom=/usr' '--enable-debug' MySQL is self compiled MySQL 4.1.3-beta. Reproduce code: --- "; $mysqli = new mysqli("localhost", "root", "", "test", '3307', '/tmp/mysql-4.1.sock'); if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } print_r($mysqli); if ($result = $mysqli->query("SELECT * FROM test")) { $row_cnt = $result->num_rows; printf("Result set has %d rows.\n", $row_cnt); $result->close(); } $mysqli->close(); ?> Expected result: Int with number of affected rows. Actual result: -- [New Thread 16384 (LWP 7410)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 7410)] 0x403162fc in mysqli_read_property (object=0x820895c, member=0x820d7ec, type=0) at /usr/local/src/php-5.0.1/ext/mysqli/mysqli.c:204 204 if (!obj->ptr || (gdb) bt #0 0x403162fc in mysqli_read_property (object=0x820895c, member=0x820d7ec, type=0) at /usr/local/src/php-5.0.1/ext/mysqli/mysqli.c:204 #1 0x40496db2 in zend_fetch_property_address_read (result=0x820d7c0, op1=0x820d7d4, op2=0x820d7e8, Ts=0xbfffcc90, type=0) at /usr/local/src/php-5.0.1/Zend/zend_execute.c:1158 #2 0x40499700 in zend_fetch_obj_r_handler (execute_data=0xbfffcf50, opline=0x820d7bc, op_array=0x8208804) at /usr/local/src/php-5.0.1/Zend/zend_execute.c:2129 #3 0x4049776e in execute (op_array=0x8208804) at /usr/local/src/php-5.0.1/Zend/zend_execute.c:1400 #4 0x40473fcd in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php-5.0.1/Zend/zend.c:1061 #5 0x4042c967 in php_execute_script (primary_file=0xb200) at /usr/local/src/php-5.0.1/main/main.c:1627 #6 0x404a46ee in php_handler (r=0x81f7888) at /usr/local/src/php-5.0.1/sapi/apache2handler/sapi_apache2.c:535 #7 0x0807d83b in ap_run_handler (r=0x81f7888) at config.c:152 #8 0x0807ddbe in ap_invoke_handler (r=0x81f7888) at config.c:358 #9 0x0806c98b in ap_process_request (r=0x81f7888) at http_request.c:246 #10 0x080686ac in ap_process_http_connection (c=0x81f3098) at http_core.c:250 #11 0x080874db in ap_run_process_connection (c=0x81f3098) at connection.c:42 #12 0x0807c31d in child_main (child_num_arg=2) at prefork.c:609 #13 0x0807c42d in make_child (s=0x80dbf18, slot=0) at prefork.c:649 #14 0x0807c4f4 in startup_children (number_to_start=5) at prefork.c:721 #15 0x0807cb5d in ap_mpm_run (_pconf=0x80d97e8, plog=0x81118c8, s=0x0) at prefork.c:940 #16 0x08081f7a in main (argc=2, argv=0xb584) at main.c:617 -- Edit bug report at http://bugs.php.net/?id=29656&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29656&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29656&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29656&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29656&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29656&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29656&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29656&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29656&r=support Expected behavior: http://bugs.php.net/fix.php?id=29656&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29656&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29656&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29656&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29656&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29656&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29656&r=isapi In
#29653 [Opn]: make fails when compiling ./ext/sqlite/libsqlite/src/parse.y
ID: 29653 User updated by: peter at webvision dot co dot za Reported By: peter at webvision dot co dot za Status: Open Bug Type: Compile Failure Operating System: Mandrake Linux 10.0 PHP Version: 5.0.1 New Comment: I did a clean extract into a new directory and then the make succeeded, so please ignore this report and put it down to user error. Previous Comments: [2004-08-13 16:41:46] peter at webvision dot co dot za Description: make fails when compiling ./ext/sqlite/libsqlite/src/parse.y Reproduce code: --- ./configure --with-apxs2=/usr/sbin/apxs2 --with-mysql make Actual result: -- Make fails to complete and the following message is produced php-5.0.1/ext/sqlite/libsqlite/src/parse.y:19.1-13: invalid directive: `%token_prefix' php-5.0.1/ext/sqlite/libsqlite/src/parse.y:19.15-17: syntax error, unexpected "identifier" php-5.0.1/ext/sqlite/libsqlite/src/parse.c] Error 1 -- Edit this bug report at http://bugs.php.net/?id=29653&edit=1
#29655 [NEW]: dom_import_simplexml() doesn't behave as expected
From: mc at genetech dot co dot za Operating system: Windows XP SP1 PHP version: 5.0.1 PHP Bug Type: DOM XML related Bug description: dom_import_simplexml() doesn't behave as expected Description: dom_import_simplexml() as described in the following document: http://www.zend.com/php5/articles/php5-xmlphp.php#Heading16, is meant to return a DOMDocument, but instead returns a DOMElement. Reproduce code: --- schemaValidate($schema_file); ?> Expected result: A validation message based on the XML schema file and the XML instance file. Actual result: -- Output: Fatal error: Call to undefined method DOMElement::schemaValidate() -- Edit bug report at http://bugs.php.net/?id=29655&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29655&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29655&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29655&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29655&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29655&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29655&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29655&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29655&r=support Expected behavior: http://bugs.php.net/fix.php?id=29655&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29655&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29655&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29655&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29655&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29655&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29655&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29655&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29655&r=float
#29654 [NEW]: Different timezone's time is stored in Apache process for other requests
From: kulakov74 at yandex dot ru Operating system: Linux PHP version: 4.3.7 PHP Bug Type: Date/time related Bug description: Different timezone's time is stored in Apache process for other requests Description: I tried putenv('TZ=...') to get local time for any timezone. After that, if I don't call putenv('TZ=...') using date/time functions (date()) in consequent requests randomly return either local time or the time for the zone last set with TZ. In Apache access_log's time offsets also vary. It seems that Apache proccesses remember the time for the timezone set with TZ and use it for consequent requests. Unfortunately, there's no function for deleting an environment variable. Even though with consequent requests TZ seems to be undefined, date functions work as if it were set for the last value. For a reason, calling mktime(0,0,0,1,1,1970) clears Apache's processes internal time, but that happens only on subsequent requests, not within the same one. Of course, one can use putenv('TZ=...') for setting local timezone back after working with a different timezone, but anyway I guess that shouldn't be the way it is. We use Apache 2. Reproduce code: --- //first request: echo(date('H:i:s').''); //localtime putenv('TZ=Europe/Moscow'); echo(date('H:i:s').''); //Moscow time - works okay //at consequent requests: echo(date('H:i:s').''); //may produce local or Moscow time, depending on which Apache process handles the request Expected result: see above Actual result: -- see above -- Edit bug report at http://bugs.php.net/?id=29654&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29654&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29654&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29654&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29654&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29654&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29654&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29654&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29654&r=support Expected behavior: http://bugs.php.net/fix.php?id=29654&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29654&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29654&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29654&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29654&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29654&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29654&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29654&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29654&r=float
#29653 [NEW]: make fails when compiling ./ext/sqlite/libsqlite/src/parse.y
From: peter at webvision dot co dot za Operating system: Mandrake Linux 10.0 PHP version: 5.0.1 PHP Bug Type: Compile Failure Bug description: make fails when compiling ./ext/sqlite/libsqlite/src/parse.y Description: make fails when compiling ./ext/sqlite/libsqlite/src/parse.y Reproduce code: --- ./configure --with-apxs2=/usr/sbin/apxs2 --with-mysql make Actual result: -- Make fails to complete and the following message is produced php-5.0.1/ext/sqlite/libsqlite/src/parse.y:19.1-13: invalid directive: `%token_prefix' php-5.0.1/ext/sqlite/libsqlite/src/parse.y:19.15-17: syntax error, unexpected "identifier" php-5.0.1/ext/sqlite/libsqlite/src/parse.c] Error 1 -- Edit bug report at http://bugs.php.net/?id=29653&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29653&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29653&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29653&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29653&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29653&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29653&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29653&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29653&r=support Expected behavior: http://bugs.php.net/fix.php?id=29653&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29653&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29653&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29653&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29653&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29653&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29653&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29653&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29653&r=float
#29652 [NEW]: number of FD to ocius.msg is growing
From: yannick at agl dot fr Operating system: Linux Redhat 7.3 PHP version: 4.3.7 PHP Bug Type: OCI8 related Bug description: number of FD to ocius.msg is growing Description: i see the number of file descriptor to ocius.msg is growing for each apache child. so i reproduce problem with this script. Reproduce code: --- Expected result: 1 file descriptor to ocius.msg 1 connection to database Actual result: -- the number of file descriptor to ocius.msg is growing. 1 connection to database -- Edit bug report at http://bugs.php.net/?id=29652&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29652&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29652&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29652&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29652&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29652&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29652&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29652&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29652&r=support Expected behavior: http://bugs.php.net/fix.php?id=29652&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29652&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29652&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29652&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29652&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29652&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29652&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29652&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29652&r=float
#27798 [Opn]: Bug #26010 is back again
ID: 27798 User updated by: ricardo at ish dot com dot br Reported By: ricardo at ish dot com dot br Status: Open Bug Type: Zend Engine 2 problem Operating System: Windows XP -PHP Version: 5.0.1-dev +PHP Version: 5.0.1 New Comment: I'll try to show a new example, to make my point: Source: === var1 = 'A'; $this->var2 = 'B'; } public function dumpVars() { print_r(get_object_vars($this)); } } ?> \n"; $myFoo->dumpVars(); ?> == Behavior: = My VARS: Array ( [var1] => A ) == Array ( [var1] => A ) Expected Behavior (IMHO): = My VARS: Array ( [var1] => A [var2] => B ) == Array ( [var1] => A ) Explanation: Note the difference between calling get_object_vars($this) inside a public method, inside the class (where all variables should be seen), and calling in the outside - get_object_vars($myFoo). Previous Comments: [2004-07-20 13:54:12] ricardo at ish dot com dot br I've tried and isn't working yet (and I also get this error message - phpinfo() is ok and show PHP 5.0.1-dev): PHP has encountered an Access Violation at 00B4737A My VARS: Array ( [var1] => A ) HTTP/1.1 500 Server Error Server: Microsoft-IIS/5.1 Date: Tue, 20 Jul 2004 11:51:51 GMT Content-Type: text/html Content-Length: 44 -2147417842 (0x8001010e) [2004-07-19 16:53:53] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2004-04-17 21:30:58] ricardo at ish dot com dot br Here is the sample code: var1 = 'A'; $this->var2 = 'B'; } public function dumpVars() { print_r(get_object_vars($this)); } } ?> \n"; $myFoo->dumpVars(); ?> Here is the behavior: = My VARS: Array ( [var1] => A ) Here is the expected Behavior: == My VARS: Array ( [var1] => A [var2] => B ) My opinion about it: Since the function get_object_vars is being called inside the class, it should have access to all PPP types, shouldn't it? (this example above is a dummy one, but it illustrates the problem quite well). Sorry about the delay of my reply. [2004-04-07 08:57:10] ricardo at ish dot com dot br Well, as pointed by your observation, it should work if i call get_object_vars in a method inside the own class, right? well, it will also fail. :) [2004-04-07 04:39:06] [EMAIL PROTECTED] That's expected behaviour..(what would the use of protected/private be if you can get access to them anywhere?) (if you disagree, give an example..and not a reference to unrelated bug report) 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/27798 -- Edit this bug report at http://bugs.php.net/?id=27798&edit=1
#29602 [Opn->Bgs]: change of "memory_limit" in php.ini doesn't have effects
ID: 29602 Updated by: [EMAIL PROTECTED] Reported By: php at grossherzog dot de -Status: Open +Status: Bogus Bug Type: *Configuration Issues Operating System: Win XP Pro Sp2 PHP Version: 4.3.8 New Comment: memory_limit is not supported on windows (e.g. there is no memory limit there) Previous Comments: [2004-08-10 17:17:44] php at grossherzog dot de Description: Hi, I just have a strange problem. Changing "memory_limit" in php.ini doesn't have any effects. I never get the "memory_limit" while doing phpinfo(); Thats what I tried in php.ini: max_execution_time = 30; max_input_time = 60; memory_limit = 30M; Other parameters work! My Server Config: Win XP Professional SP2 Apache/2.0.50 PHP/4.3.8 I was trying to install typo3 that need at least 16 MB memory I don't have a clue. Any ideas? Thanks in advance -- Edit this bug report at http://bugs.php.net/?id=29602&edit=1
#14920 [Com]: Internal pointer stack for arrays, to solve pointer problems
ID: 14920 Comment by: LEKESY at HOTMAIL dot COM Reported By: paule at cs dot tamu dot edu Status: Open Bug Type: Feature/Change Request Operating System: All PHP Version: 4.1.1 New Comment: i COMMENT Previous Comments: [2002-01-07 17:16:50] paule at cs dot tamu dot edu whoops, sorry about the double message there [2002-01-07 17:15:01] paule at cs dot tamu dot edu There are many occasions where an array's internal pointer gets modifed by a function that requires a traversal for one reason or another (e.g., foreach, array_walk, etc.). This often messes with the continuity and readability of the code. For example, some sort of a workaround is required if one wants to nest a foreach statement within another operating on the same array. Often these workarounds involve various traversals and can cause serious performance issues with larger array. A simple solution for this is to provide for an internal pointer stack. I propose two functions: void pos_push(array array); mixed pos_pop(array array); The function pos_push merely pushes the internal pointer position onto the pointer stack. The complementary function pos_pop pops the internal pointer off of the stack and returns the resulting current value of the new position in the array. This is easy to efficiently implement through a linked list stack specific to each array. The memory usage is minimal, and overhead is slight. The stack could store the actual position pointers. Of course, that means care would have to be taken if an element that was stored on the stack was deleted. [2002-01-07 17:13:16] paule at cs dot tamu dot edu There are many occasions where an array's internal pointer gets modifed by a function that requires a traversal for one reason or another (e.g., foreach, array_walk, etc.). This often messes with the continuity and readability of the code. For example, some sort of a workaround is required if one wants to nest a foreach statement within another operating on the same array. Often these workarounds involve various traversals or copy operations and can cause serious performance issues with larger array. A simple solution for this is to provide for an internal pointer stack. I propose two functions: void pos_push(array array); mixed pos_pop(array array); The function pos_push merely pushes the internal pointer position onto the pointer stack. The complementary function pos_pop pops the internal pointer off of the stack and returns the resulting current value of the new position in the array. This is easy to efficiently implement through a linked list stack specific to each array. The memory usage is minimal, and overhead is slight. The stack could store the actual position pointers. Of course, that means care would have to be taken if an element that was been stored on the stack was deleted. -- Edit this bug report at http://bugs.php.net/?id=14920&edit=1
#29599 [Opn->Csd]: domxml_error segfaults another apache module
ID: 29599 Updated by: [EMAIL PROTECTED] Reported By: thomas dot jarosch at intra2net dot com -Status: Open +Status: Closed Bug Type: DOM XML related Operating System: Linux PHP Version: 4.3.8 New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. xmlThrDefSetGenericErrorFunction no longer needed due to placement of the set error functions Previous Comments: [2004-08-13 13:38:32] thomas dot jarosch at intra2net dot com Ok. Thanks for the patch again! Thomas [2004-08-13 13:28:21] [EMAIL PROTECTED] according to rob, it's not needed anymore (he did the patch anyway..) [2004-08-13 13:23:57] thomas dot jarosch at intra2net dot com "Another job well done" :-) Works fine here! Though I'm curios where the xmlThrDefSetGenericErrorFunction is gone to. Won't this hurt threaded apaches or does the PHP_RINIT_FUNCTION take care of this? [2004-08-13 12:24:04] [EMAIL PROTECTED] A fix is made, not committed yet. If you have the possibility, could you check http://trash.chregu.tv/php_domxml.diff.txt and see if it solves the problem? [2004-08-11 10:28:10] thomas dot jarosch at intra2net dot com Well, if it's not too much work, a backport would be nice. IMP v3 (webmail) doesn't support PHP5 yet, but I currently don't need domxml support and therefore disabled it. Thomas 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/29599 -- Edit this bug report at http://bugs.php.net/?id=29599&edit=1
#29642 [Bgs]: Incorrect string handling of "<
ID: 29642 User updated by: webdevguy1 at yahoo dot com Reported By: webdevguy1 at yahoo dot com Status: Bogus Bug Type: Strings related Operating System: Win2k PHP Version: 4.3.9RC1 New Comment: I submitted the bug report after testing only in Firefox 0.9.2. Viewing the source didn't matter, but then I tested in IE 6, and it was fine. It appears to be a Firefox problem. The only PHP mistake appears to be that I needed four backslashes instead of two in tests 1a-1c. Thanks. Previous Comments: [2004-08-13 09:12:16] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. This works fine, do a \"view-source\" in your browser. [2004-08-13 05:13:19] webdevguy1 at yahoo dot com Description: Improper string handling of "<" and "&" characters. Refer to test code below. Reproduce code: --- $test1a='/(?'; echo $test2b; $test2c='<'; var_dump($test2c); $test2f='<'; echo $test2f; var_dump($test2f); $test3f='&'; echo $test3f; var_dump($test3f); Expected result: test1a: /(?http://bugs.php.net/?id=29642&edit=1
#29599 [Opn]: domxml_error segfaults another apache module
ID: 29599 User updated by: thomas dot jarosch at intra2net dot com Reported By: thomas dot jarosch at intra2net dot com Status: Open Bug Type: DOM XML related Operating System: Linux PHP Version: 4.3.8 New Comment: Ok. Thanks for the patch again! Thomas Previous Comments: [2004-08-13 13:28:21] [EMAIL PROTECTED] according to rob, it's not needed anymore (he did the patch anyway..) [2004-08-13 13:23:57] thomas dot jarosch at intra2net dot com "Another job well done" :-) Works fine here! Though I'm curios where the xmlThrDefSetGenericErrorFunction is gone to. Won't this hurt threaded apaches or does the PHP_RINIT_FUNCTION take care of this? [2004-08-13 12:24:04] [EMAIL PROTECTED] A fix is made, not committed yet. If you have the possibility, could you check http://trash.chregu.tv/php_domxml.diff.txt and see if it solves the problem? [2004-08-11 10:28:10] thomas dot jarosch at intra2net dot com Well, if it's not too much work, a backport would be nice. IMP v3 (webmail) doesn't support PHP5 yet, but I currently don't need domxml support and therefore disabled it. Thomas [2004-08-10 16:15:50] [EMAIL PROTECTED] The problem is fixed in PHP 5 Don't know, if "we" (meaning Rob) backport that to PHP 4... Depends on how much work it is, I assume. 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/29599 -- Edit this bug report at http://bugs.php.net/?id=29599&edit=1
#29599 [Opn]: domxml_error segfaults another apache module
ID: 29599 Updated by: [EMAIL PROTECTED] Reported By: thomas dot jarosch at intra2net dot com Status: Open Bug Type: DOM XML related Operating System: Linux PHP Version: 4.3.8 New Comment: according to rob, it's not needed anymore (he did the patch anyway..) Previous Comments: [2004-08-13 13:23:57] thomas dot jarosch at intra2net dot com "Another job well done" :-) Works fine here! Though I'm curios where the xmlThrDefSetGenericErrorFunction is gone to. Won't this hurt threaded apaches or does the PHP_RINIT_FUNCTION take care of this? [2004-08-13 12:24:04] [EMAIL PROTECTED] A fix is made, not committed yet. If you have the possibility, could you check http://trash.chregu.tv/php_domxml.diff.txt and see if it solves the problem? [2004-08-11 10:28:10] thomas dot jarosch at intra2net dot com Well, if it's not too much work, a backport would be nice. IMP v3 (webmail) doesn't support PHP5 yet, but I currently don't need domxml support and therefore disabled it. Thomas [2004-08-10 16:15:50] [EMAIL PROTECTED] The problem is fixed in PHP 5 Don't know, if "we" (meaning Rob) backport that to PHP 4... Depends on how much work it is, I assume. [2004-08-10 15:03:04] thomas dot jarosch at intra2net dot com Description: Hi, we're running PHP 4.3.8 as apache module, Apache runs without threads. The domxml extension registers an libxml2 generic error handler during its initialization. We have another apache module, which makes use of libxml2, this one doesn't register an error handler. When then second apache module encounters an XML error, apache segfaults in the domxml_error function. Here's a backtrace of the problem: #0 0x404d3448 in php_apache_sapi_send_headers () from ./etc/httpd/modules/libphp4.so #1 0x4049c84e in sapi_send_headers () from ./etc/httpd/modules/libphp4.so #2 0x4045c456 in php_header () from ./etc/httpd/modules/libphp4.so #3 0x404a7518 in php_ub_body_write () from ./etc/httpd/modules/libphp4.so #4 0x404a63b3 in php_body_write () from ./etc/httpd/modules/libphp4.so #5 0x404952eb in php_printf () from ./etc/httpd/modules/libphp4.so #6 0x40495a4d in php_error_cb () from ./etc/httpd/modules/libphp4.so #7 0x404c165f in zend_error () from ./etc/httpd/modules/libphp4.so #8 0x40495698 in php_verror () from ./etc/httpd/modules/libphp4.so #9 0x4049576f in php_error_docref0 () from ./etc/httpd/modules/libphp4.so #10 0x403c6951 in domxml_error () from ./etc/httpd/modules/libphp4.so #11 0x4083cb86 in xmlReportError (err=0x81dc978, ctxt=0x81dc7f8, str=0x81e03b0 "Document is empty\n", channel=0x403c6910 , data=0x0) at error.c:283 #12 0x4083ce9a in __xmlRaiseError (schannel=0, channel=0x4083d19c , data=0x81dc7f8, ctx=0x81dc7f8, nod=0x0, domain=1, code=4, level=XML_ERR_FATAL, file=0x81df640 "", line=1, str1=0x0, str2=0x0, str3=0x0, int1=0, int2=0, msg=0x408d5111 "Document is empty\n") at error.c:573 #13 0x4083fef4 in xmlFatalErr (ctxt=0x81dc7f8, error=1080649792, info=0x51 ) at parser.c:360 #14 0x4084fa17 in xmlParseTryOrFinish (ctxt=0x81dc7f8, terminate=0) at parser.c:9098 #15 0x40850358 in xmlParseChunk__internal_alias (ctxt=0x81dc7f8, chunk=0x81dc9e4 "í«îÛ\003", size=228, terminate=0) at parser.c:9763 #16 0x40cd108c in xmlpp::DomParser::parse_stream(std::istream&) (this=0xbfffeab0, [EMAIL PROTECTED]) at basic_string.h:781 The problem is domxml's "global" error handler. Even if the second module would register an error handler, it would override PHP's error handler. IMHO the best approach would be to register the error handler only during operations calling libxml functions and deregister it afterwards. The performance overhead should be minimal and it's very clean. What do you think? Cheers, Thomas Actual result: -- See backtrace in description -- Edit this bug report at http://bugs.php.net/?id=29599&edit=1
#29599 [Fbk->Opn]: domxml_error segfaults another apache module
ID: 29599 User updated by: thomas dot jarosch at intra2net dot com Reported By: thomas dot jarosch at intra2net dot com -Status: Feedback +Status: Open Bug Type: DOM XML related Operating System: Linux PHP Version: 4.3.8 New Comment: "Another job well done" :-) Works fine here! Though I'm curios where the xmlThrDefSetGenericErrorFunction is gone to. Won't this hurt threaded apaches or does the PHP_RINIT_FUNCTION take care of this? Previous Comments: [2004-08-13 12:24:04] [EMAIL PROTECTED] A fix is made, not committed yet. If you have the possibility, could you check http://trash.chregu.tv/php_domxml.diff.txt and see if it solves the problem? [2004-08-11 10:28:10] thomas dot jarosch at intra2net dot com Well, if it's not too much work, a backport would be nice. IMP v3 (webmail) doesn't support PHP5 yet, but I currently don't need domxml support and therefore disabled it. Thomas [2004-08-10 16:15:50] [EMAIL PROTECTED] The problem is fixed in PHP 5 Don't know, if "we" (meaning Rob) backport that to PHP 4... Depends on how much work it is, I assume. [2004-08-10 15:03:04] thomas dot jarosch at intra2net dot com Description: Hi, we're running PHP 4.3.8 as apache module, Apache runs without threads. The domxml extension registers an libxml2 generic error handler during its initialization. We have another apache module, which makes use of libxml2, this one doesn't register an error handler. When then second apache module encounters an XML error, apache segfaults in the domxml_error function. Here's a backtrace of the problem: #0 0x404d3448 in php_apache_sapi_send_headers () from ./etc/httpd/modules/libphp4.so #1 0x4049c84e in sapi_send_headers () from ./etc/httpd/modules/libphp4.so #2 0x4045c456 in php_header () from ./etc/httpd/modules/libphp4.so #3 0x404a7518 in php_ub_body_write () from ./etc/httpd/modules/libphp4.so #4 0x404a63b3 in php_body_write () from ./etc/httpd/modules/libphp4.so #5 0x404952eb in php_printf () from ./etc/httpd/modules/libphp4.so #6 0x40495a4d in php_error_cb () from ./etc/httpd/modules/libphp4.so #7 0x404c165f in zend_error () from ./etc/httpd/modules/libphp4.so #8 0x40495698 in php_verror () from ./etc/httpd/modules/libphp4.so #9 0x4049576f in php_error_docref0 () from ./etc/httpd/modules/libphp4.so #10 0x403c6951 in domxml_error () from ./etc/httpd/modules/libphp4.so #11 0x4083cb86 in xmlReportError (err=0x81dc978, ctxt=0x81dc7f8, str=0x81e03b0 "Document is empty\n", channel=0x403c6910 , data=0x0) at error.c:283 #12 0x4083ce9a in __xmlRaiseError (schannel=0, channel=0x4083d19c , data=0x81dc7f8, ctx=0x81dc7f8, nod=0x0, domain=1, code=4, level=XML_ERR_FATAL, file=0x81df640 "", line=1, str1=0x0, str2=0x0, str3=0x0, int1=0, int2=0, msg=0x408d5111 "Document is empty\n") at error.c:573 #13 0x4083fef4 in xmlFatalErr (ctxt=0x81dc7f8, error=1080649792, info=0x51 ) at parser.c:360 #14 0x4084fa17 in xmlParseTryOrFinish (ctxt=0x81dc7f8, terminate=0) at parser.c:9098 #15 0x40850358 in xmlParseChunk__internal_alias (ctxt=0x81dc7f8, chunk=0x81dc9e4 "í«îÛ\003", size=228, terminate=0) at parser.c:9763 #16 0x40cd108c in xmlpp::DomParser::parse_stream(std::istream&) (this=0xbfffeab0, [EMAIL PROTECTED]) at basic_string.h:781 The problem is domxml's "global" error handler. Even if the second module would register an error handler, it would override PHP's error handler. IMHO the best approach would be to register the error handler only during operations calling libxml functions and deregister it afterwards. The performance overhead should be minimal and it's very clean. What do you think? Cheers, Thomas Actual result: -- See backtrace in description -- Edit this bug report at http://bugs.php.net/?id=29599&edit=1
#29651 [NEW]: ldap_bind doesn´t work but ldap_connect works!
From: Alex_Diedler at gmx dot de Operating system: Linux Suse 9.0 PHP version: 4.3.8 PHP Bug Type: LDAP related Bug description: ldap_bind doesn´t work but ldap_connect works! Description: A Login make a request to LDAP-Server for User-Authentication. The code is very simple, but it doesn´t work on Linux. ldap_connect works fine on both (Windows and Linux) ldap_bind anonymous works NOT on Linux! But on Windows works! What´s the problem? Reproduce code: --- It works!"; }else { echo "Failed"; } $ldapbind = ldap_bind($ldapconn); if ($ldapbind) { echo "anon. Bind works!"; }else { echo "bind failed"; } ?> Expected result: The same result like on windows. It should work fine! Actual result: -- I removed all packages from Linux with PHP and Apache and LDAP. I installed Apache 1.3.28 with devel. OpenLDAP Client V2 and ldap_devel. PHP 4.3.8 from Homepage php.net. Install with ./configure --with-mysql --with=apxs --with-ldap Important: remember that the connect to LDAP Server works! So it is not a maschine problem! -- Edit bug report at http://bugs.php.net/?id=29651&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29651&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29651&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29651&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29651&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29651&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29651&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29651&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29651&r=support Expected behavior: http://bugs.php.net/fix.php?id=29651&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29651&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29651&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29651&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29651&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29651&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29651&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29651&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29651&r=float
#29650 [NEW]: W32 php 5.0.0 and 5.0.1 crash with -a parameter
From: andreyra at chtivo dot ru Operating system: Windows 2000 Server PHP version: 5.0.1 PHP Bug Type: Reproducible crash Bug description: W32 php 5.0.0 and 5.0.1 crash with -a parameter Description: Run php.exe from command line. Specify '-a' paramater (for interactive output). I have got this error on any script with 'if' statement: --- php.exe - Application Error --- The instruction at "0x10015454" referenced memory at "0x0002". The memory could not be "read". Click on OK to terminate the program Click on CANCEL to debug the program --- OK Cancel --- Reproduce code: --- -- Edit bug report at http://bugs.php.net/?id=29650&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29650&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29650&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29650&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29650&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29650&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29650&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29650&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29650&r=support Expected behavior: http://bugs.php.net/fix.php?id=29650&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29650&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29650&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29650&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29650&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29650&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29650&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29650&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29650&r=float
#29649 [NEW]: extensions installation
From: mohamadsb at yahoo dot com Operating system: FreeBSD PHP version: 4.3.8 PHP Bug Type: Feature/Change Request Bug description: extensions installation Description: when we wanted to install 4.3.7 , we were questioned about extension installation but in 4.3.8 we were not ... please change this feature to 4.3.7 style -- Edit bug report at http://bugs.php.net/?id=29649&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29649&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29649&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29649&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29649&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29649&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29649&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29649&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29649&r=support Expected behavior: http://bugs.php.net/fix.php?id=29649&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29649&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29649&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29649&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29649&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29649&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29649&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29649&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29649&r=float
#29648 [Opn]: cant throw exceptions with __autoload (to catch and handle them - workaround?)
ID: 29648 User updated by: black at scene-si dot org Reported By: black at scene-si dot org Status: Open Bug Type: Scripting Engine problem Operating System: debian PHP Version: 5.0.0 New Comment: And the result: Fatal error: __autoload(object_wtf) threw an exception of type 'Exception' in /root/monotek/mono/commands/test.php on line 16 (gah) Previous Comments: [2004-08-13 12:47:52] black at scene-si dot org ugh, forgot to add if (!class_exists($classname)) { throw new Exception(); } after the first include_once in the example. Ofcourse i'm throwing the exception im trying to catch ;) [2004-08-13 12:30:17] black at scene-si dot org Description: I've tried to create an __autoload() function which would throw an exception if it can't load the class name from a file depending on the classname i request with the php code. I couldnt catch the exception with a try/catch clause, because it always failed (see expected/actual result below). My workaround was to add this after the first include_once statement inside the __autoload: if (!class_exists($classname)) { eval("class ".$classname." { }"); } Afterwards instead of a try/catch clause i used a method_exist call to see if a general function was defined (one that i require to have). Reproduce code: --- http://bugs.php.net/?id=29648&edit=1
#29648 [Opn]: cant throw exceptions with __autoload (to catch and handle them - workaround?)
ID: 29648 User updated by: black at scene-si dot org Reported By: black at scene-si dot org Status: Open Bug Type: Scripting Engine problem Operating System: debian PHP Version: 5.0.0 New Comment: ugh, forgot to add if (!class_exists($classname)) { throw new Exception(); } after the first include_once in the example. Ofcourse i'm throwing the exception im trying to catch ;) Previous Comments: [2004-08-13 12:30:17] black at scene-si dot org Description: I've tried to create an __autoload() function which would throw an exception if it can't load the class name from a file depending on the classname i request with the php code. I couldnt catch the exception with a try/catch clause, because it always failed (see expected/actual result below). My workaround was to add this after the first include_once statement inside the __autoload: if (!class_exists($classname)) { eval("class ".$classname." { }"); } Afterwards instead of a try/catch clause i used a method_exist call to see if a general function was defined (one that i require to have). Reproduce code: --- http://bugs.php.net/?id=29648&edit=1
#29549 [Opn]: xpath() output makes PHP segfault or run out of memory when used in preg_match
ID: 29549 Updated by: [EMAIL PROTECTED] Reported By: r dot korving at xit dot nl Status: Open Bug Type: SimpleXML related Operating System: debian linux 2.4.26 kernel PHP Version: 5.0.0 New Comment: I don't know, if it's an Engine or a SimpleXML problem, but here's the backtrace to it #0 _efree (ptr=0x) at /opt/cvs/php5.0/Zend/zend_alloc.c:263 #1 0x001452f4 in _zval_ptr_dtor (zval_ptr=0xffef) at /opt/cvs/php5.0/Zend/zend_execute_API.c:391 #2 0x001452f4 in _zval_ptr_dtor (zval_ptr=0x1982538) at /opt/cvs/php5.0/Zend/zend_execute_API.c:391 #3 0x001728a0 in zend_do_fcall_common_helper (execute_data=0xbfffeb70, opline=0x2009f7c, op_array=0x19868e0) at /opt/cvs/php5.0/Zend/zend_execute.h:124 #4 0x0016effc in execute (op_array=0x19868e0) at /opt/cvs/php5.0/Zend/zend_execute.c:1400 #5 0x0015103c in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /opt/cvs/php5.0/Zend/zend.c:1061 #6 0x00119914 in php_execute_script (primary_file=0xb5b0) at /opt/cvs/php5.0/main/main.c:1627 #7 0x0017c548 in main (argc=2, argv=0xbaf4) at /opt/cvs/php5.0/sapi/cli/php_cli.c:943 Previous Comments: [2004-08-06 15:24:06] r dot korving at xit dot nl Description: When I use the output of $xmlobject->xpath() in a preg_match("/whatever pattern/", $xpathoutput) it makes memory usage explode or the whole script segfaults. The problem can be manually solved by typecasting the $xpathoutput to a string, but nonetheless, a segfault should never ever be desired behaviour. In fact, in one case I actually saw PHP tried to allocate over 1 gigabyte of memory. Reproduce code: --- #!/usr/bin/php5 xpath("/rootelem/testelems"); for ($i=0; $i < 20; $i++) { if (preg_match("/abc/", $val[0])) echo "Y"; else echo "N"; } ?> test.xml: this is one this is another one ! Expected result: Actual result: -- NSegmentation fault -- Edit this bug report at http://bugs.php.net/?id=29549&edit=1
#29648 [NEW]: cant throw exceptions with __autoload (to catch and handle them - workaround?)
From: black at scene-si dot org Operating system: debian PHP version: 5.0.0 PHP Bug Type: Scripting Engine problem Bug description: cant throw exceptions with __autoload (to catch and handle them - workaround?) Description: I've tried to create an __autoload() function which would throw an exception if it can't load the class name from a file depending on the classname i request with the php code. I couldnt catch the exception with a try/catch clause, because it always failed (see expected/actual result below). My workaround was to add this after the first include_once statement inside the __autoload: if (!class_exists($classname)) { eval("class ".$classname." { }"); } Afterwards instead of a try/catch clause i used a method_exist call to see if a general function was defined (one that i require to have). Reproduce code: --- http://bugs.php.net/?id=29648&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29648&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29648&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29648&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29648&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29648&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29648&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29648&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29648&r=support Expected behavior: http://bugs.php.net/fix.php?id=29648&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29648&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29648&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29648&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29648&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29648&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29648&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29648&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29648&r=float
#29599 [Opn->Fbk]: domxml_error segfaults another apache module
ID: 29599 Updated by: [EMAIL PROTECTED] Reported By: thomas dot jarosch at intra2net dot com -Status: Open +Status: Feedback Bug Type: DOM XML related Operating System: Linux PHP Version: 4.3.8 New Comment: A fix is made, not committed yet. If you have the possibility, could you check http://trash.chregu.tv/php_domxml.diff.txt and see if it solves the problem? Previous Comments: [2004-08-11 10:28:10] thomas dot jarosch at intra2net dot com Well, if it's not too much work, a backport would be nice. IMP v3 (webmail) doesn't support PHP5 yet, but I currently don't need domxml support and therefore disabled it. Thomas [2004-08-10 16:15:50] [EMAIL PROTECTED] The problem is fixed in PHP 5 Don't know, if "we" (meaning Rob) backport that to PHP 4... Depends on how much work it is, I assume. [2004-08-10 15:03:04] thomas dot jarosch at intra2net dot com Description: Hi, we're running PHP 4.3.8 as apache module, Apache runs without threads. The domxml extension registers an libxml2 generic error handler during its initialization. We have another apache module, which makes use of libxml2, this one doesn't register an error handler. When then second apache module encounters an XML error, apache segfaults in the domxml_error function. Here's a backtrace of the problem: #0 0x404d3448 in php_apache_sapi_send_headers () from ./etc/httpd/modules/libphp4.so #1 0x4049c84e in sapi_send_headers () from ./etc/httpd/modules/libphp4.so #2 0x4045c456 in php_header () from ./etc/httpd/modules/libphp4.so #3 0x404a7518 in php_ub_body_write () from ./etc/httpd/modules/libphp4.so #4 0x404a63b3 in php_body_write () from ./etc/httpd/modules/libphp4.so #5 0x404952eb in php_printf () from ./etc/httpd/modules/libphp4.so #6 0x40495a4d in php_error_cb () from ./etc/httpd/modules/libphp4.so #7 0x404c165f in zend_error () from ./etc/httpd/modules/libphp4.so #8 0x40495698 in php_verror () from ./etc/httpd/modules/libphp4.so #9 0x4049576f in php_error_docref0 () from ./etc/httpd/modules/libphp4.so #10 0x403c6951 in domxml_error () from ./etc/httpd/modules/libphp4.so #11 0x4083cb86 in xmlReportError (err=0x81dc978, ctxt=0x81dc7f8, str=0x81e03b0 "Document is empty\n", channel=0x403c6910 , data=0x0) at error.c:283 #12 0x4083ce9a in __xmlRaiseError (schannel=0, channel=0x4083d19c , data=0x81dc7f8, ctx=0x81dc7f8, nod=0x0, domain=1, code=4, level=XML_ERR_FATAL, file=0x81df640 "", line=1, str1=0x0, str2=0x0, str3=0x0, int1=0, int2=0, msg=0x408d5111 "Document is empty\n") at error.c:573 #13 0x4083fef4 in xmlFatalErr (ctxt=0x81dc7f8, error=1080649792, info=0x51 ) at parser.c:360 #14 0x4084fa17 in xmlParseTryOrFinish (ctxt=0x81dc7f8, terminate=0) at parser.c:9098 #15 0x40850358 in xmlParseChunk__internal_alias (ctxt=0x81dc7f8, chunk=0x81dc9e4 "í«îÛ\003", size=228, terminate=0) at parser.c:9763 #16 0x40cd108c in xmlpp::DomParser::parse_stream(std::istream&) (this=0xbfffeab0, [EMAIL PROTECTED]) at basic_string.h:781 The problem is domxml's "global" error handler. Even if the second module would register an error handler, it would override PHP's error handler. IMHO the best approach would be to register the error handler only during operations calling libxml functions and deregister it afterwards. The performance overhead should be minimal and it's very clean. What do you think? Cheers, Thomas Actual result: -- See backtrace in description -- Edit this bug report at http://bugs.php.net/?id=29599&edit=1
#29292 [Com]: Single space character returned instead of empty string
ID: 29292 Comment by: richard dot quadling at bandvulc dot co dot uk Reported By: jmelville at selectaustralasia dot com dot au Status: Open Bug Type: MSSQL related Operating System: Windows 2000 Server SP4 PHP Version: 4.3.8 New Comment: Hi. If the column contains NULL (using Enterprise Manager to enter CTRL+0), then the output is correct. But having to convert all '' to NULLs is not right. Richard. Previous Comments: [2004-08-13 09:48:32] richard dot quadling at bandvulc dot co dot uk Hi. Following script ... Length of user_icq = ' . strlen($row['user_icq']) . ''; } mssql_free_result($rResults); mssql_close($rConn); ?> produces output of ... array ( 'user_icq' => ' ', 'user_icq_len' => 0, ) Length of user_icq = 1 array ( 'user_icq' => '1711757', 'user_icq_len' => 7, ) Length of user_icq = 7 array ( 'user_icq' => ' ', 'user_icq_len' => 0, ) Length of user_icq = 1 Which is clearly wrong! The length being returned by SQL is 0, the data being returned by PHP is ' '. The data via enterprise manager is ''. I'm using Sambar Server V6.1 Beta 3, PHP V5.0.0 (about to upgrade to V5.0.1). MS SQL 2000 SP3 Developer Edition all on a Windows XP Pro. But none of this seems to be making any difference. According to all the comments made, this was broken a LONG time ago. It seems that a small patch HAS been applied to the source (php_mssql.c line 793-797), but is under a compiler directive of ilia_0. (Is this Ilia Alshanetsky? If so, great article in PHP|Architect about contexts!!!). The code is in the php_mssql_get_column_content_with_type() function. ... case SQLTEXT: { int length; char *data = charcol(offset); length=dbdatlen(mssql_ptr->link,offset); #if ilia_0 while (length>0 && data[length-1] == ' ') { /* nuke trailing whitespace */ length--; } #endif ZVAL_STRINGL(result, data, length, 1); break; } ... The macro ZVAL_STRINGL is ... #define ZVAL_STRINGL(z, s, l, duplicate) { \ char *__s=(s); int __l=l; \ (z)->value.str.len = __l; \ (z)->value.str.val = (duplicate?estrndup(__s, __l):__s);\ (z)->type = IS_STRING; \ } If someone can recompile the code, can they do so WITHOUT the directive first but put in some debugs (forget thread safeness, only testing) and show what the value of length in the assignment from dbdatlen(mssql_ptr->link,offset) and what happens if the macro is called with a 0 rather than a 1. [2004-08-10 18:22:55] chris at fjmercedes dot com I'm experiencing the same problem with the latest CVS of PHP5 and no php_mssql.dll extensions from older versions are compatable with PHP5. [2004-08-10 16:38:51] jeremyirons at genevus dot com I've been having the same problem with 4.3.8. I swapped php_mssql.dll with versions from 4.3.7, 4.3.6, 4.3.5, 4.3.4, and 4.3.3. The space problem went away at 4.3.3 only. [2004-07-26 14:06:00] egarcia at egm dot as I have the same problem, this is related to the 4.3.8. To resolve for now, I'm using the mssql.dll extension from the 4.3.7 with the 4.3.8 with out problems. In the Zend Debugger now I see the nulls like null, no like " " with the 4.3.8 version. I hope that this litte trick can be usefull meanwhile. [2004-07-21 11:22:17] jmelville at selectaustralasia dot com dot au Description: Upgraded an existing server from PHP 4.3.2 to 4.3.8, Apache 1.3 on Windows 2000 SP4. Database is SQL Server 2000 SP4 on the same machine. All SQL queries that previously returned an empty string (e.g. the varchar column in the database contains an empty string and is not NULL) now return a single space character. I've confirmed in Query Analyser that the fields are definitely empty. Note the sample uses mssql_fetch_object() but I've also checked mssql_fetch_array() and it does the same thing. This is the same as bug #9854 but that bug is closed and refers to PHP 4.0.x, whereas this server has never run anything older than 4.3.x Thanks, Julian. Reproduce code: --- $sql = "SELECT TOP 5 * FROM jobs; $rs = mssql_query($sql); while ($job = mssql_fetch_object($rs)) { print "rec_id: '$job->rec_id' fax: '$job->fax' \n"; } Expected result: rec_id: '45336' fax: '' rec_id: '40659' fax: '09 379 7785' rec_id: '44934' fax: '' Actual resu
#29647 [NEW]: self:: into child class seems to refer to parent class
From: mrpyle at libero dot it Operating system: ANY PHP version: 5.0.0 PHP Bug Type: Class/Object related Bug description: self:: into child class seems to refer to parent class Description: self:: into child class seems to refer to parent class, is this a bug? Reproduce code: --- Expected result: ChildClass::$a == 'some value' ; Actual result: -- Fatal error: Access to undeclared static property: ParentClass::$a in c:\phproot\static\bug.php5 on line 9 -- Edit bug report at http://bugs.php.net/?id=29647&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29647&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29647&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29647&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29647&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29647&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29647&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29647&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29647&r=support Expected behavior: http://bugs.php.net/fix.php?id=29647&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29647&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29647&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29647&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29647&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29647&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29647&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29647&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29647&r=float
#29646 [Opn]: mail() inserts change CRLF ("\r\n") to CRCRLF ("\r\r\n") for some extra headers
ID: 29646 User updated by: shelby at coolpage dot com Reported By: shelby at coolpage dot com Status: Open Bug Type: Mail related Operating System: FreeBSD PHP Version: Irrelevant New Comment: Note I made two typos: Content-Type: text/plainn\r\r\n Should be: Content-Type: text/plain\r\r\n And: There seems to be no one answer of solution? Should be: There seems to be no one answer or solution? Also I would like to point out that either mail() or Qmail must be handling the CRLR after the From: dna Reply-To: headers correctly. It is strange that only some headers are affected. That could explain why others have not reproduced the bug reports of yore ("yore" is like 2002 apparently! :) Now it seems I remember having this same problem (had to change my "\n" to "\r\n" between headers input to mail()) when I migrated from Pair.com to Rackspace.com (from Qmail to SendMail) and now revisiting this again when migrating back. So what is correct work around? Do I change all "\r\n" back to "\n" when using Qmail, or just the headers it seems to affect? What is going to work in current and future CVS of PHP? Please give some definitive guidance! Having mail break for 1000 AccuSpam users (spam filter) is not pretty! Thanks, Shelby Moore http://AccuSpam.com http://CoolPage.com Previous Comments: [2004-08-13 10:31:06] shelby at coolpage dot com Description: See the post for detailed description of problem, as well as fact that others are experiencing the problem: http://www.zend.com/zend/comments/show_comment.php?article=sendmimeemailpart1&id=5733&pid=2921&days=1&f_id=sendmimeemailpart1&mode=&kind=sl I think the reason no one isolated this yet, is because it only manifests itself for certain extra headers and only causes a noticeable corruption in Outlook Express, even though the header corruption is occuring always. I remembered seeing this before and remember it had something to do with extra "\r" character after a header line. I then did a raw telnet session saved to a raw log and confirmed that the extra CR ("\r") is being inserted by mail(). I am guessing that the mail() code extracts known header lines and their "\r\n", then does str_replace( "\n", "\r\n" ) on remaining lines of extra headers? I use pair.com as host: php -v PHP 4.3.4 (cli) (built: Nov 4 2003 16:10:03) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies We do use Qmail. See other relevant bug posts: http://bugs.php.net/bug.php?id=15841&edit=2 http://bugs.php.net/bug.php?id=22262&edit=2 There seems to be no one answer of solution? Reproduce code: --- If the following headers input to mail(): "From: [EMAIL PROTECTED]" . "Reply-To: [EMAIL PROTECTED]" . "Date: Wed, 11 Aug 2004 08:15:15 -0400\r\n" . "Mime-Version: 1.0\r\n" . "Content-Type: text/plainn\r\n" . "Content-Transfer-Encoding: 7BIT\r\n" Expected result: (1) In Outlook Express, you get: From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Wed, 11 Aug 2004 08:15:15 -0400 Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7BIT (2) In Eudora 4, you see: From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Wed, 11 Aug 2004 08:15:15 -0400 Mime-Version: 1.0 Content-Type: text/plainn Content-Transfer-Encoding: 7BITT (3) In raw text you see: From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Wed, 11 Aug 2004 08:15:15 -0400\r\r\n Mime-Version: 1.0\r\r\n Content-Type: text/plainn\r\r\n Content-Transfer-Encoding: 7BIT\r\r\n -- Edit this bug report at http://bugs.php.net/?id=29646&edit=1
#29470 [Asn->Csd]: MsgBox in silent PHP install
ID: 29470 Updated by: [EMAIL PROTECTED] Reported By: m dot oe at x-trader dot de -Status: Assigned +Status: Closed Bug Type: IIS related Operating System: Windows 2003 PHP Version: 4.3.9 Assigned To: phildriscoll New Comment: Fixed in the php 5.0.1 installer. The fix will also be in place in the next php 4 release. Previous Comments: [2004-07-31 20:28:43] m dot oe at x-trader dot de Description: I want to integrate PHP 4 into an unattended / silent installation process. php-4.3.8-installer.exe recognizes /s and installs fine but at the end of the installation a MsgBox pops up saying that IIS has been configured. Please have a quick look in the installation script if this can be eleminated. I would be glad if you could send me a modified installer executable that runs completely silent. Thank you! Reproduce code: --- /s should be completely silent -- Edit this bug report at http://bugs.php.net/?id=29470&edit=1
#29646 [NEW]: mail() inserts change CRLF ("\r\n") to CRCRLF ("\r\r\n") for some extra headers
From: shelby at coolpage dot com Operating system: FreeBSD PHP version: Irrelevant PHP Bug Type: Mail related Bug description: mail() inserts change CRLF ("\r\n") to CRCRLF ("\r\r\n") for some extra headers Description: See the post for detailed description of problem, as well as fact that others are experiencing the problem: http://www.zend.com/zend/comments/show_comment.php?article=sendmimeemailpart1&id=5733&pid=2921&days=1&f_id=sendmimeemailpart1&mode=&kind=sl I think the reason no one isolated this yet, is because it only manifests itself for certain extra headers and only causes a noticeable corruption in Outlook Express, even though the header corruption is occuring always. I remembered seeing this before and remember it had something to do with extra "\r" character after a header line. I then did a raw telnet session saved to a raw log and confirmed that the extra CR ("\r") is being inserted by mail(). I am guessing that the mail() code extracts known header lines and their "\r\n", then does str_replace( "\n", "\r\n" ) on remaining lines of extra headers? I use pair.com as host: php -v PHP 4.3.4 (cli) (built: Nov 4 2003 16:10:03) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies We do use Qmail. See other relevant bug posts: http://bugs.php.net/bug.php?id=15841&edit=2 http://bugs.php.net/bug.php?id=22262&edit=2 There seems to be no one answer of solution? Reproduce code: --- If the following headers input to mail(): "From: [EMAIL PROTECTED]" . "Reply-To: [EMAIL PROTECTED]" . "Date: Wed, 11 Aug 2004 08:15:15 -0400\r\n" . "Mime-Version: 1.0\r\n" . "Content-Type: text/plainn\r\n" . "Content-Transfer-Encoding: 7BIT\r\n" Expected result: (1) In Outlook Express, you get: From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Wed, 11 Aug 2004 08:15:15 -0400 Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7BIT (2) In Eudora 4, you see: From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Wed, 11 Aug 2004 08:15:15 -0400 Mime-Version: 1.0 Content-Type: text/plainn Content-Transfer-Encoding: 7BITT (3) In raw text you see: From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Wed, 11 Aug 2004 08:15:15 -0400\r\r\n Mime-Version: 1.0\r\r\n Content-Type: text/plainn\r\r\n Content-Transfer-Encoding: 7BIT\r\r\n -- Edit bug report at http://bugs.php.net/?id=29646&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29646&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29646&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29646&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29646&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29646&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29646&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29646&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29646&r=support Expected behavior: http://bugs.php.net/fix.php?id=29646&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29646&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29646&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29646&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29646&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29646&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29646&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29646&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29646&r=float
#29292 [Com]: Single space character returned instead of empty string
ID: 29292 Comment by: richard dot quadling at bandvulc dot co dot uk Reported By: jmelville at selectaustralasia dot com dot au Status: Open Bug Type: MSSQL related Operating System: Windows 2000 Server SP4 PHP Version: 4.3.8 New Comment: Hi. Following script ... Length of user_icq = ' . strlen($row['user_icq']) . ''; } mssql_free_result($rResults); mssql_close($rConn); ?> produces output of ... array ( 'user_icq' => ' ', 'user_icq_len' => 0, ) Length of user_icq = 1 array ( 'user_icq' => '1711757', 'user_icq_len' => 7, ) Length of user_icq = 7 array ( 'user_icq' => ' ', 'user_icq_len' => 0, ) Length of user_icq = 1 Which is clearly wrong! The length being returned by SQL is 0, the data being returned by PHP is ' '. The data via enterprise manager is ''. I'm using Sambar Server V6.1 Beta 3, PHP V5.0.0 (about to upgrade to V5.0.1). MS SQL 2000 SP3 Developer Edition all on a Windows XP Pro. But none of this seems to be making any difference. According to all the comments made, this was broken a LONG time ago. It seems that a small patch HAS been applied to the source (php_mssql.c line 793-797), but is under a compiler directive of ilia_0. (Is this Ilia Alshanetsky? If so, great article in PHP|Architect about contexts!!!). The code is in the php_mssql_get_column_content_with_type() function. ... case SQLTEXT: { int length; char *data = charcol(offset); length=dbdatlen(mssql_ptr->link,offset); #if ilia_0 while (length>0 && data[length-1] == ' ') { /* nuke trailing whitespace */ length--; } #endif ZVAL_STRINGL(result, data, length, 1); break; } ... The macro ZVAL_STRINGL is ... #define ZVAL_STRINGL(z, s, l, duplicate) { \ char *__s=(s); int __l=l; \ (z)->value.str.len = __l; \ (z)->value.str.val = (duplicate?estrndup(__s, __l):__s);\ (z)->type = IS_STRING; \ } If someone can recompile the code, can they do so WITHOUT the directive first but put in some debugs (forget thread safeness, only testing) and show what the value of length in the assignment from dbdatlen(mssql_ptr->link,offset) and what happens if the macro is called with a 0 rather than a 1. Previous Comments: [2004-08-10 18:22:55] chris at fjmercedes dot com I'm experiencing the same problem with the latest CVS of PHP5 and no php_mssql.dll extensions from older versions are compatable with PHP5. [2004-08-10 16:38:51] jeremyirons at genevus dot com I've been having the same problem with 4.3.8. I swapped php_mssql.dll with versions from 4.3.7, 4.3.6, 4.3.5, 4.3.4, and 4.3.3. The space problem went away at 4.3.3 only. [2004-07-26 14:06:00] egarcia at egm dot as I have the same problem, this is related to the 4.3.8. To resolve for now, I'm using the mssql.dll extension from the 4.3.7 with the 4.3.8 with out problems. In the Zend Debugger now I see the nulls like null, no like " " with the 4.3.8 version. I hope that this litte trick can be usefull meanwhile. [2004-07-21 11:22:17] jmelville at selectaustralasia dot com dot au Description: Upgraded an existing server from PHP 4.3.2 to 4.3.8, Apache 1.3 on Windows 2000 SP4. Database is SQL Server 2000 SP4 on the same machine. All SQL queries that previously returned an empty string (e.g. the varchar column in the database contains an empty string and is not NULL) now return a single space character. I've confirmed in Query Analyser that the fields are definitely empty. Note the sample uses mssql_fetch_object() but I've also checked mssql_fetch_array() and it does the same thing. This is the same as bug #9854 but that bug is closed and refers to PHP 4.0.x, whereas this server has never run anything older than 4.3.x Thanks, Julian. Reproduce code: --- $sql = "SELECT TOP 5 * FROM jobs; $rs = mssql_query($sql); while ($job = mssql_fetch_object($rs)) { print "rec_id: '$job->rec_id' fax: '$job->fax' \n"; } Expected result: rec_id: '45336' fax: '' rec_id: '40659' fax: '09 379 7785' rec_id: '44934' fax: '' Actual result: -- rec_id: '45336' fax: ' ' rec_id: '40659' fax: '09 379 7785' rec_id: '44934' fax: ' ' -- Edit this bug report at http://bugs.php.net/?id=29292&edit=1
#29645 [NEW]: How can we test mysql connection is already established or not?
From: sivalsm at yahoo dot com Operating system: Linux PHP version: 5.0.1 PHP Bug Type: *Database Functions Bug description: How can we test mysql connection is already established or not? Description: I think it will be great, if we had a database function to check whether database connection is already exist or not for a particular session. Naturally we are using a common php file to connect to database and we are inclusing the file in every script.Anyway database connection will lost after completing the execution of the script.But we need to connect database again and again. If there is a database function like mysql_isconnected, to check whether database connection is already established or not...that will be helpful. Expected result: We can use mysql_pconnect to maintain persistancy in database connections.But it will take server resources to maintain persistancy.So if there is a seperate mechanism to check the database connection it will be better. -- Edit bug report at http://bugs.php.net/?id=29645&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29645&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29645&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29645&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29645&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29645&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29645&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29645&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29645&r=support Expected behavior: http://bugs.php.net/fix.php?id=29645&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29645&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29645&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29645&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29645&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29645&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29645&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29645&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29645&r=float
#29642 [Opn->Bgs]: Incorrect string handling of "<
ID: 29642 Updated by: [EMAIL PROTECTED] Reported By: webdevguy1 at yahoo dot com -Status: Open +Status: Bogus Bug Type: Strings related Operating System: Win2k PHP Version: 4.3.9RC1 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. This works fine, do a "view-source" in your browser. Previous Comments: [2004-08-13 05:13:19] webdevguy1 at yahoo dot com Description: Improper string handling of "<" and "&" characters. Refer to test code below. Reproduce code: --- $test1a='/(?'; echo $test2b; $test2c='<'; var_dump($test2c); $test2f='<'; echo $test2f; var_dump($test2f); $test3f='&'; echo $test3f; var_dump($test3f); Expected result: test1a: /(?http://bugs.php.net/?id=29642&edit=1