#38015 [Fbk->Opn]: Can not set PDO_MYSQL_ATTR_MAX_BUFFER_SIZE

2006-07-06 Thread sunaoka+bugs dot php dot net at gmail dot com
 ID:   38015
 User updated by:  sunaoka+bugs dot php dot net at gmail dot com
 Reported By:  sunaoka+bugs dot php dot net at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: Solaris
 PHP Version:  5.1.4
 New Comment:

Thank you for your comment. But, I do not understand why the result
doesn't become `int(10485760)'.
I load `FileData' only 1MB.

I am using php5.2-200607060030.

Reproduce code:
---
try {
$db = new PDO('mysql:host=localhost;dbname=test', 'user', 'pass');
$db->setAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE, 1024 * 1024 *
10);

$sql = 'SELECT LENGTH(FileData) FROM FileInfo WHERE Id = ?';
$stmt = $db->prepare($sql);
$stmt->execute(array(1));
$result = $stmt->fetch();
$stmt->closeCursor();

echo 'LENGTH(FileData): ', $result[0], "\n";

$sql = 'SELECT FileData FROM FileInfo WHERE Id = ?';
$stmt = $db->prepare($sql);
$stmt->execute(array(1));

$stmt->bindColumn('FileData', $lob, PDO::PARAM_LOB);
$result = $stmt->fetch(PDO::FETCH_BOUND);

file_put_contents('/tmp/foo', $lob);
echo "filesize('/tmp/foo'): ", filesize('/tmp/foo'), "\n";

} catch (PDOException $exception) {
echo $exception->getMessage(), "\n";
}

Expected result:

LENGTH(FileData): 6971569
filesize('/tmp/foo'): 1048576


Previous Comments:


[2006-07-06 20:12:51] [EMAIL PROTECTED]

Expected result:

int(1048576)
bool(true)
int(1048576)


Right, this is the expected and ACTUAL result.
I don't see any problems there.



[2006-07-06 08:41:22] sunaoka+bugs dot php dot net at gmail dot com

Thank you for your comment. I try using CVS snapshot, but I have
another problem.
So, I can set PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, but it can not set the
value.

Reproduce code:
---
$db = new PDO('mysql:host=localhost;dbname=test', 'user', 'pass');
var_dump($db->getAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE));
var_dump($db->setAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE, 1024 * 1024
* 10));
var_dump($db->getAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE));

Expected result:

int(1048576)
bool(true)
int(1048576)



[2006-07-05 17:32:50] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





[2006-07-05 13:28:41] sunaoka+bugs dot php dot net at gmail dot com

Description:

I'm using pdo_mysql client library 4.1.20.
I need treat the data of 1MB or more.
But I can not set PDO_MYSQL_ATTR_MAX_BUFFER_SIZE.

Reproduce code:
---
$db = new PDO('mysql:host=localhost;dbname=test', 'user', 'pass');
var_dump($db->setAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE, 1024 * 1024
* 10));


Expected result:

bool(false)






-- 
Edit this bug report at http://bugs.php.net/?id=38015&edit=1


#38029 [NEW]: oci8 make procedure mistake

2006-07-06 Thread lbc102 at 163 dot com
From: lbc102 at 163 dot com
Operating system: linux  2.4.21-32.E
PHP version:  5.1.4
PHP Bug Type: OCI8 related
Bug description:  oci8 make procedure mistake

Description:

hi,seniors,i install oci8 with php5 and oracle10g,i find a mistake when i
execute make like this:
[EMAIL PROTECTED] php-5.1.4]# make
/bin/sh /root/software/php-5.1.4/libtool --silent --preserve-dup-deps
--mode=compile /root/software/php-5.1.4/meta_ccld  -Iext/oci8/
-I/root/software/php-5.1.4/ext/oci8/ -DPHP_ATOM_INC
-I/root/software/php-5.1.4/include -I/root/software/php-5.1.4/main
-I/root/software/php-5.1.4 -I/usr/local/include/libxml2
-I/root/software/php-5.1.4/ext/date/lib -I/usr/local/include
-I/usr/local/include/freetype2 -I/usr/local/gd-2.0.28/
-I/usr/local/mysql/include
-I/u01/app/oracle/product/10.1.0/db_1//rdbms/public
-I/u01/app/oracle/product/10.1.0/db_1//rdbms/demo
-I/u01/app/oracle/product/10.1.0/db_1//plsql/public
-I/root/software/php-5.1.4/TSRM -I/root/software/php-5.1.4/Zend 
-D_REENTRANT  -I/usr/include -g -O2 -pthread -DZTS  -prefer-non-pic -c
/root/software/php-5.1.4/ext/oci8/oci8_lob.c -o ext/oci8/oci8_lob.lo 
In file included from /root/software/php-5.1.4/ext/oci8/oci8_lob.c:43:
/root/software/php-5.1.4/ext/oci8/php_oci8_int.h:328: syntax error before
"oraub8"
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:150: syntax error before
"oraub8"
/root/software/php-5.1.4/ext/oci8/oci8_lob.c: In function
`php_oci_lob_callback':
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:155: `len' undeclared (first
use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:155: (Each undeclared
identifier is reported only once
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:155: for each function it
appears in.)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:156: `ctxp' undeclared (first
use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:158: `piece' undeclared
(first use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:162: `bufxp' undeclared
(first use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c: In function
`php_oci_lob_read':
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:220: `oraub8' undeclared
(first use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:220: syntax error before
"bytes_read"
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:248: `requested_len'
undeclared (first use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:259: `offset' undeclared
(first use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:288: `chars_read' undeclared
(first use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:289: `bytes_read' undeclared
(first use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:315: syntax error before ')'
token
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:315: syntax error before ')'
token
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:315: syntax error before
"offset"
make: *** [ext/oci8/oci8_lob.lo] Error 1

i ensure oci8_lob.c is the lastest version but i can not find the "oraub8"
in any *.h head files,is this a bug or i miss some head files? help me
thanks a lot

Reproduce code:
---
[EMAIL PROTECTED] php-5.1.4]# make
/bin/sh /root/software/php-5.1.4/libtool --silent --preserve-dup-deps
--mode=compile /root/software/php-5.1.4/meta_ccld  -Iext/oci8/
-I/root/software/php-5.1.4/ext/oci8/ -DPHP_ATOM_INC
-I/root/software/php-5.1.4/include -I/root/software/php-5.1.4/main
-I/root/software/php-5.1.4 -I/usr/local/include/libxml2
-I/root/software/php-5.1.4/ext/date/lib -I/usr/local/include
-I/usr/local/include/freetype2 -I/usr/local/gd-2.0.28/
-I/usr/local/mysql/include
-I/u01/app/oracle/product/10.1.0/db_1//rdbms/public
-I/u01/app/oracle/product/10.1.0/db_1//rdbms/demo
-I/u01/app/oracle/product/10.1.0/db_1//plsql/public
-I/root/software/php-5.1.4/TSRM -I/root/software/php-5.1.4/Zend 
-D_REENTRANT  -I/usr/include -g -O2 -pthread -DZTS  -prefer-non-pic -c
/root/software/php-5.1.4/ext/oci8/oci8_lob.c -o ext/oci8/oci8_lob.lo 
In file included from /root/software/php-5.1.4/ext/oci8/oci8_lob.c:43:
/root/software/php-5.1.4/ext/oci8/php_oci8_int.h:328: syntax error before
"oraub8"
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:150: syntax error before
"oraub8"
/root/software/php-5.1.4/ext/oci8/oci8_lob.c: In function
`php_oci_lob_callback':
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:155: `len' undeclared (first
use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:155: (Each undeclared
identifier is reported only once
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:155: for each function it
appears in.)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:156: `ctxp' undeclared (first
use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:158: `piece' undeclared
(first use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c:162: `bufxp' undeclared
(first use in this function)
/root/software/php-5.1.4/ext/oci8/oci8_lob.c: In function
`php_oci_lob_read':
/root/

#38028 [NEW]: Enable possibility to iterate static or const member in class with foreach

2006-07-06 Thread rapsys at free dot fr
From: rapsys at free dot fr
Operating system: Mandriva Linux 2007 (Cooker)
PHP version:  5.1.4
PHP Bug Type: Feature/Change Request
Bug description:  Enable possibility to iterate static or const member in class 
with foreach

Description:

I noticed a limitation in (at least) latest version of php.

It's impossible to iterate the const or static member of a 
class.

The only possible (but REALY too hard) whould be to use the 
reflector propriety.

I don't know if it's a feature to add or a missing 
explanation in documentation.

But if it's not supported at all, it should be reported as 
a lack of feature in documentation and scheduled for php6 ?

Reproduce code:
---
 $value)
echo "$key = $value\n";
}
}

echo "static function list:\n";
someclass::somefunction();
echo "external list:\n";
foreach(someclass as $key => $value)
echo "$key = $value\n";
?>

Expected result:

static function list:
someconst = somevalue
somepublicstatic = somevalue
someprotectedstatic = somevalue
someprivatestatic = somevalue
external list:
someconst = somevalue
somepublicstatic = somevalue


Actual result:
--
static function list:
PHP Notice:  Use of undefined constant self - 
assumed 'self' in /var/www/web/test.php on line 17

Notice: Use of undefined constant self - assumed 'self' 
in /var/www/web/test.php on line 17
PHP Warning:  Invalid argument supplied for foreach() 
in /var/www/web/test.php on line 17

Warning: Invalid argument supplied for foreach() 
in /var/www/web/test.php on line 17
external list:
PHP Notice:  Use of undefined constant someclass - 
assumed 'someclass' in /var/www/web/test.php on line 25

Notice: Use of undefined constant someclass - 
assumed 'someclass' in /var/www/web/test.php on line 25
PHP Warning:  Invalid argument supplied for foreach() 
in /var/www/web/test.php on line 25

Warning: Invalid argument supplied for foreach() 
in /var/www/web/test.php on line 25


-- 
Edit bug report at http://bugs.php.net/?id=38028&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38028&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38028&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38028&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38028&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=38028&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=38028&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=38028&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=38028&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=38028&r=support
Expected behavior:http://bugs.php.net/fix.php?id=38028&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=38028&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=38028&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38028&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38028&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38028&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=38028&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=38028&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38028&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=38028&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=38028&r=mysqlcfg


#15909 [Com]: mysql and header() problem prevent saving session vars(?)

2006-07-06 Thread jallinson at optusnet dot com dot au
 ID:   15909
 Comment by:   jallinson at optusnet dot com dot au
 Reported By:  phpbug at ehrlichorg dot com
 Status:   No Feedback
 Bug Type: Session related
 Operating System: Linux (Debian)
 PHP Version:  4.1.1
 New Comment:

using session_write_close(); after seeting the session variable solved
it for me.


Previous Comments:


[2002-05-30 00:00:05] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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".



[2002-04-29 15:23:06] [EMAIL PROTECTED]

Does this happen with latest CVS (stable branch) snapshot ?

http://snaps.php.net/php4-STABLE-latest.tar.gz

--Jani




[2002-04-29 12:21:48] phpbug at ehrlichorg dot com

MySQL is not the problem. We have not changed MySQL versions, just the
PHP version. 

Some of the cases that fail do not do any database operations. They
change a context variable and page jump (via header()) to another PHP
page.

If this were a MySQL problem, the work around I described above would
not fix it.

The problem appears to be with PHP and the management of session
variables.

Note: Status should be changed to Open but the only options I have are
No Feedback or Closed.



[2002-04-29 00:00:03] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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".



[2002-03-28 19:12:11] [EMAIL PROTECTED]

There is bug report for MySQL.
After serval database operation, calling heade() crashes PHP for some
reason according to the bug report.

Anyway, I don't use MySQL and I don't have this problem.
We need backtrace or need where/how PHP is bailing out.

Build with --enable-debug and check what is going to with debugger.





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/15909

-- 
Edit this bug report at http://bugs.php.net/?id=15909&edit=1


#38027 [NEW]: extension_dir not working

2006-07-06 Thread danyup at mybox dot it
From: danyup at mybox dot it
Operating system: Windows XP SP2
PHP version:  5.1.4
PHP Bug Type: Dynamic loading
Bug description:  extension_dir not working

Description:

Php can't see php_mysql.dll even if I try to change extension_dir
directive. He say can't load module. I tried absolute and relative path,
none working. I have c:\php in my path.


-- 
Edit bug report at http://bugs.php.net/?id=38027&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38027&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38027&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38027&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38027&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=38027&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=38027&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=38027&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=38027&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=38027&r=support
Expected behavior:http://bugs.php.net/fix.php?id=38027&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=38027&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=38027&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38027&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38027&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38027&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=38027&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=38027&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38027&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=38027&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=38027&r=mysqlcfg


#38007 [Fbk->Opn]: system() does not work under apache

2006-07-06 Thread marcus dot yu at rogers dot com
 ID:   38007
 User updated by:  marcus dot yu at rogers dot com
 Reported By:  marcus dot yu at rogers dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: fedora core 5
 PHP Version:  5.1.4
 New Comment:

Of course not on the same machine. The machine with SELinux  enforcing
runs kernel 2.6.10-1.770_FC3, Apache 2.0.53, and php 4.3.11.

There is no technical difference between the two apache configurations.
Or I missed where to configure SELinux to let Apache run binaries. The
file /etc/selinux/config does not tell much.


Previous Comments:


[2006-07-06 22:10:28] [EMAIL PROTECTED]

It works with 4.3.11 and SELinux enabled on the same machine with the
same configuration?
I can hardly believe in that.
Also, I don't really see how we can investigate it since we don't have
access to your machine and we've no idea of your configuration.



[2006-07-06 22:00:42] marcus dot yu at rogers dot com

it works with older verson of php (i.e. 4.3.11) while SELinux is
enforcing.



[2006-07-06 21:59:32] [EMAIL PROTECTED]

Well, then it's clearly not PHP problem.
You just need to configure SELinux appropriately to allow Apache to
execute binaries or just disable SELinux.



[2006-07-06 21:45:20] marcus dot yu at rogers dot com

Yes. It doesn't work with SELinux enforced. Why? 
The machine is going to host a web site over SSL. Any impact if SELinux
is disabled?



[2006-07-06 20:38:59] [EMAIL PROTECTED]

Did you enable SELinux ?



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/38007

-- 
Edit this bug report at http://bugs.php.net/?id=38007&edit=1


#38000 [Opn->Bgs]: preg_match fails if strlen >= 1630

2006-07-06 Thread nlopess
 ID:   38000
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dave at smartboy dot com
-Status:   Open
+Status:   Bogus
 Bug Type: PCRE related
 Operating System: Windows XP
 PHP Version:  5.1.4
 New Comment:

Well what I can reproduce is a pcre backtracking and recursion limit.
This is because your regex is particularly difficult to run (you may
note that it will need to backtrack a lot!).
The other problem is that the bundled pcre library was upgraded in PHP
5.1.3. And that version has some 'S'tudy features disabled, and you are
beeing hited by that. PCRE was previously optimizing your complex regex
but now it isn't. We'll have to wait for the next release of PCRE.

In the mean time, you may want to upgrade to php 5.2, where you can
tweak the backtrack and recursion limits on run-time (anyway you can
always tweak them on compile time on any version).


Previous Comments:


[2006-07-04 21:33:55] dave at smartboy dot com

$str = str_repeat('a', 100);  //works in PHP 5.1.2



[2006-07-04 21:23:49] dave at smartboy dot com

It turns out that no test file is needed

$str = str_repeat('a', 1575);  //works

$str = str_repeat('a', 1576);  //fails

There are really two issues:
- PCRE not working for "long" strings (although 1576 bytes is not
really a "long" string).  This greatly limits the usefulness of regexp
pattern matching.

- When PCRE fails the error message is VERY misleading.  Surely an
E_NOTICE should be issued by preg_match() if match has failed due to
out of memory, etc.?  "Could not open input file" is just plain wrong.



[2006-07-04 14:40:01] [EMAIL PROTECTED]

please provide the zzz file. (either post a link to it or send it to my
e-mail).



[2006-07-04 00:46:02] dave at smartboy dot com

Description:

preg_match() with regexp to test for valid UTF-8 sequence - fails and
causes the error message:

'Could not open input file: .php'

IF the subject string passed to preg_match() is longer than 1629
characters.  (Or in this case the size of the file 'zzz' which contains
ASCII)

There was no such limitation in preg_match() in the previous version of
PHP (5.1.2)



Reproduce code:
---
$str = file_get_contents('zzz');
echo "Loaded file...\n";
$result =
preg_match('/^([\x00-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|'
.

'[\xe1-\xec][\x80-\xbf]{2}|\xed[\x80-\x9f][\x80-\xbf]|[\xee-\xef][\x80-\xbf]{2}|'
.

'\xf0[\x90-\xbf][\x80-\xbf]{2}|[\xf1-\xf3][\x80-\xbf]{3}|\xf4[\x80-\x8f][\x80-\xbf]{2})*$/S',
$str) === 1;

echo "Back from preg_match()\n";
var_export($result);
echo "\n";


Expected result:

Loaded file...
Back from preg_match()
true


Actual result:
--
Loaded file...
Could not open input file: u8.php






-- 
Edit this bug report at http://bugs.php.net/?id=38000&edit=1


#38026 [Fbk->Opn]: IE 6 and zlib.output_compression sometimes does not work

2006-07-06 Thread php at seven dot net dot nz
 ID:   38026
 User updated by:  php at seven dot net dot nz
 Reported By:  php at seven dot net dot nz
-Status:   Feedback
+Status:   Open
 Bug Type: Zlib Related
 Operating System: Windows XP
 PHP Version:  5.1.4
 New Comment:

Microsoft are unlikely to care, whereas I would hope the PHP team would
be interested if a feature does not work in a browser used by 90% of the
internet population.


Previous Comments:


[2006-07-06 22:27:50] [EMAIL PROTECTED]

>3. Only affects IE 6 (and possibly earlier). No problems with IE 7 or
Firefox.
Why do you report it here and not to MS support then?



[2006-07-06 22:26:08] php at seven dot net dot nz

Description:

Apache 2.0.56 or 2.2.2.
Windows XP Pro.
PHP 5.1.4.

When browsing around a site in IE 6, occasionally a page will show up
as blank. Oddly enough, the IE address bar will not even update to show
the URL you are requesting.

1. The headers appear to be sent correctly.
2. Nothing untoward is reported in the error log (process crashes or
segfaults).
3. Only affects IE 6 (and possibly earlier). No problems with IE 7 or
Firefox.
4. Only happens when zlib.output_compression is on.
5. Only happens some of the time, but with all of the pages - between
20 and 60% of the time, depending on the machine I tested on.
6. Refreshing will always show the page correctly.
7. This has been verified by 10 distinct IE 6 clients.

I realise this may not be enough information; let me know what you need
and I'll try and get more data.






-- 
Edit this bug report at http://bugs.php.net/?id=38026&edit=1


#38007 [Opn->Fbk]: system() does not work under apache

2006-07-06 Thread tony2001
 ID:   38007
 Updated by:   [EMAIL PROTECTED]
 Reported By:  marcus dot yu at rogers dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: fedora core 5
 PHP Version:  5.1.4
 New Comment:

It works with 4.3.11 and SELinux enabled on the same machine with the
same configuration?
I can hardly believe in that.
Also, I don't really see how we can investigate it since we don't have
access to your machine and we've no idea of your configuration.


Previous Comments:


[2006-07-06 22:00:42] marcus dot yu at rogers dot com

it works with older verson of php (i.e. 4.3.11) while SELinux is
enforcing.



[2006-07-06 21:59:32] [EMAIL PROTECTED]

Well, then it's clearly not PHP problem.
You just need to configure SELinux appropriately to allow Apache to
execute binaries or just disable SELinux.



[2006-07-06 21:45:20] marcus dot yu at rogers dot com

Yes. It doesn't work with SELinux enforced. Why? 
The machine is going to host a web site over SSL. Any impact if SELinux
is disabled?



[2006-07-06 20:38:59] [EMAIL PROTECTED]

Did you enable SELinux ?



[2006-07-05 01:49:07] judas dot iscariote at gmail dot com

return value : 2
current CVS, apache 2.2.2 on Linux.



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/38007

-- 
Edit this bug report at http://bugs.php.net/?id=38007&edit=1


#38026 [Opn->Fbk]: IE 6 and zlib.output_compression sometimes does not work

2006-07-06 Thread tony2001
 ID:   38026
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at seven dot net dot nz
-Status:   Open
+Status:   Feedback
 Bug Type: Zlib Related
 Operating System: Windows XP
 PHP Version:  5.1.4
 New Comment:

>3. Only affects IE 6 (and possibly earlier). No problems with IE 7 or
Firefox.
Why do you report it here and not to MS support then?


Previous Comments:


[2006-07-06 22:26:08] php at seven dot net dot nz

Description:

Apache 2.0.56 or 2.2.2.
Windows XP Pro.
PHP 5.1.4.

When browsing around a site in IE 6, occasionally a page will show up
as blank. Oddly enough, the IE address bar will not even update to show
the URL you are requesting.

1. The headers appear to be sent correctly.
2. Nothing untoward is reported in the error log (process crashes or
segfaults).
3. Only affects IE 6 (and possibly earlier). No problems with IE 7 or
Firefox.
4. Only happens when zlib.output_compression is on.
5. Only happens some of the time, but with all of the pages - between
20 and 60% of the time, depending on the machine I tested on.
6. Refreshing will always show the page correctly.
7. This has been verified by 10 distinct IE 6 clients.

I realise this may not be enough information; let me know what you need
and I'll try and get more data.






-- 
Edit this bug report at http://bugs.php.net/?id=38026&edit=1


#38026 [NEW]: IE 6 and zlib.output_compression sometimes does not work

2006-07-06 Thread php at seven dot net dot nz
From: php at seven dot net dot nz
Operating system: Windows XP
PHP version:  5.1.4
PHP Bug Type: Zlib Related
Bug description:  IE 6 and zlib.output_compression sometimes does not work

Description:

Apache 2.0.56 or 2.2.2.
Windows XP Pro.
PHP 5.1.4.

When browsing around a site in IE 6, occasionally a page will show up as
blank. Oddly enough, the IE address bar will not even update to show the
URL you are requesting.

1. The headers appear to be sent correctly.
2. Nothing untoward is reported in the error log (process crashes or
segfaults).
3. Only affects IE 6 (and possibly earlier). No problems with IE 7 or
Firefox.
4. Only happens when zlib.output_compression is on.
5. Only happens some of the time, but with all of the pages - between 20
and 60% of the time, depending on the machine I tested on.
6. Refreshing will always show the page correctly.
7. This has been verified by 10 distinct IE 6 clients.

I realise this may not be enough information; let me know what you need
and I'll try and get more data.


-- 
Edit bug report at http://bugs.php.net/?id=38026&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38026&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38026&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38026&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38026&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=38026&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=38026&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=38026&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=38026&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=38026&r=support
Expected behavior:http://bugs.php.net/fix.php?id=38026&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=38026&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=38026&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38026&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38026&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38026&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=38026&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=38026&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38026&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=38026&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=38026&r=mysqlcfg


#38007 [Bgs->Opn]: system() does not work under apache

2006-07-06 Thread marcus dot yu at rogers dot com
 ID:   38007
 User updated by:  marcus dot yu at rogers dot com
 Reported By:  marcus dot yu at rogers dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: fedora core 5
 PHP Version:  5.1.4
 New Comment:

it works with older verson of php (i.e. 4.3.11) while SELinux is
enforcing.


Previous Comments:


[2006-07-06 21:59:32] [EMAIL PROTECTED]

Well, then it's clearly not PHP problem.
You just need to configure SELinux appropriately to allow Apache to
execute binaries or just disable SELinux.



[2006-07-06 21:45:20] marcus dot yu at rogers dot com

Yes. It doesn't work with SELinux enforced. Why? 
The machine is going to host a web site over SSL. Any impact if SELinux
is disabled?



[2006-07-06 20:38:59] [EMAIL PROTECTED]

Did you enable SELinux ?



[2006-07-05 01:49:07] judas dot iscariote at gmail dot com

return value : 2
current CVS, apache 2.2.2 on Linux.



[2006-07-04 20:01:38] marcus dot yu at rogers dot com

yes. even use /bin/ls got the same result.



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/38007

-- 
Edit this bug report at http://bugs.php.net/?id=38007&edit=1


#38007 [Opn->Bgs]: system() does not work under apache

2006-07-06 Thread tony2001
 ID:   38007
 Updated by:   [EMAIL PROTECTED]
 Reported By:  marcus dot yu at rogers dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: fedora core 5
 PHP Version:  5.1.4
 New Comment:

Well, then it's clearly not PHP problem.
You just need to configure SELinux appropriately to allow Apache to
execute binaries or just disable SELinux.


Previous Comments:


[2006-07-06 21:45:20] marcus dot yu at rogers dot com

Yes. It doesn't work with SELinux enforced. Why? 
The machine is going to host a web site over SSL. Any impact if SELinux
is disabled?



[2006-07-06 20:38:59] [EMAIL PROTECTED]

Did you enable SELinux ?



[2006-07-05 01:49:07] judas dot iscariote at gmail dot com

return value : 2
current CVS, apache 2.2.2 on Linux.



[2006-07-04 20:01:38] marcus dot yu at rogers dot com

yes. even use /bin/ls got the same result.



[2006-07-04 19:42:34] [EMAIL PROTECTED]

Is ls binary in the path?



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/38007

-- 
Edit this bug report at http://bugs.php.net/?id=38007&edit=1


#38007 [Fbk->Opn]: system() does not work under apache

2006-07-06 Thread marcus dot yu at rogers dot com
 ID:   38007
 User updated by:  marcus dot yu at rogers dot com
 Reported By:  marcus dot yu at rogers dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: fedora core 5
 PHP Version:  5.1.4
 New Comment:

Yes. It doesn't work with SELinux enforced. Why? 
The machine is going to host a web site over SSL. Any impact if SELinux
is disabled?


Previous Comments:


[2006-07-06 20:38:59] [EMAIL PROTECTED]

Did you enable SELinux ?



[2006-07-05 01:49:07] judas dot iscariote at gmail dot com

return value : 2
current CVS, apache 2.2.2 on Linux.



[2006-07-04 20:01:38] marcus dot yu at rogers dot com

yes. even use /bin/ls got the same result.



[2006-07-04 19:42:34] [EMAIL PROTECTED]

Is ls binary in the path?



[2006-07-04 16:40:13] marcus dot yu at rogers dot com

Description:

The function system() does not work in PHP 5.1.4 under Apache 2.2.0+ in
fedora core 5. The kernel is 2.6.17-1.2139_FC5. The return value is 127.
If runs as shell script, the function works. The safe mode is off. It
was tested on both Apache 2.2.0 and 2.2.2.

Reproduce code:
---


Expected result:

list all files in the working directory just as run 'ls -l' in command
line. 
and the return value is 0. 

Actual result:
--
nothing. the return value is 127. 

In fact, if modified the code a little bit and run it as shell script,
it works. 







-- 
Edit this bug report at http://bugs.php.net/?id=38007&edit=1


#38007 [Opn->Fbk]: system() does not work under apache

2006-07-06 Thread tony2001
 ID:   38007
 Updated by:   [EMAIL PROTECTED]
 Reported By:  marcus dot yu at rogers dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: fedora core 5
 PHP Version:  5.1.4
 New Comment:

Did you enable SELinux ?


Previous Comments:


[2006-07-05 01:49:07] judas dot iscariote at gmail dot com

return value : 2
current CVS, apache 2.2.2 on Linux.



[2006-07-04 20:01:38] marcus dot yu at rogers dot com

yes. even use /bin/ls got the same result.



[2006-07-04 19:42:34] [EMAIL PROTECTED]

Is ls binary in the path?



[2006-07-04 16:40:13] marcus dot yu at rogers dot com

Description:

The function system() does not work in PHP 5.1.4 under Apache 2.2.0+ in
fedora core 5. The kernel is 2.6.17-1.2139_FC5. The return value is 127.
If runs as shell script, the function works. The safe mode is off. It
was tested on both Apache 2.2.0 and 2.2.2.

Reproduce code:
---


Expected result:

list all files in the working directory just as run 'ls -l' in command
line. 
and the return value is 0. 

Actual result:
--
nothing. the return value is 127. 

In fact, if modified the code a little bit and run it as shell script,
it works. 







-- 
Edit this bug report at http://bugs.php.net/?id=38007&edit=1


#38018 [Opn->Bgs]: __destruct called if __wakeup threw an exception

2006-07-06 Thread tony2001
 ID:   38018
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php dot bugs at login dot hedim dot ch
-Status:   Open
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: irrelevant
 PHP Version:  5.1.4
 New Comment:

Ok, let me explain how it works:
1) we got a serialized object.
2) unserialize() creates an object #2.
3) unserialize() looks for __wakeup() function and calls it.
4) exception is thrown.
5) unserialize() fails and destroys it's result value (to prevent
memory leak) - here is where __destruct() for object #2 is called.
6) engine detects an unhandled exception and exit()'s.
All of this is expected and I don't see any bugs here.


