ID:               31725
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Feedback
+Status:           Open
 Bug Type:         Zend Engine 2 problem
 Operating System: *
 PHP Version:      5CVS-2005-03-21


Previous Comments:
------------------------------------------------------------------------

[2005-03-21 16:20:28] [EMAIL PROTECTED]

Yep, both my examples still fail. And sqlite is leaking somewhere.

------------------------------------------------------------------------

[2005-03-21 11:12:26] [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



------------------------------------------------------------------------

[2005-01-31 01:31:13] [EMAIL PROTECTED]

$sql = 'CREATE TABLE changelog (
  name VARCHAR(200) PRIMARY KEY,';
foreach($tags as $tag) $sql .= " $tag TINYINT,";
$idx->query($sql);

You're going to end up with a query like

CREATE TABLE changelog (name VARCHAR(200) PRIMARY KEY, tag1 TINYINT,
tag2 TINYINT

Just pointing this out, might want to ) the end before querying? I just
saw this in passing.

------------------------------------------------------------------------

[2005-01-27 17:00:56] [EMAIL PROTECTED]

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 this bug report at http://bugs.php.net/?id=31725&edit=1

Reply via email to