#31725 [NEW]: sqlite/zend engine 2 weird problems

From: Date: Thu, 27 Jan 2005 16:00:57 +0000
Subject: #31725 [NEW]: sqlite/zend engine 2 weird problems
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72933@lists.php.net to get a copy of this message
From: nlopess@php.net Operating system: all PHP version: 5CVS-2005-01-27 (dev) PHP Bug Type: Zend Engine 2 problem Bug description: sqlite/zend engine 2 weird problems Description: ------------ I've found a couple of sqlite weird problems (php 5.1). verified with both linux and windows. Reproduce code: --------------- <? $error = ''; $idx = new SQLiteDatabase('ini_changelog.sqlite', 0666, $error); $tags = array_map('rtrim', array_merge(file('version4.tags'), file('version5.tags'))); print_r($tags); ?> prints a warning (and array empty). removing the $error declaration outputs a notice, but works. --------------- #2 <? $error = ''; $idx = new SQLiteDatabase('ini_changelog.sqlite', 0666, $error); $tags = array_map('rtrim', array_merge(file('version4.tags'), file('version5.tags'))); print_r($tags); $sql = 'CREATE TABLE changelog ( name VARCHAR(200) PRIMARY KEY,'; foreach($tags as $tag) { $sql .= " $tag TINYINT,"; } $idx->query($sql); Actual result: -------------- 1st example: Warning: array_map(): The first argument, '~„©o', should be either NULL or a valid callback in /transfer/test.php on line 6 (notice the garbidge in the name of the function) -------------------------------- 2nd example: Program received signal SIGSEGV, Segmentation fault. 0x403bb848 in pthread_mutex_lock () from /lib/libpthread.so.0 (gdb) bt #0 0x403bb848 in pthread_mutex_lock () from /lib/libpthread.so.0 #1 0x40462925 in free () from /lib/libc.so.6 #2 0x081d4222 in shutdown_memory_manager (silent=0, full_shutdown=0) at /cvs/php-src/Zend/zend_alloc.c:582 #3 0x081b3a01 in php_request_shutdown (dummy=0x0) at /cvs/php-src/main/main.c:1225 #4 0x0824b1af in main (argc=2, argv=0xbffff9b4) at /cvs/php-src/sapi/cli/php_cli.c:1047 -- Edit bug report at http://bugs.php.net/?id=31725&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31725&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31725&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31725&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31725&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31725&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31725&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31725&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31725&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31725&r=support Expected behavior: http://bugs.php.net/fix.php?id=31725&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31725&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31725&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31725&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31725&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31725&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31725&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31725&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31725&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31725&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31725&r=mysqlcfg

« previous php.bugs (#72933) next »