Previous Comments:


[2006-07-06 00:40:41] php dot bugs at login dot hedim dot ch

Thank you for your response.

While I admit that the code example I gave was confusing, I believe it
is not bogus. It is true that there is only one call to __destruct with
the changed code, but it's the wrong one. The correct call to __destruct
has disappeared for a different reason.

This is what happens with the changed code: Because the Foo instance #1
is assigned to $var, it would only be destructed when $var goes out of
scope or (as in this case) when the script terminates (normally).

When unserializing $str, __wakeup is called on the unserialized Foo
instance #2 and throws an exception. Then, __destruct is called on Foo
instance #2. This is imho wrong because Foo instance #2 doesn't really
exist. The exception indicates it could not be reconstructed, just like
an exception from __construct does. If Foo instance #2 doesn't really
exists, there is nothing to destruct and __destruct should not be
called.

The correct call to __destruct on Foo instance #1 doesn't happen
anymore because the above exception terminates the script with a fatal
error. Wrapping a try { } around the unserialize would bring the call
to Foo #1's __destruct back.

To prove this, I have extended the reproduce code (see below) to also
print out which object is destructed.

The point is this: If __destruct is not called for objects that throw
an exception from __construct, then it should not be called either for
those that throw an exception from __wakeup. In both cases, the object
"could not be (re-) constructed", therefore there is nothing to
destruct.

I hope this makes things clearer and I apologize for the confusing
description and code example before.

Thank you for looking into this matter again.

Extended reproduce code:

class Foo
{
function __wakeup()
{
throw new Exception;
}

function __destruct()
{
echo "hello from $this's destructor\n";
}
}

$var = new Foo;
echo "$var\n";
$str = serialize($var);
unserialize($str);

Expected result:

Object id #1
Fatal error: Uncaught exception 'Exception' [...]
No output from any destructor. The exception terminates the script
before any object can be destructed.

Actual result:
--
Object id #1
hello from Object id #2's destructor
Fatal error: Uncaught exception 'Exception' [...]



[2006-07-05 21:36:24] [EMAIL PROTECTED]

Change your code to this:

$var = new Foo;
$str = serialize($var);
unserialize($str);

and voila - no second destructor call.
The first destructor is called for the temporary var.



[2006-07-05 20:31:32] php dot bugs at login dot hedim dot ch

Description:

If __wakeup threw an exception when unserializing an object, __destruct
is called on that object. For the same reasons as __destruct is not
called if __construct threw an exception (see bug #29368), it should
not be called here either.

Reproduce code:
---
class Foo
{
function __wakeup()
{
throw new Exception;
}

function __destruct()
{
echo "hello from destructor\n";
}
}

unserialize(serialize(new Foo));


Expected result:

hello from destructor (from the destructor of the object to be
serialized)

Actual result:
--
hello from destructor (from the destructor of the object to be
serialized)
hello from destructor (from the destructor of the object that fails to
unserialize)





-- 
Edit this bug report at http://bugs.php.net/?id=38018&edit=1


#37998 [Opn->Asn]: Parent process lost MySQLi connection after child process gone

2006-07-06 Thread tony2001
 ID:   37998
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dbs at is dot ua
-Status:   Open
+Status:   Assigned
 Bug Type: MySQLi related
 Operating System: linux-2.4.32
 PHP Version:  5.1.4
-Assigned To:  
+Assigned To:  georg


Previous Comments:


[2006-07-03 15:13:27] dbs at is dot ua

Description:

Parent process lost MySQLi connection when his child gone by external
kill (*NIX `kill') or from self by posix_kill($pid, $sig);

Have different database users, different databases, separate
connections.

Reproduce code:
---
#!/usr/local/bin/php
ident = $ident;
$this->pid = posix_getpid();
$this->func = $f;
pcntl_signal(SIGTERM, array(&$this, "sig_Chandler"));
$this->func->db_connect(MYSQL_USER2, MYSQL_PASS2, MYSQL_DB2,
$this->db, $this);
$this->go();
$this->func->db_close($this->db);
}

function go() {
while ($this->daemon) {
if ($rs = $this->db->query("select " . $this->ident)) {
list($id) = $rs->fetch_row();
echo "\tchild process [".$this->pid."]: ".$id."\r\n";
$rs->close();
}
sleep(3);
}
}

function sig_Chandler($sig) {
switch ($sig) {
case SIGTERM:
echo "\tchild process [".$this->pid."]: SIGTERM
received\r\n";
$this->daemon = false;
break;
default:
}
}
}

class WTF_parent {

var $pid;  // my process ID
var $func; // some functions
var $db;   // db object
var $childs = array();
var $daemon = true;

function WTF_parent() {
$this->pid = posix_getpid();
$this->func = new func();
pcntl_signal(SIGTERM, array(&$this, "sig_Phandler"));
$this->func->db_connect(MYSQL_USER1, MYSQL_PASS1, MYSQL_DB1,
$this->db, $this);
$this->go();
$this->func->db_close($this->db);
}

function go() {
for ($thread_no = 1; $thread_no <= MAX_THREADS; $thread_no++)
{
$pid = pcntl_fork();
if ($pid == -1) {
die("can't fork!");
} elseif ($pid != 0) {
// parent space
$this->childs[$pid] = $thread_no;
} else {
// child space
$child = new WTF_child($thread_no, $this->func);
die();
}
}

while ($this->daemon) {
foreach ($this->childs as $cpid => $ident) {
$rs = pcntl_waitpid($cpid, &$status, WNOHANG);
if ($rs == $cpid || $rs == -1) {
echo "parent process [".$this->pid."]: who kill my
thread #".$ident." with PID = ".$cpid." ? :(\r\n";
unset($this->childs[$cpid]);
}
}
if ($rs = $this->db->query("select 'nice job'")) {
list($str) = $rs->fetch_row();
echo "parent process [".$this->pid."]: ".$str."\r\n";
$rs->close();
}
sleep(5);
}
}

function sig_Phandler($sig) {
switch ($sig) {
case SIGTERM:
echo "parent process [".$this->pid."]: SIGTERM
received\r\n";
$this->daemon = false;
break;
default:
}
}
}

class func {

function db_connect($user, $pass, $db, &$db_obj, &$caller) {
$db_obj = new mysqli(MYSQL_HOST, $user, $pass, $db);
if (mysqli_connect_errno()) {
echo "[", get_class($caller), ", PID = ", $caller->pid, "]:
database connection failed: " , mysqli_connect_error();
die();
}
}

function db_close(&$db_obj) {
$db_obj->close();
}
}

$parent = new WTF_parent();

?>







-- 
Edit this bug report at http://bugs.php.net/?id=37998&edit=1


#38006 [Opn]: Cannot add a 'Stream wrapped' path to include path

2006-07-06 Thread tony2001
 ID:   38006
 Updated by:   [EMAIL PROTECTED]
 Reported By:  flconseil at yahoo dot fr
 Status:   Open
-Bug Type: Streams related
+Bug Type: Feature/Change Request
 Operating System: Unix & Windows
 PHP Version:  5.1.4
 New Comment:

Reclassified as feature request.


Previous Comments:


[2006-07-04 15:02:38] flconseil at yahoo dot fr

Description:

After having declared a new stream wrapper, I want to add a sub-path of
this stram wrapper to the include path. The set_onclude_path() works
fine, but, then, PHP does not use this path when searching a file
through the include path.

It seems annoying, but normal on Unix, as the path separator is ':'.
But it also fails on Windows, where the path separator is ';'.

It will be hard to maintain backward compatibility but, if dirname() is
able to work on these paths, I think that it should be possible to
append them to the include path.

One solution would be to consider the include path as an array, instead
of maintaining it as a string. The get_include_path() and
set_include_path() could be kept as compatibility functions, the
php.ini file could be kept the same, but there would be two new
functions get_include_path_array() and set_include_path_array() which
would work with arrays and would be compatible with stream wrapper
paths. More important, the PHP engine would only use the array
internally and could find files in stream wrapped pseudo-directories.
The stream wrapper should be ready to support '/' and '\' characters as
directory separators, if they want to work on Windows and Unix.


Reproduce code:
---
1. I register a stream wrapper for the 'phk' prefix

2. 'include('phk://example/ex.php');' works OK. My virtual file is
included.

3. I add this path to the include path :
set_include_path(get_include_path().PATH_SEPARATOR.'phk://example');

4. I try to 'include(ex.php)' without specifying the path, as it is in
the include path -> it fails.

Expected result:

file included

Actual result:
--
PHP Warning:  include(ex.php): failed to open stream: No such file or
directory in ... on line ...
PHP Warning:  include(): Failed opening 'ex.php' for inclusion
(include_path='/logi/http/php/lib/php:/logi/http/php/lib/adodb:phk://example')
in ... on line ...






-- 
Edit this bug report at http://bugs.php.net/?id=38006&edit=1


#37957 [Csd]: Timeout when setting nodeValue if entity in existing value

2006-07-06 Thread jfowlie at navarik dot com
 ID:   37957
 User updated by:  jfowlie at navarik dot com
 Reported By:  jfowlie at navarik dot com
 Status:   Closed
 Bug Type: DOM XML related
 Operating System: Linux
 PHP Version:  5.1.4
 New Comment:

In case anyone wants a workaround...

Check that a node hasChildNodes and that the firstChild->nodeType is
XML_TEXT_NODE. Then you can just set the value of the node with
firstChild->nodeValue

I.e. change the foreach loop in the reproduce code to:

foreach($bookmarks as $bookmark_node){
++$count;
$id_value = $bookmark_node->getAttribute('id');
print "Id value: ".$id_value."\n";
if ($bookmark_node->hasChildNodes() &&
$bookmark_node->firstChild->nodeType == XML_TEXT_NODE) {
print "Node value: ".$bookmark_node->firstChild->nodeValue."\n";
print "Setting nodeValue to 'test$count'\n";
$bookmark_node->firstChild->nodeValue = 'test'.$count;
print "Node value has been set!
({$bookmark_node->firstChild->nodeValue})\n";
}
}


Previous Comments:


[2006-07-06 19:42:23] [EMAIL PROTECTED]

It'll be ready when it's ready.



[2006-07-06 19:32:38] jfowlie at navarik dot com

Thanks. The CVS snapshot for v5.2 has fixed the issue.

Any word on when this version will become the official release? i.e.
production ready? 

I can't use a development version of php on our production servers...

Cheers



[2006-06-29 08:19:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Can't reproduce.



[2006-06-29 06:16:51] jfowlie at navarik dot com

Description:

I was attempting to update the content of some anchor elements by
setting the nodeValue. It doesn't seem to matter how high I set the
max_execution_time limit, if there is a   entity in the nodeValue,
PHP just hangs until it times out. (It works just fine with &
though...)


Reproduce code:
---
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>

Untitled



Link 1
Link 2 &
Link 3  


XHTML;


$dom = new DOMDocument('1.0','iso-8859-1');

// I tried it with this set to true or false
//$xml->preserveWhiteSpace = FALSE;

// You need this, otherwise the nbsp entity is not valid
$dom->resolveExternals = TRUE;

$dom->loadXML($xhtml);

$bookmarks = $dom->getElementsByTagName('a');

$count = 0;

foreach($bookmarks as $bookmark_node){
++$count;
$id_value = $bookmark_node->getAttribute('id');
print "Id value: ".$id_value."";
print "Node value: ".$bookmark_node->nodeValue."";
print "Setting nodeValue to 'test$count'";
$bookmark_node->nodeValue = 'test'.$count;
print "Node value has been set!
({$bookmark_node->nodeValue})";
}
?>


Expected result:

Id value: id-goes-here
Node value: Link 1
Setting nodeValue to 'test1'
Node value has been set! (test1)

Id value: id-2-goes-here
Node value: Link 2 &
Setting nodeValue to 'test2'
Node value has been set! (test2)

Id value: id-3-goes-here
Node value: Link 3
Setting nodeValue to 'test3'
Node value has been set! (test3)


Actual result:
--
Id value: id-goes-here
Node value: Link 1
Setting nodeValue to 'test1'
Node value has been set! (test1)

Id value: id-2-goes-here
Node value: Link 2 &
Setting nodeValue to 'test2'
Node value has been set! (test2)

Id value: id-3-goes-here
Node value: Link 3
Setting nodeValue to 'test3'

Fatal error: Maximum execution time of 30 seconds exceeded in
nbsp-dom-test.php on line 39






-- 
Edit this bug report at http://bugs.php.net/?id=37957&edit=1


#38017 [Opn->Fbk]: Segfault on xml_parser_create() call

2006-07-06 Thread tony2001
 ID:   38017
 Updated by:   [EMAIL PROTECTED]
 Reported By:  baco at infomaniak dot ch
-Status:   Open
+Status:   Feedback
 Bug Type: XML related
 Operating System: Linux Debian Sarge
 PHP Version:  5.1.4
 New Comment:

I'm still unable to reproduce it.
Please check if you can replicate it on another machine (preferably
with different Linux distro).


Previous Comments:


[2006-07-05 21:23:55] baco at infomaniak dot ch

it look the same

./configure \
--prefix=${PREFIX} \
--mandir=/usr/share/man \
--with-apxs=/opt/apache/bin/apxs \
--enable-debug \
--disable-all \
--enable-xml \
--enable-libxml \
\
--with-libexpat-dir

$ gdb /opt/apache/bin/httpd 
GNU gdb 6.3-debian
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 "i386-linux"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) run -X
Starting program: /opt/apache/bin/httpd -X


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210223328 (LWP 31545)]
0xb7e52077 in memcpy () from /lib/tls/libc.so.6
(gdb) 

#0  0xb7e52077 in memcpy () from /lib/tls/libc.so.6
#1  0x0808b76f in XML_Parse ()
#2  0x0853b3c4 in ?? ()
#3  0x0039 in ?? ()
#4  0xb7c1314b in _array_init (arg=0x4, __zend_filename=0x852ec3c "",
__zend_lineno=0)
at
/tmp/INFOMANIAK/BUILD/php5.2-200607051830/20060705223915/php5.2-200607051830/Zend/zend_API.c:821
#5  0xb7c32e04 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff80430) at zend_vm_execute.h:200
#6  0xb7c361a4 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbff80430) at zend_vm_execute.h:1642
#7  0xb7c329bb in execute (op_array=0x853b1d4) at zend_vm_execute.h:92
#8  0xb7c10f81 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at
/tmp/INFOMANIAK/BUILD/php5.2-200607051830/20060705223915/php5.2-200607051830/Zend/zend.c:1110
#9  0xb7bc5fe6 in php_execute_script (primary_file=0xbff827f0) at
/tmp/INFOMANIAK/BUILD/php5.2-200607051830/20060705223915/php5.2-200607051830/main/main.c:1748
#10 0xb7c7f0a7 in apache_php_module_main (r=0x812289c,
display_source_mode=0)
at
/tmp/INFOMANIAK/BUILD/php5.2-200607051830/20060705223915/php5.2-200607051830/sapi/apache/sapi_apache.c:53
#11 0xb7c7ff1b in send_php (r=0x812289c, display_source_mode=0,
filename=0x81245b4
"/home/www/555a1d69b0f4be4d6259cd00910c8ce1/web/baco/test.php")
at
/tmp/INFOMANIAK/BUILD/php5.2-200607051830/20060705223915/php5.2-200607051830/sapi/apache/mod_php5.c:665
#12 0xb7c7ff6f in send_parsed_php (r=0x812289c) at
/tmp/INFOMANIAK/BUILD/php5.2-200607051830/20060705223915/php5.2-200607051830/sapi/apache/mod_php5.c:680
#13 0x08055dff in ap_invoke_handler ()
#14 0x0812289c in ?? ()
#15 0xb7d05689 in zend_vm_decode.1 () from
/opt/apache/libexec/libphp5.so
#16 0x0017 in ?? ()
#17 0x in ?? ()
#18 0x in ?? ()
#19 0x in ?? ()
#20 0x080c19b4 in ?? ()
#21 0x080c19a4 in ?? ()
#22 0x08122ba4 in ?? ()
#23 0xbff82b90 in ?? ()
#24 0x0002 in ?? ()
#25 0x0805592c in run_method ()
#26 0x0017 in ?? ()
#27 0x08513138 in ?? ()
#28 0x0812289c in ?? ()
#29 0x083cac3c in ?? ()
#30 0x0812289c in ?? ()
#31 0xb7f69d32 in add_env_module_vars_unset () from
/opt/apache/libexec/mod_env.so
#32 0x0017 in ?? ()
#33 0x in ?? ()
#34 0x083cac3c in ?? ()
#35 0x08513138 in ?? ()
#36 0x0806f3c1 in process_request_internal ()
#37 0x0812289c in ?? ()
#38 0x080af210 in status_lines ()
#39 0xbff82d18 in ?? ()
#40 0x080515ff in ap_table_get ()
#41 0x08124224 in ?? ()
#42 0x080acece in priorities ()
#43 0xb7ded974 in __libc_start_main () from /lib/tls/libc.so.6
#44 0xb7ded974 in __libc_start_main () from /lib/tls/libc.so.6
#45 0x08050051 in _start () at ../sysdeps/i386/elf/start.S:102
(gdb)



[2006-07-05 21:13:23] [EMAIL PROTECTED]

Did the GDB backtrace change when you removed all those ./configure
options ?



[2006-07-05 21:01:41] baco at infomaniak dot ch

Same issue with 
5e8837ebfe06a3d9b121e763ee34a969 php5.2-latest.tar.gz (200607051830)

So to help you to analyse the problem with 
--enable-xml --enable-libxml --with-libexpat-dir

I have pushed files to

http://imu77.infomaniak.ch/baco/

php5.2-200607051830-output.log -- the output of my compilation script
php5.2-200607051830.tar.gz -- the php source with compiled objects on
Debian Sarge and all Makefile generated by configure.

I cannot do more. Our issue is resolved by removing with-libexpat-dir
but the bug still present if libexpat used on our server.

---

#38015 [Opn->Fbk]: Can not set PDO_MYSQL_ATTR_MAX_BUFFER_SIZE

2006-07-06 Thread tony2001
 ID:   38015
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sunaoka+bugs dot php dot net at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: PDO related
 Operating System: Solaris
 PHP Version:  5.1.4
 New Comment:

Expected result:

int(1048576)
bool(true)
int(1048576)


Right, this is the expected and ACTUAL result.
I don't see any problems there.


Previous Comments:


[2006-07-06 08:41:22] sunaoka+bugs dot php dot net at gmail dot com

Thank you for your comment. I try using CVS snapshot, but I have
another problem.
So, I can set PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, but it can not set the
value.

Reproduce code:
---
$db = new PDO('mysql:host=localhost;dbname=test', 'user', 'pass');
var_dump($db->getAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE));
var_dump($db->setAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE, 1024 * 1024
* 10));
var_dump($db->getAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE));

Expected result:

int(1048576)
bool(true)
int(1048576)



[2006-07-05 17:32:50] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





[2006-07-05 13:28:41] sunaoka+bugs dot php dot net at gmail dot com

Description:

I'm using pdo_mysql client library 4.1.20.
I need treat the data of 1MB or more.
But I can not set PDO_MYSQL_ATTR_MAX_BUFFER_SIZE.

Reproduce code:
---
$db = new PDO('mysql:host=localhost;dbname=test', 'user', 'pass');
var_dump($db->setAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE, 1024 * 1024
* 10));


Expected result:

bool(false)






-- 
Edit this bug report at http://bugs.php.net/?id=38015&edit=1


#37957 [Opn->Csd]: Timeout when setting nodeValue if entity in existing value

2006-07-06 Thread tony2001
 ID:   37957
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jfowlie at navarik dot com
-Status:   Open
+Status:   Closed
 Bug Type: DOM XML related
 Operating System: Linux
 PHP Version:  5.1.4
 New Comment:

It'll be ready when it's ready.


Previous Comments:


[2006-07-06 19:32:38] jfowlie at navarik dot com

Thanks. The CVS snapshot for v5.2 has fixed the issue.

Any word on when this version will become the official release? i.e.
production ready? 

I can't use a development version of php on our production servers...

Cheers



[2006-06-29 08:19:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Can't reproduce.



[2006-06-29 06:16:51] jfowlie at navarik dot com

Description:

I was attempting to update the content of some anchor elements by
setting the nodeValue. It doesn't seem to matter how high I set the
max_execution_time limit, if there is a   entity in the nodeValue,
PHP just hangs until it times out. (It works just fine with &
though...)


Reproduce code:
---
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>

Untitled



Link 1
Link 2 &
Link 3  


XHTML;


$dom = new DOMDocument('1.0','iso-8859-1');

// I tried it with this set to true or false
//$xml->preserveWhiteSpace = FALSE;

// You need this, otherwise the nbsp entity is not valid
$dom->resolveExternals = TRUE;

$dom->loadXML($xhtml);

$bookmarks = $dom->getElementsByTagName('a');

$count = 0;

foreach($bookmarks as $bookmark_node){
++$count;
$id_value = $bookmark_node->getAttribute('id');
print "Id value: ".$id_value."";
print "Node value: ".$bookmark_node->nodeValue."";
print "Setting nodeValue to 'test$count'";
$bookmark_node->nodeValue = 'test'.$count;
print "Node value has been set!
({$bookmark_node->nodeValue})";
}
?>


Expected result:

Id value: id-goes-here
Node value: Link 1
Setting nodeValue to 'test1'
Node value has been set! (test1)

Id value: id-2-goes-here
Node value: Link 2 &
Setting nodeValue to 'test2'
Node value has been set! (test2)

Id value: id-3-goes-here
Node value: Link 3
Setting nodeValue to 'test3'
Node value has been set! (test3)


Actual result:
--
Id value: id-goes-here
Node value: Link 1
Setting nodeValue to 'test1'
Node value has been set! (test1)

Id value: id-2-goes-here
Node value: Link 2 &
Setting nodeValue to 'test2'
Node value has been set! (test2)

Id value: id-3-goes-here
Node value: Link 3
Setting nodeValue to 'test3'

Fatal error: Maximum execution time of 30 seconds exceeded in
nbsp-dom-test.php on line 39






-- 
Edit this bug report at http://bugs.php.net/?id=37957&edit=1


#37957 [Fbk->Opn]: Timeout when setting nodeValue if entity in existing value

2006-07-06 Thread jfowlie at navarik dot com
 ID:   37957
 User updated by:  jfowlie at navarik dot com
 Reported By:  jfowlie at navarik dot com
-Status:   Feedback
+Status:   Open
 Bug Type: DOM XML related
 Operating System: Linux
 PHP Version:  5.1.4
 New Comment:

Thanks. The CVS snapshot for v5.2 has fixed the issue.

Any word on when this version will become the official release? i.e.
production ready? 

I can't use a development version of php on our production servers...

Cheers


Previous Comments:


[2006-06-29 08:19:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Can't reproduce.



[2006-06-29 06:16:51] jfowlie at navarik dot com

Description:

I was attempting to update the content of some anchor elements by
setting the nodeValue. It doesn't seem to matter how high I set the
max_execution_time limit, if there is a   entity in the nodeValue,
PHP just hangs until it times out. (It works just fine with &
though...)


Reproduce code:
---
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>

Untitled



Link 1
Link 2 &
Link 3  


XHTML;


$dom = new DOMDocument('1.0','iso-8859-1');

// I tried it with this set to true or false
//$xml->preserveWhiteSpace = FALSE;

// You need this, otherwise the nbsp entity is not valid
$dom->resolveExternals = TRUE;

$dom->loadXML($xhtml);

$bookmarks = $dom->getElementsByTagName('a');

$count = 0;

foreach($bookmarks as $bookmark_node){
++$count;
$id_value = $bookmark_node->getAttribute('id');
print "Id value: ".$id_value."";
print "Node value: ".$bookmark_node->nodeValue."";
print "Setting nodeValue to 'test$count'";
$bookmark_node->nodeValue = 'test'.$count;
print "Node value has been set!
({$bookmark_node->nodeValue})";
}
?>


Expected result:

Id value: id-goes-here
Node value: Link 1
Setting nodeValue to 'test1'
Node value has been set! (test1)

Id value: id-2-goes-here
Node value: Link 2 &
Setting nodeValue to 'test2'
Node value has been set! (test2)

Id value: id-3-goes-here
Node value: Link 3
Setting nodeValue to 'test3'
Node value has been set! (test3)


Actual result:
--
Id value: id-goes-here
Node value: Link 1
Setting nodeValue to 'test1'
Node value has been set! (test1)

Id value: id-2-goes-here
Node value: Link 2 &
Setting nodeValue to 'test2'
Node value has been set! (test2)

Id value: id-3-goes-here
Node value: Link 3
Setting nodeValue to 'test3'

Fatal error: Maximum execution time of 30 seconds exceeded in
nbsp-dom-test.php on line 39






-- 
Edit this bug report at http://bugs.php.net/?id=37957&edit=1


#37929 [Opn]: Simple multi-dimensional array uses tons of memory, gives none back to Apache2

2006-07-06 Thread joe at estara dot com
 ID:   37929
 User updated by:  joe at estara dot com
-Summary:  Use 'unserialize', then a large amount of memory is
   not returned to the OS
 Reported By:  joe at estara dot com
 Status:   Open
 Bug Type: Apache2 related
 Operating System: Linux
 PHP Version:  5.1.4, 4.4.0
 New Comment:

Arrays of arrays leak memory in many PHP versions.


Previous Comments:


[2006-07-01 00:15:27] joe at estara dot com

Here, fully contained version that will make a 131M leak in 12 lines. 
 "PHPLEAKS923889239823", 1
=> "PHPLEAK2349082349898");
   return $a;
}
for($i=0;$i<10;$i++)
  $zip[$i] = make_arr();
for($i=0;$i<10;$i++)
   preg_match("/asdfl/", $zip[$i]["00601"][0]);
?>



[2006-07-01 00:00:26] joe at estara dot com

It's 8 lines without comments.  You want me to write a script to make
the data file instead of just downloading it?




[2006-06-30 23:17:27] [EMAIL PROTECTED]

Please provide _SHORT_ and complete reproduce script.

A proper reproducing script starts with , is max.
10-20 lines long and does not require any external resources such as
databases, etc.



[2006-06-30 23:02:54] joe at estara dot com

Download an example here:
http://zeus-1.estara.com/php_mem_leak.zip



[2006-06-30 22:03:56] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the 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/37929

-- 
Edit this bug report at http://bugs.php.net/?id=37929&edit=1


#38025 [NEW]: Missing stream wrapper methods

2006-07-06 Thread flconseil at yahoo dot fr
From: flconseil at yahoo dot fr
Operating system: All
PHP version:  5.1.4
PHP Bug Type: Feature/Change Request
Bug description:  Missing stream wrapper methods

Description:

The following functions cannot be implemented in a stream wrapper because
the corresponding methods don't exist :

- chgrp & lchgrp
- chown &lchown
- chmod
- flock
- link & symlink/readlink
- touch

To be confirmed for :

- ftruncate
- realpath

For most of these (links, owner, mode), as the values can be returned by
stat/lstat() calls, PHP should provide a way to set/modify them.


-- 
Edit bug report at http://bugs.php.net/?id=38025&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38025&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38025&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38025&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38025&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=38025&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=38025&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=38025&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=38025&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=38025&r=support
Expected behavior:http://bugs.php.net/fix.php?id=38025&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=38025&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=38025&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38025&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38025&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38025&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=38025&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=38025&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38025&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=38025&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=38025&r=mysqlcfg



#37951 [Opn->Bgs]: Segfaul when using certain curl_setopt option

2006-07-06 Thread tony2001
 ID:   37951
 Updated by:   [EMAIL PROTECTED]
 Reported By:  headhunter at c-plusplus dot de
-Status:   Open
+Status:   Bogus
 Bug Type: cURL related
 Operating System: SLES 10.0 - 64 Bit
 PHP Version:  5.1.4
 New Comment:

>Andrew: Use the program "strace" for this.
Oh, please DON'T. strace output doesn't help.

>Configuring PHP with this option set to /usr/lib64, 
Because it should be --with-libdir=lib64 and not /usr/lib64.

Feel free to reopen the report if/when you have more info about it.


Previous Comments:


[2006-07-06 15:23:13] headhunter at c-plusplus dot de

The newest snapshot of today does not crash.
The script works, problem is fixed.
Do you still want to see the trace of the buggy php version?

Andrew: Use the program "strace" for this.

I haven't tried the MySQL thing though, please remember that this one
is broken for MySql[4,5] + Php <=5.14 and Suse10.0/RHEL 4.0!



[2006-07-06 14:43:46] andrew dot hill at m3 dot net

> There is --with-libdir configure option.

Configuring PHP with this option set to /usr/lib64, and the copy of the
mysql libraries (/usr/lib64/mysql) NOT in /usr/lib/mysql results in the
error:

"configure: error: Cannot find libmysqlclient under /usr."

> Please provide the backtrace

I have re-compiled PHP (the snapshot) with --enable-debug, but no core
file is generated, as far as I can see...



[2006-07-06 13:41:47] [EMAIL PROTECTED]

>I have also copied my MySQL 5.0 libraries from 
>/usr/lib64/mysql to /usr/lib/mysql to allow PHP to compile.
There is --with-libdir configure option.

>Any ideas?
Yeah, please provide the backtrace and try the snapshot.



[2006-07-06 13:33:39] andrew dot hill at m3 dot net

Hi,

I have the same issue on a RHEL 4.0 x86_64 machine. The listed example
script crashes as described above.

I have also copied my MySQL 5.0 libraries from /usr/lib64/mysql to
/usr/lib/mysql to allow PHP to compile.

In my case I was using PHP 5.0.4, but using the linked PHP 5.2 latest
dev release didn't resolve the issue.

Any ideas?

Thanks!

Andrew



[2006-07-06 01:00:01] php-bugs at lists dot php dot net

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".



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/37951

-- 
Edit this bug report at http://bugs.php.net/?id=37951&edit=1


#38023 [Opn->Bgs]: -c option does not work in command line when defined in the #!/bin/php line

2006-07-06 Thread tony2001
 ID:   38023
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hjubin27 at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: PHP options/info functions
 Operating System: Linux
 PHP Version:  5.1.4
 New Comment:

Duplicate of bug #37352.


Previous Comments:


[2006-07-06 15:17:12] hjubin27 at yahoo dot com

Description:

Under Linux (mandriva 2006.0) php 5.1.4
The -c php.ini-path does not work when invoqued as an argument in first
shell command line with a blank between 
the -c and the path



Reproduce code:
---
phpinfo.php (bogus version):

#!/usr/bin/php -c /home/hjubin/php.ini


phpinfowkr.php (workaround version):

#!/usr/bin/php -c/home/hjubin/php.ini



Expected result:

Using the following command line:
php -c /home/hjubin phpinfo.php | grep php.ini
Result: 
Configuration File (php.ini) Path => /ldisk/home/hjubin/php.ini
That is CORRECT
sing the following command line:
phpinfowkr.php | grep php.ini
Result: 
Configuration File (php.ini) Path => /ldisk/home/hjubin/php.ini
That is CORRECT

Actual result:
--
Using the following command line:
./phpinfo.php | grep php.ini
returns : 
Configuration File (php.ini) Path => /etc





-- 
Edit this bug report at http://bugs.php.net/?id=38023&edit=1


#37951 [NoF->Opn]: Segfaul when using certain curl_setopt option

2006-07-06 Thread headhunter at c-plusplus dot de
 ID:   37951
 User updated by:  headhunter at c-plusplus dot de
 Reported By:  headhunter at c-plusplus dot de
-Status:   No Feedback
+Status:   Open
 Bug Type: cURL related
 Operating System: SLES 10.0 - 64 Bit
 PHP Version:  5.1.4
 New Comment:

The newest snapshot of today does not crash.
The script works, problem is fixed.
Do you still want to see the trace of the buggy php version?

Andrew: Use the program "strace" for this.

I haven't tried the MySQL thing though, please remember that this one
is broken for MySql[4,5] + Php <=5.14 and Suse10.0/RHEL 4.0!


Previous Comments:


[2006-07-06 14:43:46] andrew dot hill at m3 dot net

> There is --with-libdir configure option.

Configuring PHP with this option set to /usr/lib64, and the copy of the
mysql libraries (/usr/lib64/mysql) NOT in /usr/lib/mysql results in the
error:

"configure: error: Cannot find libmysqlclient under /usr."

> Please provide the backtrace

I have re-compiled PHP (the snapshot) with --enable-debug, but no core
file is generated, as far as I can see...



[2006-07-06 13:41:47] [EMAIL PROTECTED]

>I have also copied my MySQL 5.0 libraries from 
>/usr/lib64/mysql to /usr/lib/mysql to allow PHP to compile.
There is --with-libdir configure option.

>Any ideas?
Yeah, please provide the backtrace and try the snapshot.



[2006-07-06 13:33:39] andrew dot hill at m3 dot net

Hi,

I have the same issue on a RHEL 4.0 x86_64 machine. The listed example
script crashes as described above.

I have also copied my MySQL 5.0 libraries from /usr/lib64/mysql to
/usr/lib/mysql to allow PHP to compile.

In my case I was using PHP 5.0.4, but using the linked PHP 5.2 latest
dev release didn't resolve the issue.

Any ideas?

Thanks!

Andrew



[2006-07-06 01:00:01] php-bugs at lists dot php dot net

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".



[2006-06-28 18:54:44] [EMAIL PROTECTED]

Apparently it's a snapshot.
You don't have to INSTALL it, the only thing you need to do is to
compile the snapshot and run your script using it. 



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/37951

-- 
Edit this bug report at http://bugs.php.net/?id=37951&edit=1


#38021 [NEW]: Uncaught exception 'com_exception'

2006-07-06 Thread zyablik at insc dot ru
From: zyablik at insc dot ru
Operating system: XP SP2 IIS onboard
PHP version:  5.1.4
PHP Bug Type: COM related
Bug description:  Uncaught exception 'com_exception'

Description:

Fatal Exeption on new COM("Word.Application")


Reproduce code:
---
Very well known example for testing "word.Application" COM object.
my line 13 is:

$word = new COM("Word.Application");
... the same as expected
$word->Documents->Add();



Expected result:

Creation of new test word file.

Actual result:
--
Fatal error: Uncaught exception 'com_exception' with message
'Source: Microsoft WordDescription: Could not open
macro storage.' in D:\dir\com.php:13 Stack trace: #0 D:\dir\com.php(13):
variant->Add() #1 {main} thrown in D:\dir\com.php on line 13

What does that means?

-- 
Edit bug report at http://bugs.php.net/?id=38021&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38021&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38021&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38021&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38021&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=38021&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=38021&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=38021&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=38021&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=38021&r=support
Expected behavior:http://bugs.php.net/fix.php?id=38021&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=38021&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=38021&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38021&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38021&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38021&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=38021&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=38021&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38021&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=38021&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=38021&r=mysqlcfg


#38023 [NEW]: -c option does not work in command line when defined in the #!/bin/php line

2006-07-06 Thread hjubin27 at yahoo dot com
From: hjubin27 at yahoo dot com
Operating system: Linux
PHP version:  5.1.4
PHP Bug Type: PHP options/info functions
Bug description:  -c option does not work in command line when defined in the 
#!/bin/php line 

Description:

Under Linux (mandriva 2006.0) php 5.1.4
The -c php.ini-path does not work when invoqued as an argument in first
shell command line with a blank between 
the -c and the path



Reproduce code:
---
phpinfo.php (bogus version):

#!/usr/bin/php -c /home/hjubin/php.ini


phpinfowkr.php (workaround version):

#!/usr/bin/php -c/home/hjubin/php.ini



Expected result:

Using the following command line:
php -c /home/hjubin phpinfo.php | grep php.ini
Result: 
Configuration File (php.ini) Path => /ldisk/home/hjubin/php.ini
That is CORRECT
sing the following command line:
phpinfowkr.php | grep php.ini
Result: 
Configuration File (php.ini) Path => /ldisk/home/hjubin/php.ini
That is CORRECT

Actual result:
--
Using the following command line:
./phpinfo.php | grep php.ini
returns : 
Configuration File (php.ini) Path => /etc

-- 
Edit bug report at http://bugs.php.net/?id=38023&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38023&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38023&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38023&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38023&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=38023&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=38023&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=38023&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=38023&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=38023&r=support
Expected behavior:http://bugs.php.net/fix.php?id=38023&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=38023&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=38023&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38023&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38023&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38023&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=38023&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=38023&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38023&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=38023&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=38023&r=mysqlcfg


#38022 [NEW]: glob() problems

2006-07-06 Thread flconseil at yahoo dot fr
From: flconseil at yahoo dot fr
Operating system: All
PHP version:  5.1.4
PHP Bug Type: Feature/Change Request
Bug description:  glob() problems

Description:

Today, glob() calls the libc glob() function, with the following
problems:

- Possible inconsistencies between implementations (POSIX compliance)

- fnmatch not available outside of Unix : an internal glob()
implementation would bring an internal fnmatch() implementation, which
would allow fnmatch() on every platform.

- Important: on most (every ?) Unix systems, glob() is using stat()
instead of lstat(). Thus, broken links are ignored. Inconsistant with a
naive 'ls' which lists everything in the directory.

- The current glob() implementation in PHP (ext/standard/dir.c) assumes
that all returned matches are in the same directory, which is wrong. So,
the 'safe mode' and 'open_basedir' checks are wrong.

- glob() does not support streams, although most other directory functions
support them. It cannot be done without implementing glob() internally.

- Apart from glob(), the chdir() and getcwd() functions should also
support stream-wrapped directories. It would be easy to implement but it
must be synchronized with the support of stream wrapped paths in the
include path.

Reproduce code:
---
None

Expected result:

None

Actual result:
--
None

-- 
Edit bug report at http://bugs.php.net/?id=38022&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38022&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38022&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38022&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38022&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=38022&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=38022&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=38022&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=38022&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=38022&r=support
Expected behavior:http://bugs.php.net/fix.php?id=38022&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=38022&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=38022&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38022&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38022&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38022&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=38022&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=38022&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38022&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=38022&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=38022&r=mysqlcfg


#37951 [Com]: Segfaul when using certain curl_setopt option

2006-07-06 Thread andrew dot hill at m3 dot net
 ID:   37951
 Comment by:   andrew dot hill at m3 dot net
 Reported By:  headhunter at c-plusplus dot de
 Status:   No Feedback
 Bug Type: cURL related
 Operating System: SLES 10.0 - 64 Bit
 PHP Version:  5.1.4
 New Comment:

> There is --with-libdir configure option.

Configuring PHP with this option set to /usr/lib64, and the copy of the
mysql libraries (/usr/lib64/mysql) NOT in /usr/lib/mysql results in the
error:

"configure: error: Cannot find libmysqlclient under /usr."

> Please provide the backtrace

I have re-compiled PHP (the snapshot) with --enable-debug, but no core
file is generated, as far as I can see...


Previous Comments:


[2006-07-06 13:41:47] [EMAIL PROTECTED]

>I have also copied my MySQL 5.0 libraries from 
>/usr/lib64/mysql to /usr/lib/mysql to allow PHP to compile.
There is --with-libdir configure option.

>Any ideas?
Yeah, please provide the backtrace and try the snapshot.



[2006-07-06 13:33:39] andrew dot hill at m3 dot net

Hi,

I have the same issue on a RHEL 4.0 x86_64 machine. The listed example
script crashes as described above.

I have also copied my MySQL 5.0 libraries from /usr/lib64/mysql to
/usr/lib/mysql to allow PHP to compile.

In my case I was using PHP 5.0.4, but using the linked PHP 5.2 latest
dev release didn't resolve the issue.

Any ideas?

Thanks!

Andrew



[2006-07-06 01:00:01] php-bugs at lists dot php dot net

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".



[2006-06-28 18:54:44] [EMAIL PROTECTED]

Apparently it's a snapshot.
You don't have to INSTALL it, the only thing you need to do is to
compile the snapshot and run your script using it. 



[2006-06-28 18:43:00] headhunter at c-plusplus dot de

What kind of PHP is this? I'm not very keen to try an development
version of PHP on a productive server. What am I buying?



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/37951

-- 
Edit this bug report at http://bugs.php.net/?id=37951&edit=1


#37951 [NoF]: Segfaul when using certain curl_setopt option

2006-07-06 Thread tony2001
 ID:   37951
 Updated by:   [EMAIL PROTECTED]
 Reported By:  headhunter at c-plusplus dot de
 Status:   No Feedback
 Bug Type: cURL related
 Operating System: SLES 10.0 - 64 Bit
 PHP Version:  5.1.4
 New Comment:

>I have also copied my MySQL 5.0 libraries from 
>/usr/lib64/mysql to /usr/lib/mysql to allow PHP to compile.
There is --with-libdir configure option.

>Any ideas?
Yeah, please provide the backtrace and try the snapshot.


Previous Comments:


[2006-07-06 13:33:39] andrew dot hill at m3 dot net

Hi,

I have the same issue on a RHEL 4.0 x86_64 machine. The listed example
script crashes as described above.

I have also copied my MySQL 5.0 libraries from /usr/lib64/mysql to
/usr/lib/mysql to allow PHP to compile.

In my case I was using PHP 5.0.4, but using the linked PHP 5.2 latest
dev release didn't resolve the issue.

Any ideas?

Thanks!

Andrew



[2006-07-06 01:00:01] php-bugs at lists dot php dot net

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".



[2006-06-28 18:54:44] [EMAIL PROTECTED]

Apparently it's a snapshot.
You don't have to INSTALL it, the only thing you need to do is to
compile the snapshot and run your script using it. 



[2006-06-28 18:43:00] headhunter at c-plusplus dot de

What kind of PHP is this? I'm not very keen to try an development
version of PHP on a productive server. What am I buying?



[2006-06-28 18:24:01] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





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/37951

-- 
Edit this bug report at http://bugs.php.net/?id=37951&edit=1


#37951 [Com]: Segfaul when using certain curl_setopt option

2006-07-06 Thread andrew dot hill at m3 dot net
 ID:   37951
 Comment by:   andrew dot hill at m3 dot net
 Reported By:  headhunter at c-plusplus dot de
 Status:   No Feedback
 Bug Type: cURL related
 Operating System: SLES 10.0 - 64 Bit
 PHP Version:  5.1.4
 New Comment:

Hi,

I have the same issue on a RHEL 4.0 x86_64 machine. The listed example
script crashes as described above.

I have also copied my MySQL 5.0 libraries from /usr/lib64/mysql to
/usr/lib/mysql to allow PHP to compile.

In my case I was using PHP 5.0.4, but using the linked PHP 5.2 latest
dev release didn't resolve the issue.

Any ideas?

Thanks!

Andrew


Previous Comments:


[2006-07-06 01:00:01] php-bugs at lists dot php dot net

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".



[2006-06-28 18:54:44] [EMAIL PROTECTED]

Apparently it's a snapshot.
You don't have to INSTALL it, the only thing you need to do is to
compile the snapshot and run your script using it. 



[2006-06-28 18:43:00] headhunter at c-plusplus dot de

What kind of PHP is this? I'm not very keen to try an development
version of PHP on a productive server. What am I buying?



[2006-06-28 18:24:01] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





[2006-06-28 18:14:47] headhunter at c-plusplus dot de

Description:

Hello,

I have found a bug which crashes PHP when using
CURLOPT_FOLLOWLOCATION.
This happens on certain adresses only, the one specified in the example
later gives a crash.
Example line:
curl_setopt ($curl_handle, CURLOPT_FOLLOWLOCATION, 1); // <<< CRASH
HERE


I don't know my configure line exactly. Anyway, I compiled PHP by hand
with--curl and --with-mysql and --with-cli. Rest is as untouched.

Unique to my systems where the problems I had getting mysql5 working.
It seems there is a bug in the configure Script of PHP which makes it
ignore the 64bit Libraries of mysql. I had to copy /usr/lib64/mysql to
/usr/lib/mysql to make compiling work.

The problem is indenpendant from the php.ini, I tried different one.
The default configuration also produces the crash. 

Reproduce code:
---


Expected result:

[EMAIL PROTECTED]:~> php bug.php
*** glibc detected *** free(): invalid pointer: 0x2b7dcb00 ***
Aborted


Actual result:
--
[EMAIL PROTECTED]:~> strace php bug.php
[ snip ]
open("/dev/tty", O_RDWR|O_NONBLOCK|O_NOCTTY) = 4
writev(4, [{"*** glibc detected *** ", 23}, {"free(): invalid pointer",
23}, {": 0x", 4}, {"2b7dcb00", 16}, {" ***\n", 5}], 5*** glibc
detected *** free(): invalid pointer: 0x2b7dcb00 ***
) = 71
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(12461, 12461, SIGABRT)   = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++






-- 
Edit this bug report at http://bugs.php.net/?id=37951&edit=1


#37965 [Opn->Asn]: Multi-dimensional array between PHP and COM

2006-07-06 Thread tony2001
 ID:   37965
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mcboog at zonnet dot nl
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: Windows XP Professional
 PHP Version:  5.1.4
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2006-07-06 12:40:00] mcboog at zonnet dot nl

Sorry man, never done this before... 
Now I got the following backtrace:

convert_to_long_base(_zval_struct * 0x100ea6d5, int 0) line 306 + 9
bytes
saproxy_read_dimension(_zval_struct * 0x10076460, _zval_struct *
0x100369b1, int 17481848, void * * * 0x010ac064) line 176
ZEND_FETCH_DIM_R_SPEC_CV_CONST_HANDLER(_zend_execute_data * 0x10019515,
void * * * 0x010ac530) line 20802
execute(_zend_op_array * 0x7c9106eb, void * * * 0x1000948d) line 92 +
12 bytes
NTDLL! 7c9106eb()
NTDLL! 7c9106eb()



[2006-07-06 12:10:36] mcboog at zonnet dot nl

Following the instructions for Generating a backtrace on Win32 gave me
this backtrace:

PHP5TS! 100af45c()



[2006-07-05 21:20:28] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.





[2006-07-05 21:13:04] mcboog at zonnet dot nl

Forget everything above.

Description:
When accessing a multi-dim array from COM-object Apache2 crashes with
error [Wed Jul 05 22:50:21 2006] [notice] Parent: child process exited
with status 3221225477 -- Restarting. This error-code seems to be
related with array access problems.
When I use the COM-object with VBScript I can access the value of the
multi-dim array with: multiArray(1,1), which should have an equivalent
in PHP by $multiArray[1][1].

Reproduce code:
function_call($multiArray);
print $multiArray[1][1];
?>

Expected result:
output value.

Actual result:
Apache crashes.



[2006-07-05 09:06:21] mcboog at zonnet dot nl

Is there a reason why there is still no reaction on my 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/37965

-- 
Edit this bug report at http://bugs.php.net/?id=37965&edit=1


#37965 [Opn]: Multi-dimensional array between PHP and COM

2006-07-06 Thread mcboog at zonnet dot nl
 ID:   37965
 User updated by:  mcboog at zonnet dot nl
 Reported By:  mcboog at zonnet dot nl
 Status:   Open
 Bug Type: COM related
 Operating System: Windows XP Professional
 PHP Version:  5.1.4
 New Comment:

Sorry man, never done this before... 
Now I got the following backtrace:

convert_to_long_base(_zval_struct * 0x100ea6d5, int 0) line 306 + 9
bytes
saproxy_read_dimension(_zval_struct * 0x10076460, _zval_struct *
0x100369b1, int 17481848, void * * * 0x010ac064) line 176
ZEND_FETCH_DIM_R_SPEC_CV_CONST_HANDLER(_zend_execute_data * 0x10019515,
void * * * 0x010ac530) line 20802
execute(_zend_op_array * 0x7c9106eb, void * * * 0x1000948d) line 92 +
12 bytes
NTDLL! 7c9106eb()
NTDLL! 7c9106eb()


Previous Comments:


[2006-07-06 12:10:36] mcboog at zonnet dot nl

Following the instructions for Generating a backtrace on Win32 gave me
this backtrace:

PHP5TS! 100af45c()



[2006-07-05 21:20:28] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.





[2006-07-05 21:13:04] mcboog at zonnet dot nl

Forget everything above.

Description:
When accessing a multi-dim array from COM-object Apache2 crashes with
error [Wed Jul 05 22:50:21 2006] [notice] Parent: child process exited
with status 3221225477 -- Restarting. This error-code seems to be
related with array access problems.
When I use the COM-object with VBScript I can access the value of the
multi-dim array with: multiArray(1,1), which should have an equivalent
in PHP by $multiArray[1][1].

Reproduce code:
function_call($multiArray);
print $multiArray[1][1];
?>

Expected result:
output value.

Actual result:
Apache crashes.



[2006-07-05 09:06:21] mcboog at zonnet dot nl

Is there a reason why there is still no reaction on my bug report?



[2006-06-29 21:03:32] mcboog at zonnet dot nl

Description:

As noticed in two previous bug-reports
(//http://bugs.php.net/bug.php?id=35956 &
//http://bugs.php.net/bug.php?id=33108) there is a problem with
retrieving a multi-dimensional array from a COM-object. This problem is
addressed on the website of Zend
(http://www.zend.com/manual/faq.com.php, question #2), but should be
resolved in PHP5 (http://www.zend.com/manual/ref.com.php, Arrays and
Array-style COM properties).

Reproduce code:
---
$obj = new COM('com.object.version');
$varIn = new Variant;
$varOutSimple = new Variant;
$varOutComplex = new Variant;
$obj->internal_com_method($varIn, $varOutSimple, $varOutComplex)

This method has te following definition (part of output of
com_print_typeinfo($obj)):
function internal_com_method(
/* VT_I4 [3] [in] */ $varIn,
/* VT_PTR [26] [in][out] --> VT_VARIANT [12]  */ &$varOutSimple,
/* VT_PTR [26] [in][out] --> VT_VARIANT [12]  */ &$varOutComplex
) { /* Method internal_com_method }

$varIn is just an integer. $varOutSimple is a single-dimension array,
$varOutComplex is a double-dimension array.

Calling NumberOfFields;
1. print $varOutSimple->NumberOfFields;
2. print $varOutComplex->NumberOfFields;

Count
3. print count($varOutSimple);
4. print count($varOutComplex);

Getting value with string as key
5. print $varOutSimple['key'];
6. print $varOutComplex['key'];

Doing foreach:
7. foreach ($varOutSimple as $key => $value) {
 print $value;
}
8. foreach ($varOutComplex as $key => $value) {
 print $value;
}


Expected result:

1. output 11
2. output 52
3. output 11
4. output 52
5. output $value
6. output $value
7. output $value
8. output $value

Actual result:
--
1. output 11
2. Error: Uncaught exception 'com_exception' with message 'this variant
has no properties'.
3. output 1 (irrelevant, works at 5. with direct string-key access)
4. output 52
5. output $value
6. Apache (Apache/2.0.55 (Win32) ) crashes
7. Error:  Uncaught exception 'Exception' with message 'Object of type
variant did not create an Iterator'
8. Error: Can only handle single dimension variant arrays (this array
has 2) & (NB!) Uncaught exception 'Exception' with message 'Object of
type variant did not create an Iterator'





-- 
Edit this bug report at http://bugs.php.net/?id=37965&edit=1


#37965 [Fbk->Opn]: Multi-dimensional array between PHP and COM

2006-07-06 Thread mcboog at zonnet dot nl
 ID:   37965
 User updated by:  mcboog at zonnet dot nl
 Reported By:  mcboog at zonnet dot nl
-Status:   Feedback
+Status:   Open
 Bug Type: COM related
 Operating System: Windows XP Professional
 PHP Version:  5.1.4
 New Comment:

Following the instructions for Generating a backtrace on Win32 gave me
this backtrace:

PHP5TS! 100af45c()


Previous Comments:


[2006-07-05 21:20:28] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.





[2006-07-05 21:13:04] mcboog at zonnet dot nl

Forget everything above.

Description:
When accessing a multi-dim array from COM-object Apache2 crashes with
error [Wed Jul 05 22:50:21 2006] [notice] Parent: child process exited
with status 3221225477 -- Restarting. This error-code seems to be
related with array access problems.
When I use the COM-object with VBScript I can access the value of the
multi-dim array with: multiArray(1,1), which should have an equivalent
in PHP by $multiArray[1][1].

Reproduce code:
function_call($multiArray);
print $multiArray[1][1];
?>

Expected result:
output value.

Actual result:
Apache crashes.



[2006-07-05 09:06:21] mcboog at zonnet dot nl

Is there a reason why there is still no reaction on my bug report?



[2006-06-29 21:03:32] mcboog at zonnet dot nl

Description:

As noticed in two previous bug-reports
(//http://bugs.php.net/bug.php?id=35956 &
//http://bugs.php.net/bug.php?id=33108) there is a problem with
retrieving a multi-dimensional array from a COM-object. This problem is
addressed on the website of Zend
(http://www.zend.com/manual/faq.com.php, question #2), but should be
resolved in PHP5 (http://www.zend.com/manual/ref.com.php, Arrays and
Array-style COM properties).

Reproduce code:
---
$obj = new COM('com.object.version');
$varIn = new Variant;
$varOutSimple = new Variant;
$varOutComplex = new Variant;
$obj->internal_com_method($varIn, $varOutSimple, $varOutComplex)

This method has te following definition (part of output of
com_print_typeinfo($obj)):
function internal_com_method(
/* VT_I4 [3] [in] */ $varIn,
/* VT_PTR [26] [in][out] --> VT_VARIANT [12]  */ &$varOutSimple,
/* VT_PTR [26] [in][out] --> VT_VARIANT [12]  */ &$varOutComplex
) { /* Method internal_com_method }

$varIn is just an integer. $varOutSimple is a single-dimension array,
$varOutComplex is a double-dimension array.

Calling NumberOfFields;
1. print $varOutSimple->NumberOfFields;
2. print $varOutComplex->NumberOfFields;

Count
3. print count($varOutSimple);
4. print count($varOutComplex);

Getting value with string as key
5. print $varOutSimple['key'];
6. print $varOutComplex['key'];

Doing foreach:
7. foreach ($varOutSimple as $key => $value) {
 print $value;
}
8. foreach ($varOutComplex as $key => $value) {
 print $value;
}


Expected result:

1. output 11
2. output 52
3. output 11
4. output 52
5. output $value
6. output $value
7. output $value
8. output $value

Actual result:
--
1. output 11
2. Error: Uncaught exception 'com_exception' with message 'this variant
has no properties'.
3. output 1 (irrelevant, works at 5. with direct string-key access)
4. output 52
5. output $value
6. Apache (Apache/2.0.55 (Win32) ) crashes
7. Error:  Uncaught exception 'Exception' with message 'Object of type
variant did not create an Iterator'
8. Error: Can only handle single dimension variant arrays (this array
has 2) & (NB!) Uncaught exception 'Exception' with message 'Object of
type variant did not create an Iterator'





-- 
Edit this bug report at http://bugs.php.net/?id=37965&edit=1


#38015 [Fbk->Opn]: Can not set PDO_MYSQL_ATTR_MAX_BUFFER_SIZE

2006-07-06 Thread sunaoka+bugs dot php dot net at gmail dot com
 ID:   38015
 User updated by:  sunaoka+bugs dot php dot net at gmail dot com
 Reported By:  sunaoka+bugs dot php dot net at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: Solaris
 PHP Version:  5.1.4
 New Comment:

Thank you for your comment. I try using CVS snapshot, but I have
another problem.
So, I can set PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, but it can not set the
value.

Reproduce code:
---
$db = new PDO('mysql:host=localhost;dbname=test', 'user', 'pass');
var_dump($db->getAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE));
var_dump($db->setAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE, 1024 * 1024
* 10));
var_dump($db->getAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE));

Expected result:

int(1048576)
bool(true)
int(1048576)


Previous Comments:


[2006-07-05 17:32:50] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





[2006-07-05 13:28:41] sunaoka+bugs dot php dot net at gmail dot com

Description:

I'm using pdo_mysql client library 4.1.20.
I need treat the data of 1MB or more.
But I can not set PDO_MYSQL_ATTR_MAX_BUFFER_SIZE.

Reproduce code:
---
$db = new PDO('mysql:host=localhost;dbname=test', 'user', 'pass');
var_dump($db->setAttribute(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE, 1024 * 1024
* 10));


Expected result:

bool(false)






-- 
Edit this bug report at http://bugs.php.net/?id=38015&edit=1


#38019 [Opn->Asn]: segfault extending mysqli class.

2006-07-06 Thread tony2001
 ID:   38019
 Updated by:   [EMAIL PROTECTED]
 Reported By:  judas dot iscariote at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Reproducible crash
 Operating System: Linux 64 bit
 PHP Version:  5CVS-2006-07-05 (CVS)
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

Dmitry, we've already discussed it - the problem is that
shutdown_executor() destroys classes first and then runs objects
destructors (in this case - it's mysqli_objects_free_storage()) which
can access already destroyed class entries.

Here is what valgrind says about it:
http://gcov.php.net/PHP_5_2/tests/ext/mysqli/tests/bug33491.mem
Though, no crash here, even with Zend MM disabled.

This patch: http://tony2001.phpclub.net/dev/tmp/bug38019.diff
fixes the problem for me and I don't see any new ones.


Previous Comments:


[2006-07-05 23:11:00] judas dot iscariote at gmail dot com

Description:

the following code segfaults in current PHP 5_2 and PHP 6 CVS in
**debug** mode.(just checked from the CVS, no need to try snapshots)

./configure --enable-debug --with-libdir=lib64
--with-mysqli=/usr/bin/mysql_config --with-zlib=/usr --disable-cgi

not sure if this is related with bug #38003..



Reproduce code:
---




Expected result:

Fatal error: Call to private DB::__construct() from invalid context in
/srv/www/htdocs/singleton.php

Actual result:
--
Fatal error: Call to private DB::__construct() from invalid context in
/srv/www/htdocs/singleton.php on line 13

Program received signal SIGSEGV, Segmentation fault.
0x005dd76a in instanceof_function_ex (instance_ce=0xa289b0,
ce=0x9ed4f0, interfaces_only=0 '\0')
at /local/local/bodegon/php-debug/Zend/zend_operators.c:1600
1600if
(instanceof_function(instance_ce->interfaces[i], ce TSRMLS_CC)) {
(gdb) bt
#0  0x005dd76a in instanceof_function_ex (instance_ce=0xa289b0,
ce=0x9ed4f0, interfaces_only=0 '\0')
at /local/local/bodegon/php-debug/Zend/zend_operators.c:1600
#1  0x005dd7ab in instanceof_function (instance_ce=, ce=)
at /local/local/bodegon/php-debug/Zend/zend_operators.c:1618
#2  0x0049e5d9 in mysqli_objects_free_storage (object=)
at /local/local/bodegon/php-debug/ext/mysqli/mysqli.c:143
#3  0x0060329e in zend_objects_store_free_object_storage
(objects=0x8be600)
at /local/local/bodegon/php-debug/Zend/zend_objects_API.c:86
#4  0x005d8e8c in shutdown_executor () at
/local/local/bodegon/php-debug/Zend/zend_execute_API.c:281
#5  0x005e5ab3 in zend_deactivate () at
/local/local/bodegon/php-debug/Zend/zend.c:854
#6  0x005a417b in php_request_shutdown (dummy=)
at /local/local/bodegon/php-debug/main/main.c:1300
#7  0x006821ea in main (argc=2, argv=0x7fd96a48) at
/local/local/bodegon/php-debug/sapi/cli/php_cli.c:1250








-- 
Edit this bug report at http://bugs.php.net/?id=38019&edit=1