#36282 [NEW]: Gateway keyword

2006-02-04 Thread doctor at hmportal dot pl
From: doctor at hmportal dot pl
Operating system: Irrelevant
PHP version:  6CVS-2006-02-04 (CVS)
PHP Bug Type: Feature/Change Request
Bug description:  Gateway keyword

Description:

Hi there !
I don't know if this was discussed earlier but I found that it would be
nice to have something like gateway keyword in PHP. There are many PHP
files that shouldn't be accesed directly from user's browser. As we know
the best option which solves the problem is to put the files in the
separate folder outside public_html but unfortunately some hosts don't
allow this. So the second option is to put in each file something like if
(LOCK) die('You can't acces this page directly') but this on the other
hand is somewhat annoying, not foolproof, bug-generating etc. Putting
gateway word on the top of a few accesible files seems to be trivial yet
useful and nice feature, easy to implement as well. Thank for attention
and appologies if I missed something.
Best regards, Michal.


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


#32292 [Com]: XML parser script crashes PHP5ts.dll in Apache 2

2006-02-04 Thread dwivedi dot vibhor at gmail dot com
 ID:   32292
 Comment by:   dwivedi dot vibhor at gmail dot com
 Reported By:  admin at skynetlabs dot org
 Status:   No Feedback
 Bug Type: XML related
 Operating System: Windows XP (SP2)
 PHP Version:  5.0.4 RC1
 New Comment:

i am facing following problem

Can't locate API module structure `php5_module' in file
C:/PHP/php5ts.dll:


Previous Comments:


[2006-02-04 08:26:06] dwivedi dot vibhor at gmail dot com

i just installed apache and php in my windows xp apache is running
nicely when i am not loading php module but when i changed
configuration file as add ing this two lines

LoadModule php5_module c:/PHP/php5ts.dll
AddType application/x-httpd-php .php

but now if i restart the server it is giving error i don't know what t
o do next plese try with php5 and apache latest version.



[2006-02-04 08:22:34] dwivedi dot vibhor at gmail dot com

i just installed apache server and php. i add these 3 lines in config
file.

LoadModule php5_module c:/PHP/php5ts.dll
AddType application/x-httpd-php .php



[2005-11-28 17:47:41] vicoasis at gmail dot com

At me the same mistake when I use plus still MySQL


szAppName : Apache.exe szAppVer : 2.0.55.0 szModName :
php5ts.dll 
szModVer : 5.0.5.5 offset : 7da9 

Any body know to what it is caused :



[2005-06-27 04:00:25] rick dot martinez at gmail dot com

The crash is reproduced on my system. I have the same problem on other
scripts as well. All those scripts use DOM. Here is the Windows error
signature for the error produced by the submitted script:

szAppName : Apache.exe szAppVer : 2.0.54.0 szModName :
php5ts.dll 
szModVer : 5.0.4.4 offset : 7798 

Files created by Windows related to the error are available here:

http://www.digxworld.com/files/phpXmlErrors/Apache.exe.mdmp
http://www.digxworld.com/files/phpXmlErrors/appcompat.txt

If you need any more info, just let me know.
Hope this helps! (especially since this error is really annoying me :P)



[2005-03-25 01:49:42] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to Open. Thank you.





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

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


#34272 [Asn-Csd]: empty array onto COM object blows up

2006-02-04 Thread rrichards
 ID:   34272
 Updated by:   [EMAIL PROTECTED]
 Reported By:  csaba at alum dot mit dot edu
-Status:   Assigned
+Status:   Closed
 Bug Type: COM related
 Operating System: Win XP
 PHP Version:  5.1.0RC1
 Assigned To:  wez
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2005-08-28 01:02:35] [EMAIL PROTECTED]

Assigned to the maintainer



[2005-08-26 21:18:31] csaba at alum dot mit dot edu

Description:

putting an empty array onto a COM object leads to severe reactions from
the system.  Memory usage escalates dramatically (my system showed
1.6G), the machine slows to a crawl even though system idle does not
reflect it, and it has crashed FF, too, when I had many windows open.

Running this from CLI php.exe produces a noticable delay, but the
really severe reaction comes when running it as a web page.

Csaba Gabor from Vienna

Reproduce code:
---
?php
$dict = new COM(Scripting.Dictionary);
$dict-add('foo', array());
print sizeof($dict['foo']);// bug: large #
$dict-add('bar', array(23));
print   . sizeof($dict['bar']) .  \n;  // OK: 1

$ie = new COM(InternetExplorer.Application);
$ie-navigate(about:blank);   // to get a document object
$window=$ie-document-parentWindow;
$window-execScript(window.myArray=false);  //placeholder
$window-myArray = array();
print sizeof($window-myArray);   // bug: large #
$window-myArray = array(23);
print   . sizeof($window-myArray); // OK: 1
?

Expected result:

On the output for the empty arrays, I should get 0 and not some number
in the millions.  But especially, running the code above should not
lock up the system.
The last two statements of each of the two code sections are showing
correct behaviour and are not part of the bug.






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


#36283 [NEW]: SOAPClient Compression Broken

2006-02-04 Thread adam at trachtenberg dot com
From: adam at trachtenberg dot com
Operating system: Mac OS X / Linux
PHP version:  5CVS-2006-02-04 (CVS)
PHP Bug Type: SOAP related
Bug description:  SOAPClient Compression Broken

Description:

SOAPClient compression seems broken. I see two problems.

First, the code places the Accept-Encoding and Content-Encoding HTTP
headers before the POST /path HTTP/1.1 line, which is invalid HTTP. This
causes 400 errors.

I fixed this by moving the logic for this section further down in the
function. See this patch for more details:

http://www.trachtenberg.com/patches/soap_compression_patch.txt 

It works for me, but I did not verify this is a perfect fix.

Second, it seems impossible (or just not as documented) to trigger
compression of out-going requests. I don't understand how level can
evaluate to  0 given the SOAP_COMPRESSION_* constants.

Do you need to also pass a gzip compression level (0-9) as part of the
compression bit field? This is not part of the online documentation, which
says you can do this:

$client = new SoapClient(some.wsdl,
  array('compression' = SOAP_COMPRESSION_ACCEPT |
SOAP_COMPRESSION_GZIP));

This evaluates to 0x20. Inside php_http.c in the make_http_soap_request
function, it then does:

if (zend_hash_find(Z_OBJPROP_P(this_ptr), compression,
sizeof(compression), (void **)tmp) == SUCCESS  Z_TYPE_PP(tmp) ==
IS_LONG) {
int level = Z_LVAL_PP(tmp)  0x0f;

  ...

  if (level  0) {

0x20  0x0f evaluates to 0, so you never execute the last branch, and no
compression is used.

Furthermore, since level seems to be passed into the compression functions
as the gzip level, I don't know how that relates to the bit field.

I tries to verify this using the unit tests, but there are none for
SOAPClient and compression.


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


#35081 [Asn-Bgs]: using the example for .NET causes a com_exeption

2006-02-04 Thread rrichards
 ID:   35081
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mcyra at chello dot at
-Status:   Assigned
+Status:   Bogus
 Bug Type: COM related
 Operating System: WinXP
 PHP Version:  5CVS-2005-11-03 (snap)
 Assigned To:  wez
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

dupe of bug #33188


Previous Comments:


[2005-12-07 21:03:01] jamie dot layne at gmail dot com

I am experiencing the same problem as well.

Summary:

.NET:  Microsoft .NET Framework 1.1
OS: Windows Server 2003 Standard Edition SP1
PHP:  PHP 5.0.5 (cli) (built: Sep  5 2005 15:54:44)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.5, Copyright (c) 1998-2004 Zend Technologies

Code Sample:
-

?PHP
  $stack = new DOTNET(mscorlib, System.Collections.Stack); 
  $stack-Push(.Net); 
  $stack-Push(Hello ); 
  echo $stack-Pop() . $stack-Pop(); 
?

Actual Result:
--
Fatal error: Uncaught exception 'com_exception' with message 'Failed to
instantiate .Net object [CreateInstance] [0x80070057] The parameter is
incorrect. ' in C:\DOTNET\sample.php:2 Stack trace: #0
C:\DOTNET\sample.php(2): dotnet-dotnet('mscorlib',
'System.Collecti...') #1 {main} thrown in C:\DOTNET\sample.php on line
2



[2005-11-03 22:13:59] [EMAIL PROTECTED]

Assigned to the maintainer of COM extension.



[2005-11-03 18:13:18] mcyra at chello dot at

I have checked with the given link, result was:

Fatal error: Uncaught exception 'com_exception' with message 'Failed to
instantiate .Net object [CreateInstance] [0x80070057] Falscher
Parameter.' in D:\NET\test.php:2
Stack trace:
#0 D:\NET\test.php(2): dotnet-dotnet('mscorlib', 'System.Co
llecti...')
#1 {main}
  thrown in D:\NET\test.php on line 2



[2005-11-03 15:47:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-11-03 08:03:25] mcyra at chello dot at

Description:

A sample script from documentation causes this error.
German version of WinXP.
Microsoft .NET Framework 1.1.
Microsoft .NET Framework 1.1 German Language Pack.
PHP 5.0.5 (cli) (build: Sep 5 2005 15:54:44)
Zend Engine v2.0.5

Reproduce code:
---
?php
  $stack = new DOTNET(mscorlib, System.Collections.Stack);

  $stack-Push(.Net);
  $stack-Push(Hello );

  echo $stack-Pop() . $stack-Pop();
?

Actual result:
--
Fatal error: Uncaught exception 'com_exception' with message 'Failed to
instantiate .Net object [CreateInstance] [0x80070057] Falscher
Parameter.' in D:\NET\test.php:2
Stack trace: 
#0 D:\NET\test.php(2): dotnet-dotnet('mscorlib',
'System.Collecti...')
#1 {main}
  thrown in D:\NET\test.php on line 2





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


#36010 [Csd]: Crash when executing SQL statment with lob parameter after another SQL statment

2006-02-04 Thread spatar at mail dot nnov dot ru
 ID:   36010
 User updated by:  spatar at mail dot nnov dot ru
 Reported By:  spatar at mail dot nnov dot ru
 Status:   Closed
 Bug Type: OCI8 related
 Operating System: SuSE Linux 9.2 (i586)
 PHP Version:  5.1.2
 Assigned To:  tony2001
 New Comment:

Thank you. It works now.


Previous Comments:


[2006-02-03 15:47:07] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Thanks for the last comment, it was _very_ helpful.



[2006-02-03 12:42:43] robertg2 at hope dot ac dot uk

I have the same problem.

Apache/2.0.54
Oracle InstantClient 10.2.0.1
PHP 5.0.4
oci8 from cvs (1.292 at 2006-02-03)
Suse Linux 10.0 (2.6.13-15-default)

Reverted back to oci8 pecl beta release 1.1.1 which doesn't  suffer
from the issue.



[2006-01-14 15:48:49] [EMAIL PROTECTED]

Assigned to the maintainer.



[2006-01-14 15:38:32] spatar at mail dot nnov dot ru

Description:

OCI8 crashes in call oci_execute when executing some SQL statment
with binded lob parameter after another SQL statment.
Previous version (PHP 5.1.1) doesn't produce this bug.

More details:
OS: SuSE Linux 9.2 (i586)
uname -a: Linux www 2.6.8-24-smp #1 SMP Wed Oct 6 09:16:23 UTC 2004
i686 i686 i386 GNU/Linux
Apache 2.2.0
Oracle 10.1.0.3.0
PHP 5.1.2

Reproduce code:
---
?php
function f($conn)
{
$sql =  begin :p_clob := 'lob string'; end;;
$stid = oci_parse($conn, $sql);
$clob = oci_new_descriptor($conn, OCI_D_LOB);
oci_bind_by_name($stid, :p_clob, $clob, -1,
OCI_B_CLOB);
$r = oci_execute($stid, OCI_DEFAULT);
if ($r)
{
echo $clob-load(), \n;
}
$clob-free();
oci_free_statement($stid);
}
$conn = oci_connect(voip_dev, 9, RS21);
f($conn);
f($conn);
oci_close($conn);
?

Expected result:

lob string
lob string

Actual result:
--
#0  0xb6cfdc73 in kpufGetRcvInfo () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#1  0xb6f489b5 in ttcacr () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#2  0xb6f4a807 in ttcdrv () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#3  0xb6dec4ad in nioqwa () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#4  0xb6c5e07e in upirtrc () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#5  0xb6bf4d35 in kpurcsc () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#6  0xb6bb1831 in kpuexecv8 () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#7  0xb6bb33ac in kpuexec () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#8  0xb6c27b86 in OCIStmtExecute () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#9  0xb788ba64 in php_oci_statement_execute (statement=0x82f6c84,
mode=137325732)
at /home/spatar/mvtm-www/php-5.1.2/ext/oci8/oci8_statement.c:321
#10 0xb788fa7a in zif_oci_execute (ht=2, return_value=0xb640b02c,
return_value_ptr=0x0, this_ptr=0x0,
return_value_used=1) at
/home/spatar/mvtm-www/php-5.1.2/ext/oci8/oci8_interface.c:1276
#11 0xb7a07d7b in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffc240) at zend_vm_execute.h:192
#12 0xb7a56fbd in execute (op_array=0x82a6330) at zend_vm_execute.h:92
#13 0xb7a07836 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffc390) at zend_vm_execute.h:226
#14 0xb7a56fbd in execute (op_array=0x829df04) at zend_vm_execute.h:92
#15 0xb79eaf8f in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /home/spatar/mvtm-www/php-5.1.2/Zend/zend.c:1101
#16 0xb79b01ae in php_execute_script (primary_file=0xbfffe6e0) at
/home/spatar/mvtm-www/php-5.1.2/main/main.c:1720
#17 0xb7a57ac1 in php_handler (r=0x82799d0) at
/home/spatar/mvtm-www/php-5.1.2/sapi/apache2handler/sapi_apache2.c:584
#18 0x0807756b in ap_run_handler ()
...





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


#36283 [Opn-Asn]: SOAPClient Compression Broken

2006-02-04 Thread tony2001
 ID:   36283
 Updated by:   [EMAIL PROTECTED]
 Reported By:  adam at trachtenberg dot com
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: Mac OS X / Linux
 PHP Version:  5CVS-2006-02-04 (CVS)
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2006-02-04 12:03:25] adam at trachtenberg dot com

Description:

SOAPClient compression seems broken. I see two problems.

First, the code places the Accept-Encoding and Content-Encoding HTTP
headers before the POST /path HTTP/1.1 line, which is invalid HTTP.
This causes 400 errors.

I fixed this by moving the logic for this section further down in the
function. See this patch for more details:

http://www.trachtenberg.com/patches/soap_compression_patch.txt 

It works for me, but I did not verify this is a perfect fix.

Second, it seems impossible (or just not as documented) to trigger
compression of out-going requests. I don't understand how level can
evaluate to  0 given the SOAP_COMPRESSION_* constants.

Do you need to also pass a gzip compression level (0-9) as part of the
compression bit field? This is not part of the online documentation,
which says you can do this:

$client = new SoapClient(some.wsdl,
  array('compression' = SOAP_COMPRESSION_ACCEPT |
SOAP_COMPRESSION_GZIP));

This evaluates to 0x20. Inside php_http.c in the make_http_soap_request
function, it then does:

if (zend_hash_find(Z_OBJPROP_P(this_ptr), compression,
sizeof(compression), (void **)tmp) == SUCCESS  Z_TYPE_PP(tmp) ==
IS_LONG) {
int level = Z_LVAL_PP(tmp)  0x0f;

  ...

  if (level  0) {

0x20  0x0f evaluates to 0, so you never execute the last branch, and
no compression is used.

Furthermore, since level seems to be passed into the compression
functions as the gzip level, I don't know how that relates to the bit
field.

I tries to verify this using the unit tests, but there are none for
SOAPClient and compression.






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


#36281 [Opn-Fbk]: bindParam not working with LIKE '%:foo%'

2006-02-04 Thread tony2001
 ID:   36281
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vendor at visv dot net
-Status:   Open
+Status:   Feedback
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.1.2
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-02-04 05:35:05] vendor at visv dot net

Description:

$q = SELECT id, name FROM test WHERE name like '%:foo%';
$s = carrot;

$dbh = new PDO('mysql:...', $user, $pass);

$sth = $dbh-prepare($q);
$sth-bindParam(':foo', $s);
$sth-execute()

while ($r = $sth-fetch()) {
print_r($r);
}

the above does not work. Adding PDO::PARAM_STR, and the
length argument do not help matters.

simply embedding $s in place of :foo does work. It also
works fine if I leave off the '% and %' parts
and $s == the column value. It just seems bindParam()
cannot cope with the '% %' parts in the query.

I do not find similar in your bugtracking system, nor
in user supplied notes (currently there are none).

Thanks.


Reproduce code:
---
See description.






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


#36228 [Opn-Asn]: Loosing connection to db while executing 2 Multi-Statements requests with PDO

2006-02-04 Thread tony2001
 ID:   36228
 Updated by:   [EMAIL PROTECTED]
 Reported By:  antleclercq at online dot fr
-Status:   Open
+Status:   Assigned
 Bug Type: MySQL related
 Operating System: Ubuntu Linux (breezy)
 PHP Version:  5.1.2
-Assigned To:  
+Assigned To:  wez


Previous Comments:


[2006-01-31 17:03:24] antleclercq at online dot fr

Hello Tony,

It looks like it returns only the number of affected rows for the first
statement...
The affected rows for the next statements don't seem to be counted.

Also : if you have an error in your first statement, you get an error,
but if the error is in one of the next statements, these are not
reported.

Hmmm... I don't know really what I would expect to get as return value
from a multi-query... Certainly a sum of all the affected rows or
better... an array with that info on each statement.

Antoine



[2006-01-31 15:55:42] [EMAIL PROTECTED]

Just curious: what do you expect to get as the result of these
multi-statement?
PDO::exec returns number of rows expected. Since you're effectively
executing two queries - what do you expect to get?
What if one of the queries succeeds and another one fails?



[2006-01-31 15:12:57] antleclercq at online dot fr

Description:

Hello,

Executing 2 multi-statement queries gives you the following error : 
2013 - Lost connection to MySQL server during query

I reproduced this error using 5.1.0RC3 and 5.1.2.

My MySQL version is 4.1.12, and I have the right MySQL / PDO
connector.

Thanks,

Antoine

Reproduce code:
---
?php
$dbh = new PDO(mysql:dbname=karibou;host=localhost, user,
password);
try {
$qry  = DELETE FROM addressbook_address WHERE profile_id=2 ; \n;
$qry .= DELETE FROM addressbook_phone WHERE profile_id=2 ; \n;

//No error
$dbh-exec($qry);
//The folowing line displays : Array ( [0] = 0 )
print_r($dbh-errorInfo());

//This second exec statement produces the error : Lost connection to
MySQL server during query
$dbh-exec($qry);
//The following line displays : Array ( [0] = HY000 [1] = 2013 [2]
= Lost connection to MySQL server during query )
   print_r($dbh-errorInfo());
   
} catch (PDOException $e) {
   print $e-getMessage();
   die();
}

?

Expected result:

None of the exec should return an error.

Actual result:
--
The second exec returns a 2013 error (Lost connection...).

Array ( [0] = HY000 [1] = 2013 [2] = Lost connection to MySQL server
during query )





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


#36275 [Opn-Fbk]: Regression of bug #30638

2006-02-04 Thread tony2001
 ID:   36275
 Updated by:   [EMAIL PROTECTED]
 Reported By:  shiloh dot heurich at newvillagemedia dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Strings related
 Operating System: Mac OS X 10.4.4
 PHP Version:  5CVS-2006-02-03 (snap)
 New Comment:

Are you sure there is de_DE locale in your system and this locale does
have thousand separator?


Previous Comments:


[2006-02-03 17:53:35] shiloh dot heurich at newvillagemedia dot com

Description:

This bug has resurfaced when building PHP 5.1.1, 5.1.2 and 
200602031530 snapshot on Darwin 8.4.0 (Mac OS X 10.4.4) 
ppc platform. 

make test: FAIL Bug #30638 (localeconv returns wrong 
LC_NUMERIC settings) [tests/lang/bug30638.phpt] 

uname: Darwin 8.4.0 Darwin Kernel Version 8.4.0: Tue Jan  3 
18:22:10 PST 2006; root:xnu-792.6.56.obj~1/RELEASE_PPC Power 
Macintosh powerpc

gcc: gcc version 4.0.1 (Apple Computer, Inc. build 5250)

configuration: CFLAGS='-g -O2 -arch ppc -mcpu=970' ./
configure  --prefix=/usr/local/php5 --mandir=/usr/local/
php5/share/man --infodir=/usr/local/php5/share/info --
sysconfdir=/usr/local/etc/php5 --x-includes=/usr/X11R6/
include --x-libraries=/usr/X11R6/lib --with-apxs=/usr/sbin/
apxs --enable-cli --enable-cgi --with-layout=PHP --with-
config-file-path=/usr/local/etc/php5 --enable-ipv6 --
disable-all --enable-libxml --with-libxml-dir=/usr --with-
openssl=/usr --with-kerberos=/usr --with-pcre-regex=/usr/
local/pcre --with-zlib=/usr --with-zlib-dir=/usr --enable-
bcmath --with-bz2=/usr --enable-calendar --enable-ctype --
with-curl=/usr --enable-dba --with-cdb --with-inifile --
with-flatfile --enable-dom --enable-exif --enable-ftp --
with-openssl-dir=/usr --with-gd --with-jpeg-dir=/usr/local/
libjpeg --with-png-dir=/usr/local/libpng --with-xpm-dir=/
usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-t1lib=/usr/
local/t1lib --enable-gd-native-ttf --enable-hash --with-
imap=/usr/local/imap-2004g --with-imap-ssl=/usr --with-
ldap=/usr --enable-mbstring --enable-mbregex --with-mcrypt=/
usr/local/libmcrypt --with-mssql=/usr/local/freetds --with-
mysql=/usr --with-mysql-sock=/var/mysql/mysql.sock --with-
mysqli=/usr/bin/mysql_config --with-ncurses=/usr --with-
iodbc=/usr --enable-pdo --with-pdo-dblib=/usr/local/freetds 
--with-pdo-mysql=/usr --enable-posix --with-pspell=/usr/
local/aspell --enable-reflection --enable-session --enable-
shmop --enable-simplexml --with-snmp=/usr --enable-soap --
enable-sockets --enable-spl --with-sqlite --enable-sqlite-
utf8 --enable-sysvmsg --enable-sysvsem --enable-sysvshm --
with-tidy=/usr/local/tidy --enable-tokenizer --enable-wddx 
--enable-xml --enable-xmlreader --with-xmlrpc --with-iconv=/
usr/local/libiconv --with-iconv-dir=/usr/local/libiconv --
enable-xmlwriter --with-xsl=/usr --with-pear --enable-
memory-limit


Reproduce code:
---
bug30638.php:

?php 
# activate the german locale
setlocale(LC_NUMERIC, de_DE, de, german, ge);

$lc = localeconv();
printf(decimal_point: %s\n, $lc['decimal_point']);
printf(thousands_sep: %s\n, $lc['thousands_sep']);
?


Expected result:

bug30638.log:

 EXPECTED OUTPUT
decimal_point: ,
thousands_sep: .


Actual result:
--
bug30638.log:

 ACTUAL OUTPUT
decimal_point: ,
thousands_sep:






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


#36282 [Opn-WFx]: Gateway keyword

2006-02-04 Thread derick
 ID:   36282
 Updated by:   [EMAIL PROTECTED]
 Reported By:  doctor at hmportal dot pl
-Status:   Open
+Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: Irrelevant
 PHP Version:  6CVS-2006-02-04 (CVS)
 New Comment:

This is definitely something that should be the responsibility of the
web server, and not PHP.


Previous Comments:


[2006-02-04 10:02:09] doctor at hmportal dot pl

Description:

Hi there !
I don't know if this was discussed earlier but I found that it would be
nice to have something like gateway keyword in PHP. There are many PHP
files that shouldn't be accesed directly from user's browser. As we
know the best option which solves the problem is to put the files in
the separate folder outside public_html but unfortunately some hosts
don't allow this. So the second option is to put in each file something
like if (LOCK) die('You can't acces this page directly') but this on
the other hand is somewhat annoying, not foolproof, bug-generating etc.
Putting gateway word on the top of a few accesible files seems to be
trivial yet useful and nice feature, easy to implement as well. Thank
for attention and appologies if I missed something.
Best regards, Michal.






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


#36275 [Fbk-Opn]: Regression of bug #30638

2006-02-04 Thread shiloh dot heurich at newvillagemedia dot com
 ID:   36275
 User updated by:  shiloh dot heurich at newvillagemedia dot com
 Reported By:  shiloh dot heurich at newvillagemedia dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Strings related
 Operating System: Mac OS X 10.4.4
 PHP Version:  5CVS-2006-02-03 (snap)
 New Comment:

Thanks - it appears that this system does not define a 
thousands separator for the de_DE locale (or the C locale 
for that matter). It does define a thousands separator for 
en_US, though - should the regression test be modified to 
take this into account for current Darwin systems? 

$ cat /usr/share/locale/de_DE/LC_NUMERIC
,

-1

$ LANG=de_DE locale -ck thousands_sep
LC_NUMERIC
thousands_sep=



Previous Comments:


[2006-02-04 13:04:25] [EMAIL PROTECTED]

Are you sure there is de_DE locale in your system and this locale does
have thousand separator?



[2006-02-03 17:53:35] shiloh dot heurich at newvillagemedia dot com

Description:

This bug has resurfaced when building PHP 5.1.1, 5.1.2 and 
200602031530 snapshot on Darwin 8.4.0 (Mac OS X 10.4.4) 
ppc platform. 

make test: FAIL Bug #30638 (localeconv returns wrong 
LC_NUMERIC settings) [tests/lang/bug30638.phpt] 

uname: Darwin 8.4.0 Darwin Kernel Version 8.4.0: Tue Jan  3 
18:22:10 PST 2006; root:xnu-792.6.56.obj~1/RELEASE_PPC Power 
Macintosh powerpc

gcc: gcc version 4.0.1 (Apple Computer, Inc. build 5250)

configuration: CFLAGS='-g -O2 -arch ppc -mcpu=970' ./
configure  --prefix=/usr/local/php5 --mandir=/usr/local/
php5/share/man --infodir=/usr/local/php5/share/info --
sysconfdir=/usr/local/etc/php5 --x-includes=/usr/X11R6/
include --x-libraries=/usr/X11R6/lib --with-apxs=/usr/sbin/
apxs --enable-cli --enable-cgi --with-layout=PHP --with-
config-file-path=/usr/local/etc/php5 --enable-ipv6 --
disable-all --enable-libxml --with-libxml-dir=/usr --with-
openssl=/usr --with-kerberos=/usr --with-pcre-regex=/usr/
local/pcre --with-zlib=/usr --with-zlib-dir=/usr --enable-
bcmath --with-bz2=/usr --enable-calendar --enable-ctype --
with-curl=/usr --enable-dba --with-cdb --with-inifile --
with-flatfile --enable-dom --enable-exif --enable-ftp --
with-openssl-dir=/usr --with-gd --with-jpeg-dir=/usr/local/
libjpeg --with-png-dir=/usr/local/libpng --with-xpm-dir=/
usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-t1lib=/usr/
local/t1lib --enable-gd-native-ttf --enable-hash --with-
imap=/usr/local/imap-2004g --with-imap-ssl=/usr --with-
ldap=/usr --enable-mbstring --enable-mbregex --with-mcrypt=/
usr/local/libmcrypt --with-mssql=/usr/local/freetds --with-
mysql=/usr --with-mysql-sock=/var/mysql/mysql.sock --with-
mysqli=/usr/bin/mysql_config --with-ncurses=/usr --with-
iodbc=/usr --enable-pdo --with-pdo-dblib=/usr/local/freetds 
--with-pdo-mysql=/usr --enable-posix --with-pspell=/usr/
local/aspell --enable-reflection --enable-session --enable-
shmop --enable-simplexml --with-snmp=/usr --enable-soap --
enable-sockets --enable-spl --with-sqlite --enable-sqlite-
utf8 --enable-sysvmsg --enable-sysvsem --enable-sysvshm --
with-tidy=/usr/local/tidy --enable-tokenizer --enable-wddx 
--enable-xml --enable-xmlreader --with-xmlrpc --with-iconv=/
usr/local/libiconv --with-iconv-dir=/usr/local/libiconv --
enable-xmlwriter --with-xsl=/usr --with-pear --enable-
memory-limit


Reproduce code:
---
bug30638.php:

?php 
# activate the german locale
setlocale(LC_NUMERIC, de_DE, de, german, ge);

$lc = localeconv();
printf(decimal_point: %s\n, $lc['decimal_point']);
printf(thousands_sep: %s\n, $lc['thousands_sep']);
?


Expected result:

bug30638.log:

 EXPECTED OUTPUT
decimal_point: ,
thousands_sep: .


Actual result:
--
bug30638.log:

 ACTUAL OUTPUT
decimal_point: ,
thousands_sep:






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


#36286 [NEW]: Variable holding query results has to be unset

2006-02-04 Thread memoimyself at yahoo dot com dot br
From: memoimyself at yahoo dot com dot br
Operating system: Linux
PHP version:  5.1.2
PHP Bug Type: PDO related
Bug description:  Variable holding query results has to be unset

Description:

When running more than one query in a row with PDO, if the result set is
assigned to a variable with the same name (e.g. $result) each time, only
the first assignment works properly: from the second time on, the variable
will contain an empty result set.

I have tested my code in two different setups: Linux (A2 Web Hosting
server running PHP 5.1.2) and Windows XP (my test server, also running PHP
5.1.2). This problem ONLY occurs in the first setup (Linux).

It does not matter which fetch style is used.

I have worked around this problem by unsetting the result variable each
time as soon as all data has been fetched from it.

Reproduce code:
---
$dbh = new PDO(BD_DSN, BD_USERNAME, BD_PWD);

if ($result = $dbh-query('SELECT * FROM table_1'))
{
$all_rows_1 = $result-fetchAll(PDO::FETCH_OBJ);
}

if ($result = $dbh-query('SELECT * FROM table_2'))
{
$all_rows_2 = $result-fetchAll(PDO::FETCH_OBJ);
}

Expected result:

If both tables actually contain data, $all_rows_1 and $all_rows_2 should
both contain all the data from each table.

Actual result:
--
When code similar to the example is run on my Windows XP test server,
everything works as expected.

When, however, the same code is run on the Linux production server,
$all_rows_2 will contain an empty array rather than an array with objects
representing each row from the table.

If I add unset($result) after each $result-fetchAll(PDO::FETCH_OBJ), then
everything works well on the Linux server as well.

Curiously, I have had no problems assigning other types of object the
variables with the same name in a sequence or loop (e.g. when creating XML
elements in a loop and assigning them to a variable with the same name each
time).

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


#35945 [Com]: sybase_query() fails on AMD64

2006-02-04 Thread shawnf at fletcher dot org dot za
 ID:   35945
 Comment by:   shawnf at fletcher dot org dot za
 Reported By:  dbaffaleuf at ixis-cib dot com
 Status:   Open
 Bug Type: Sybase-ct (ctlib) related
 Operating System: Linux 2.6.9-22 RedHat AMD64
 PHP Version:  5CVS, 4CVS (2006-01-11) (snap)
 New Comment:

here is a patch for php-5.1

it makes the module use the 64bit libraries and most importantly adds 

CFLAGS=${CFLAGS} -g -DSYB_LP64

-cut here


*** ext/sybase_ct/config.m4 2006-02-04 16:41:12.0 +0100
--- ext/sybase_ct/config.m4.old 2005-05-30 00:16:44.0 +0100
***
*** 29,59 
else
  AC_MSG_ERROR([ctpublic.h missing!])
fi
-
-   CFLAGS=${CFLAGS} -g -DSYB_LP64
-

PHP_ADD_LIBPATH($SYBASE_CT_LIBDIR, SYBASE_CT_SHARED_LIBADD)
if test -f $SYBASE_CT_INCDIR/tds.h; then
  PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD)
! SYBASE_CT_LIBS=-L$SYBASE_CT_LIBDIR -lct64
else
! PHP_ADD_LIBRARY(cs64,, SYBASE_CT_SHARED_LIBADD)
! PHP_ADD_LIBRARY(ct64,, SYBASE_CT_SHARED_LIBADD)
! PHP_ADD_LIBRARY(comn64,, SYBASE_CT_SHARED_LIBADD)
! PHP_ADD_LIBRARY(intl64,, SYBASE_CT_SHARED_LIBADD)

! SYBASE_CT_LIBS=-L$SYBASE_CT_LIBDIR -lcs64 -lct64 -lcomn64
-lintl64

! PHP_CHECK_LIBRARY(tcl64, netg_errstr, [
!   PHP_ADD_LIBRARY(tcl64,,SYBASE_CT_SHARED_LIBADD)
  ],[
!   PHP_ADD_LIBRARY(sybtcl64,,SYBASE_CT_SHARED_LIBADD)
  ],[
$SYBASE_CT_LIBS
  ])

! PHP_CHECK_LIBRARY(insck64, insck__getVdate,
[PHP_ADD_LIBRARY(insck64,,
SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR])
! PHP_CHECK_LIBRARY(insck64, bsd_tcp,
[PHP_ADD_LIBRARY(insck64,,
SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR])
fi
  fi
--- 29,56 
else
  AC_MSG_ERROR([ctpublic.h missing!])
fi

PHP_ADD_LIBPATH($SYBASE_CT_LIBDIR, SYBASE_CT_SHARED_LIBADD)
if test -f $SYBASE_CT_INCDIR/tds.h; then
  PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD)
! SYBASE_CT_LIBS=-L$SYBASE_CT_LIBDIR -lct
else
! PHP_ADD_LIBRARY(cs,, SYBASE_CT_SHARED_LIBADD)
! PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD)
! PHP_ADD_LIBRARY(comn,, SYBASE_CT_SHARED_LIBADD)
! PHP_ADD_LIBRARY(intl,, SYBASE_CT_SHARED_LIBADD)

! SYBASE_CT_LIBS=-L$SYBASE_CT_LIBDIR -lcs -lct -lcomn -lintl

! PHP_CHECK_LIBRARY(tcl, netg_errstr, [
!   PHP_ADD_LIBRARY(tcl,,SYBASE_CT_SHARED_LIBADD)
  ],[
!   PHP_ADD_LIBRARY(sybtcl,,SYBASE_CT_SHARED_LIBADD)
  ],[
$SYBASE_CT_LIBS
  ])

! PHP_CHECK_LIBRARY(insck, insck__getVdate,
[PHP_ADD_LIBRARY(insck,,
SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR])
! PHP_CHECK_LIBRARY(insck, bsd_tcp,
[PHP_ADD_LIBRARY(insck,,
SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR])
fi
  fi


Previous Comments:


[2006-01-11 12:05:06] dbaffaleuf at ixis-cib dot com

Hi, thx for your reply.

Though, it does not work either with the 5.1. CVS snapshot you
provided. I get exactly the same error message:

Warning: sybase_query(): Sybase:  Client message:  (): user api layer:
internal common library error: The bind of result set item 1 resulted
in truncation. (severity 116) in
/msmorzine/sgbd/contrib/src/php5.1-200601110930/MKTEST/bin/test_sybase_ct.php
on line 4
resource(4) of type (sybase-ct link)
bool(false)

Warning: sybase_fetch_row(): supplied argument is not a valid Sybase
result resource in
/msmorzine/sgbd/contrib/src/php5.1-200601110930/MKTEST/bin/test_sybase_ct.php
on line 8



[2006-01-09 16:17:45] dbaffaleuf at ixis-cib dot com

Description:

Acutally I have the problem both in PHP 4.4.1 and 4.4.2RC3


Always returns a correct resource id for the handler, but FALSE for the
query (see the following code)

The Sybase OpenClient warning code suggest an overflow in the
CS_DATAFMT.maxlength C struct. When returning, the datalength is sized
whether the type is CS_NUMERIC, CS_MONEY, etc... in the
php_sybase_fetch_result_set() fonction (src: php_sybase_ct.c). 

Works fine in DB-LIB.

The configure :

./configure \
   
--prefix=/msmorzine/sgbd/contrib/src/php4-STABLE-200601091335/MKTEST   
\
   
--with-sybase-ct=/msmorzine/sgbd/MX_MT_MSMORZINE/ASE1253/OCS-12_5/devlib
\
--enable-static=sybase-ct \
   
--with-config-file-path=/msmorzine/sgbd/contrib/src/php4-STABLE-200601091335/MKTEST
\
--with-apxs2=/msmorzine/sgbd/contrib/bin/apxs   \
--with-gd=/msmorzine/sgbd/contrib/ \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm



Reproduce code:
---
The following code:

$STR= select name from syslogins;
$DBH= @sybase_connect(MX_MT_MSMORZINE,sa, mypassword);
$QUERY  = sybase_query($STR,$DBH);
var_dump($DBH);
var_dump($QUERY);

while($row = sybase_fetch_row($QUERY)) {
while(list($k, $v) = each($row)) {
echo 

#36281 [Fbk-Opn]: bindParam not working with LIKE '%:foo%'

2006-02-04 Thread vendor at visv dot net
 ID:   36281
 User updated by:  vendor at visv dot net
 Reported By:  vendor at visv dot net
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.1.2
 New Comment:

No change nor improvement with
http://snaps.php.net/php5.1-latest.tar.gz on Feb 4. 12:20PM


Previous Comments:


[2006-02-04 12:48:08] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-02-04 05:35:05] vendor at visv dot net

Description:

$q = SELECT id, name FROM test WHERE name like '%:foo%';
$s = carrot;

$dbh = new PDO('mysql:...', $user, $pass);

$sth = $dbh-prepare($q);
$sth-bindParam(':foo', $s);
$sth-execute()

while ($r = $sth-fetch()) {
print_r($r);
}

the above does not work. Adding PDO::PARAM_STR, and the
length argument do not help matters.

simply embedding $s in place of :foo does work. It also
works fine if I leave off the '% and %' parts
and $s == the column value. It just seems bindParam()
cannot cope with the '% %' parts in the query.

I do not find similar in your bugtracking system, nor
in user supplied notes (currently there are none).

Thanks.


Reproduce code:
---
See description.






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


#36287 [NEW]: segfault with RecursiveIteratorIterator

2006-02-04 Thread meeb at meeb dot org
From: meeb at meeb dot org
Operating system: Debian64 EMT64 SMP
PHP version:  5.1.2
PHP Bug Type: Filesystem function related
Bug description:  segfault with RecursiveIteratorIterator

Description:

When accidently comparing a the iterator created by
RecursiveDirectoryIterator against a string PHP segfaulted. This is new to
5.1.2 (worked under 5.1.1 and I was unaware of the issue with my code).
There are obvious workarounds for this so no major panic.

Removing the 'if':

if($file!=.$file!=..)

stops the segfault.

Unfortunately I only have EMT64/Debian64 servers available so I am unable
to test this for cross-platform compatibility, and I was unable to find
any exact matching bugs (closest were a few stack corruptions).

This occurs when the script is executed on the command line and via
apache2. I have saved straces should they be requested.

Reproduce code:
---
$this-dir = new RecursiveIteratorIterator(new
RecursiveDirectoryIterator(.),true);
foreach($this-dir as $file){
  // works...
  echo $file-getPathName().\n;
  // segfauls...
  if($file!=.$file!=..) echo $file-getPathName().\n;
}


Expected result:

./dir/
./dir/file1.ext
./dir/file2.ext


Actual result:
--
Segmentation Fault.

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


#36287 [Opn]: segfault with RecursiveIteratorIterator

2006-02-04 Thread meeb at meeb dot org
 ID:   36287
 User updated by:  meeb at meeb dot org
 Reported By:  meeb at meeb dot org
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: Debian64 EMT64 SMP
 PHP Version:  5.1.2
 New Comment:

s/iterator/object/

whoops :p


Previous Comments:


[2006-02-04 17:42:12] meeb at meeb dot org

Description:

When accidently comparing a the iterator created by
RecursiveDirectoryIterator against a string PHP segfaulted. This is new
to 5.1.2 (worked under 5.1.1 and I was unaware of the issue with my
code). There are obvious workarounds for this so no major panic.

Removing the 'if':

if($file!=.$file!=..)

stops the segfault.

Unfortunately I only have EMT64/Debian64 servers available so I am
unable to test this for cross-platform compatibility, and I was unable
to find any exact matching bugs (closest were a few stack
corruptions).

This occurs when the script is executed on the command line and via
apache2. I have saved straces should they be requested.

Reproduce code:
---
$this-dir = new RecursiveIteratorIterator(new
RecursiveDirectoryIterator(.),true);
foreach($this-dir as $file){
  // works...
  echo $file-getPathName().\n;
  // segfauls...
  if($file!=.$file!=..) echo $file-getPathName().\n;
}


Expected result:

./dir/
./dir/file1.ext
./dir/file2.ext


Actual result:
--
Segmentation Fault.





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


#36275 [Opn-Bgs]: Regression of bug #30638

2006-02-04 Thread tony2001
 ID:   36275
 Updated by:   [EMAIL PROTECTED]
 Reported By:  shiloh dot heurich at newvillagemedia dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Strings related
 Operating System: Mac OS X 10.4.4
 PHP Version:  5CVS-2006-02-03 (snap)
 New Comment:

.


Previous Comments:


[2006-02-04 13:54:28] shiloh dot heurich at newvillagemedia dot com

Thanks - it appears that this system does not define a 
thousands separator for the de_DE locale (or the C locale 
for that matter). It does define a thousands separator for 
en_US, though - should the regression test be modified to 
take this into account for current Darwin systems? 

$ cat /usr/share/locale/de_DE/LC_NUMERIC
,

-1

$ LANG=de_DE locale -ck thousands_sep
LC_NUMERIC
thousands_sep=




[2006-02-04 13:04:25] [EMAIL PROTECTED]

Are you sure there is de_DE locale in your system and this locale does
have thousand separator?



[2006-02-03 17:53:35] shiloh dot heurich at newvillagemedia dot com

Description:

This bug has resurfaced when building PHP 5.1.1, 5.1.2 and 
200602031530 snapshot on Darwin 8.4.0 (Mac OS X 10.4.4) 
ppc platform. 

make test: FAIL Bug #30638 (localeconv returns wrong 
LC_NUMERIC settings) [tests/lang/bug30638.phpt] 

uname: Darwin 8.4.0 Darwin Kernel Version 8.4.0: Tue Jan  3 
18:22:10 PST 2006; root:xnu-792.6.56.obj~1/RELEASE_PPC Power 
Macintosh powerpc

gcc: gcc version 4.0.1 (Apple Computer, Inc. build 5250)

configuration: CFLAGS='-g -O2 -arch ppc -mcpu=970' ./
configure  --prefix=/usr/local/php5 --mandir=/usr/local/
php5/share/man --infodir=/usr/local/php5/share/info --
sysconfdir=/usr/local/etc/php5 --x-includes=/usr/X11R6/
include --x-libraries=/usr/X11R6/lib --with-apxs=/usr/sbin/
apxs --enable-cli --enable-cgi --with-layout=PHP --with-
config-file-path=/usr/local/etc/php5 --enable-ipv6 --
disable-all --enable-libxml --with-libxml-dir=/usr --with-
openssl=/usr --with-kerberos=/usr --with-pcre-regex=/usr/
local/pcre --with-zlib=/usr --with-zlib-dir=/usr --enable-
bcmath --with-bz2=/usr --enable-calendar --enable-ctype --
with-curl=/usr --enable-dba --with-cdb --with-inifile --
with-flatfile --enable-dom --enable-exif --enable-ftp --
with-openssl-dir=/usr --with-gd --with-jpeg-dir=/usr/local/
libjpeg --with-png-dir=/usr/local/libpng --with-xpm-dir=/
usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-t1lib=/usr/
local/t1lib --enable-gd-native-ttf --enable-hash --with-
imap=/usr/local/imap-2004g --with-imap-ssl=/usr --with-
ldap=/usr --enable-mbstring --enable-mbregex --with-mcrypt=/
usr/local/libmcrypt --with-mssql=/usr/local/freetds --with-
mysql=/usr --with-mysql-sock=/var/mysql/mysql.sock --with-
mysqli=/usr/bin/mysql_config --with-ncurses=/usr --with-
iodbc=/usr --enable-pdo --with-pdo-dblib=/usr/local/freetds 
--with-pdo-mysql=/usr --enable-posix --with-pspell=/usr/
local/aspell --enable-reflection --enable-session --enable-
shmop --enable-simplexml --with-snmp=/usr --enable-soap --
enable-sockets --enable-spl --with-sqlite --enable-sqlite-
utf8 --enable-sysvmsg --enable-sysvsem --enable-sysvshm --
with-tidy=/usr/local/tidy --enable-tokenizer --enable-wddx 
--enable-xml --enable-xmlreader --with-xmlrpc --with-iconv=/
usr/local/libiconv --with-iconv-dir=/usr/local/libiconv --
enable-xmlwriter --with-xsl=/usr --with-pear --enable-
memory-limit


Reproduce code:
---
bug30638.php:

?php 
# activate the german locale
setlocale(LC_NUMERIC, de_DE, de, german, ge);

$lc = localeconv();
printf(decimal_point: %s\n, $lc['decimal_point']);
printf(thousands_sep: %s\n, $lc['thousands_sep']);
?


Expected result:

bug30638.log:

 EXPECTED OUTPUT
decimal_point: ,
thousands_sep: .


Actual result:
--
bug30638.log:

 ACTUAL OUTPUT
decimal_point: ,
thousands_sep:






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


#36287 [Opn-Fbk]: segfault with RecursiveIteratorIterator

2006-02-04 Thread tony2001
 ID:   36287
 Updated by:   [EMAIL PROTECTED]
 Reported By:  meeb at meeb dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Debian64 EMT64 SMP
 PHP Version:  5.1.2
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-02-04 17:45:06] meeb at meeb dot org

s/iterator/object/

whoops :p



[2006-02-04 17:42:12] meeb at meeb dot org

Description:

When accidently comparing a the iterator created by
RecursiveDirectoryIterator against a string PHP segfaulted. This is new
to 5.1.2 (worked under 5.1.1 and I was unaware of the issue with my
code). There are obvious workarounds for this so no major panic.

Removing the 'if':

if($file!=.$file!=..)

stops the segfault.

Unfortunately I only have EMT64/Debian64 servers available so I am
unable to test this for cross-platform compatibility, and I was unable
to find any exact matching bugs (closest were a few stack
corruptions).

This occurs when the script is executed on the command line and via
apache2. I have saved straces should they be requested.

Reproduce code:
---
$this-dir = new RecursiveIteratorIterator(new
RecursiveDirectoryIterator(.),true);
foreach($this-dir as $file){
  // works...
  echo $file-getPathName().\n;
  // segfauls...
  if($file!=.$file!=..) echo $file-getPathName().\n;
}


Expected result:

./dir/
./dir/file1.ext
./dir/file2.ext


Actual result:
--
Segmentation Fault.





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


#36286 [Opn-Fbk]: Variable holding query results has to be unset

2006-02-04 Thread tony2001
 ID:   36286
 Updated by:   [EMAIL PROTECTED]
 Reported By:  memoimyself at yahoo dot com dot br
-Status:   Open
+Status:   Feedback
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.1.2
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-02-04 14:39:58] memoimyself at yahoo dot com dot br

Description:

When running more than one query in a row with PDO, if the result set
is assigned to a variable with the same name (e.g. $result) each time,
only the first assignment works properly: from the second time on, the
variable will contain an empty result set.

I have tested my code in two different setups: Linux (A2 Web Hosting
server running PHP 5.1.2) and Windows XP (my test server, also running
PHP 5.1.2). This problem ONLY occurs in the first setup (Linux).

It does not matter which fetch style is used.

I have worked around this problem by unsetting the result variable each
time as soon as all data has been fetched from it.

Reproduce code:
---
$dbh = new PDO(BD_DSN, BD_USERNAME, BD_PWD);

if ($result = $dbh-query('SELECT * FROM table_1'))
{
$all_rows_1 = $result-fetchAll(PDO::FETCH_OBJ);
}

if ($result = $dbh-query('SELECT * FROM table_2'))
{
$all_rows_2 = $result-fetchAll(PDO::FETCH_OBJ);
}

Expected result:

If both tables actually contain data, $all_rows_1 and $all_rows_2
should both contain all the data from each table.

Actual result:
--
When code similar to the example is run on my Windows XP test server,
everything works as expected.

When, however, the same code is run on the Linux production server,
$all_rows_2 will contain an empty array rather than an array with
objects representing each row from the table.

If I add unset($result) after each $result-fetchAll(PDO::FETCH_OBJ),
then everything works well on the Linux server as well.

Curiously, I have had no problems assigning other types of object the
variables with the same name in a sequence or loop (e.g. when creating
XML elements in a loop and assigning them to a variable with the same
name each time).





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


#36281 [Opn-Asn]: bindParam not working with LIKE '%:foo%'

2006-02-04 Thread tony2001
 ID:   36281
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vendor at visv dot net
-Status:   Open
+Status:   Assigned
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.1.2
-Assigned To:  
+Assigned To:  wez


Previous Comments:


[2006-02-04 18:21:16] vendor at visv dot net

No change nor improvement with
http://snaps.php.net/php5.1-latest.tar.gz on Feb 4. 12:20PM



[2006-02-04 12:48:08] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-02-04 05:35:05] vendor at visv dot net

Description:

$q = SELECT id, name FROM test WHERE name like '%:foo%';
$s = carrot;

$dbh = new PDO('mysql:...', $user, $pass);

$sth = $dbh-prepare($q);
$sth-bindParam(':foo', $s);
$sth-execute()

while ($r = $sth-fetch()) {
print_r($r);
}

the above does not work. Adding PDO::PARAM_STR, and the
length argument do not help matters.

simply embedding $s in place of :foo does work. It also
works fine if I leave off the '% and %' parts
and $s == the column value. It just seems bindParam()
cannot cope with the '% %' parts in the query.

I do not find similar in your bugtracking system, nor
in user supplied notes (currently there are none).

Thanks.


Reproduce code:
---
See description.






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


#36281 [Asn-Bgs]: bindParam not working with LIKE '%:foo%'

2006-02-04 Thread wez
 ID:   36281
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vendor at visv dot net
-Status:   Assigned
+Status:   Bogus
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.1.2
 Assigned To:  wez
 New Comment:

That is not a valid parameter definition.



Previous Comments:


[2006-02-04 18:21:16] vendor at visv dot net

No change nor improvement with
http://snaps.php.net/php5.1-latest.tar.gz on Feb 4. 12:20PM



[2006-02-04 12:48:08] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-02-04 05:35:05] vendor at visv dot net

Description:

$q = SELECT id, name FROM test WHERE name like '%:foo%';
$s = carrot;

$dbh = new PDO('mysql:...', $user, $pass);

$sth = $dbh-prepare($q);
$sth-bindParam(':foo', $s);
$sth-execute()

while ($r = $sth-fetch()) {
print_r($r);
}

the above does not work. Adding PDO::PARAM_STR, and the
length argument do not help matters.

simply embedding $s in place of :foo does work. It also
works fine if I leave off the '% and %' parts
and $s == the column value. It just seems bindParam()
cannot cope with the '% %' parts in the query.

I do not find similar in your bugtracking system, nor
in user supplied notes (currently there are none).

Thanks.


Reproduce code:
---
See description.






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


#36281 [Bgs-Asn]: bindParam not working with LIKE '%:foo%'

2006-02-04 Thread derick
 ID:   36281
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vendor at visv dot net
-Status:   Bogus
+Status:   Assigned
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.1.2
 Assigned To:  wez
 New Comment:

I doubt this is a bug... many DB APIs simply don't support bind
variables like this. A bind variable is not just any substitution for a
string.


Previous Comments:


[2006-02-04 18:49:15] [EMAIL PROTECTED]

That is not a valid parameter definition.




[2006-02-04 18:21:16] vendor at visv dot net

No change nor improvement with
http://snaps.php.net/php5.1-latest.tar.gz on Feb 4. 12:20PM



[2006-02-04 12:48:08] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-02-04 05:35:05] vendor at visv dot net

Description:

$q = SELECT id, name FROM test WHERE name like '%:foo%';
$s = carrot;

$dbh = new PDO('mysql:...', $user, $pass);

$sth = $dbh-prepare($q);
$sth-bindParam(':foo', $s);
$sth-execute()

while ($r = $sth-fetch()) {
print_r($r);
}

the above does not work. Adding PDO::PARAM_STR, and the
length argument do not help matters.

simply embedding $s in place of :foo does work. It also
works fine if I leave off the '% and %' parts
and $s == the column value. It just seems bindParam()
cannot cope with the '% %' parts in the query.

I do not find similar in your bugtracking system, nor
in user supplied notes (currently there are none).

Thanks.


Reproduce code:
---
See description.






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


#36281 [Asn]: bindParam not working with LIKE '%:foo%'

2006-02-04 Thread vendor at visv dot net
 ID:   36281
 User updated by:  vendor at visv dot net
 Reported By:  vendor at visv dot net
 Status:   Assigned
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.1.2
 Assigned To:  wez
 New Comment:

Possibly. How can we determine that definitively? At the
least, I would like to add a user-note to the online
documentation, if someone cannot add it to the core docs
for pdo-mysql.

The db in question is mysql 4.1


Previous Comments:


[2006-02-04 18:49:21] [EMAIL PROTECTED]

I doubt this is a bug... many DB APIs simply don't support bind
variables like this. A bind variable is not just any substitution for a
string.



[2006-02-04 18:49:15] [EMAIL PROTECTED]

That is not a valid parameter definition.




[2006-02-04 18:21:16] vendor at visv dot net

No change nor improvement with
http://snaps.php.net/php5.1-latest.tar.gz on Feb 4. 12:20PM



[2006-02-04 12:48:08] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-02-04 05:35:05] vendor at visv dot net

Description:

$q = SELECT id, name FROM test WHERE name like '%:foo%';
$s = carrot;

$dbh = new PDO('mysql:...', $user, $pass);

$sth = $dbh-prepare($q);
$sth-bindParam(':foo', $s);
$sth-execute()

while ($r = $sth-fetch()) {
print_r($r);
}

the above does not work. Adding PDO::PARAM_STR, and the
length argument do not help matters.

simply embedding $s in place of :foo does work. It also
works fine if I leave off the '% and %' parts
and $s == the column value. It just seems bindParam()
cannot cope with the '% %' parts in the query.

I do not find similar in your bugtracking system, nor
in user supplied notes (currently there are none).

Thanks.


Reproduce code:
---
See description.






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


#36276 [Opn-Bgs]: Tiger hash fails regression test

2006-02-04 Thread nlopess
 ID:   36276
 Updated by:   [EMAIL PROTECTED]
 Reported By:  shiloh dot heurich at newvillagemedia dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *Encryption and hash functions
 Operating System: Mac OS X 10.4.4
 PHP Version:  5CVS-2006-02-03 (snap)
 New Comment:

duplicate of http://pecl.php.net/bugs/6391


Previous Comments:


[2006-02-03 18:02:09] shiloh dot heurich at newvillagemedia dot com

Description:

When running regression tests on PHP 5.1.2 and 200602031530 
snapshots, tiger hash function fails:

FAIL tiger [ext/hash/tests/tiger.phpt] t]

uname: Darwin 8.4.0 Darwin Kernel Version 8.4.0: Tue Jan  3 
18:22:10 PST 2006; root:xnu-792.6.56.obj~1/RELEASE_PPC Power 
Macintosh powerpc

gcc: gcc version 4.0.1 (Apple Computer, Inc. build 5250)

configuration: CFLAGS='-g -O2 -arch ppc -mcpu=970' ./
configure  --prefix=/usr/local/php5 --mandir=/usr/local/
php5/share/man --infodir=/usr/local/php5/share/info --
sysconfdir=/usr/local/etc/php5 --x-includes=/usr/X11R6/
include --x-libraries=/usr/X11R6/lib --with-apxs=/usr/sbin/
apxs --enable-cli --enable-cgi --with-layout=PHP --with-
config-file-path=/usr/local/etc/php5 --enable-ipv6 --
disable-all --enable-libxml --with-libxml-dir=/usr --with-
openssl=/usr --with-kerberos=/usr --with-pcre-regex=/usr/
local/pcre --with-zlib=/usr --with-zlib-dir=/usr --enable-
bcmath --with-bz2=/usr --enable-calendar --enable-ctype --
with-curl=/usr --enable-dba --with-cdb --with-inifile --
with-flatfile --enable-dom --enable-exif --enable-ftp --
with-openssl-dir=/usr --with-gd --with-jpeg-dir=/usr/local/
libjpeg --with-png-dir=/usr/local/libpng --with-xpm-dir=/
usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-t1lib=/usr/
local/t1lib --enable-gd-native-ttf --enable-hash --with-
imap=/usr/local/imap-2004g --with-imap-ssl=/usr --with-
ldap=/usr --enable-mbstring --enable-mbregex --with-mcrypt=/
usr/local/libmcrypt --with-mssql=/usr/local/freetds --with-
mysql=/usr --with-mysql-sock=/var/mysql/mysql.sock --with-
mysqli=/usr/bin/mysql_config --with-ncurses=/usr --with-
iodbc=/usr --enable-pdo --with-pdo-dblib=/usr/local/freetds 
--with-pdo-mysql=/usr --enable-posix --with-pspell=/usr/
local/aspell --enable-reflection --enable-session --enable-
shmop --enable-simplexml --with-snmp=/usr --enable-soap --
enable-sockets --enable-spl --with-sqlite --enable-sqlite-
utf8 --enable-sysvmsg --enable-sysvsem --enable-sysvshm --
with-tidy=/usr/local/tidy --enable-tokenizer --enable-wddx 
--enable-xml --enable-xmlreader --with-xmlrpc --with-iconv=/
usr/local/libiconv --with-iconv-dir=/usr/local/libiconv --
enable-xmlwriter --with-xsl=/usr --with-pear --enable-
memory-limit


Reproduce code:
---
tiger.php:

?php
echo hash('tiger192,3', ''),\n;
echo hash('tiger192,3', 'abc'),\n;
echo hash('tiger192,3', str_repeat('a', 63)),\n;
echo hash('tiger192,3', str_repeat('abc', 61)),\n;
echo hash('tiger192,3', str_repeat('abc', 64)),\n;
?


Expected result:

tiger.log:

 EXPECTED OUTPUT
24f0130c63ac933216166e76b1bb925ff373de2d49584e7a
f258c1e88414ab2a527ab541ffc5b8bf935f7b951c132951
8ee409a14e6066933b63d5b2abca63d71a78f55e29eb4649
2586156d16bf9ab1e6e48bdf5e038f8053c30e071db3bcb0
3ee8a9405396ddba1bc038508af4164ac1fe59ef58916a85


Actual result:
--
tiger.log:

 ACTUAL OUTPUT
60ef6c0dbc077b9c175ffb7771008c253bacea024c9d01ab
c79e799e14b53e7df935d83477fa4df939d18c44f76b73cd
0cbefecf310004da41a290cfeef81e918ea533f130c2b9ba
11fe76694d6a116bd7af6eeded0ef4d147e43ee107abda06
397fb45a4406fd2046c9ad070907ac574d004836c89553a2






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


#36288 [NEW]: fastcgi crashes on ternary operator and $foo{x}

2006-02-04 Thread scripts at freq9 dot de
From: scripts at freq9 dot de
Operating system: Windows XP Prof.
PHP version:  6CVS-2006-02-04 (snap)
PHP Bug Type: Variables related
Bug description:  fastcgi crashes on ternary operator and $foo{x}

Description:

When I execute this code, fastcgi crashes and i´ll get an Error 500.

Reproduce code:
---
?php

$foo   = 'hello';
$bar   = 'world';
$fname = ($foo{4} != 'x') ?  /* condition */
   $foo.' '.$bar :   /* is true */
   $foo.$bar;/* is false */
echo $fname;

?

Expected result:

hello world

Actual result:
--
FastCGI crashes  Error 500 (Premature end of script headers)

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


#36288 [Opn-Fbk]: fastcgi crashes on ternary operator and $foo{x}

2006-02-04 Thread tony2001
 ID:   36288
 Updated by:   [EMAIL PROTECTED]
 Reported By:  scripts at freq9 dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Variables related
 Operating System: Windows XP Prof.
 PHP Version:  6CVS-2006-02-04 (snap)
 New Comment:

Does CLI work in the same time? 
Please explain what does it mean crashes and provide more info.
Also, I can't reproduce it on Linux. 


Previous Comments:


[2006-02-04 23:17:14] scripts at freq9 dot de

Description:

When I execute this code, fastcgi crashes and i´ll get an Error 500.

Reproduce code:
---
?php

$foo   = 'hello';
$bar   = 'world';
$fname = ($foo{4} != 'x') ?  /* condition */
   $foo.' '.$bar :   /* is true */
   $foo.$bar;/* is false */
echo $fname;

?

Expected result:

hello world

Actual result:
--
FastCGI crashes  Error 500 (Premature end of script headers)





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


#36288 [Fbk-Opn]: fastcgi crashes on ternary operator and $foo{x}

2006-02-04 Thread scripts at freq9 dot de
 ID:   36288
 User updated by:  scripts at freq9 dot de
 Reported By:  scripts at freq9 dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Variables related
 Operating System: Windows XP Prof.
 PHP Version:  6CVS-2006-02-04 (snap)
 New Comment:

if php_operator is loaded fastcgi/cli crashes!

-
cli# php -f test.php
 CLI hat ein Problem festgestellt und muss beendet werden.
-

-
browser# http://localhost/test.php
 CGI / FastCGI hat ein Problem festgestellt und muss beendet werden.
-

(german)


Previous Comments:


[2006-02-04 23:35:14] [EMAIL PROTECTED]

Does CLI work in the same time? 
Please explain what does it mean crashes and provide more info.
Also, I can't reproduce it on Linux. 



[2006-02-04 23:17:14] scripts at freq9 dot de

Description:

When I execute this code, fastcgi crashes and i´ll get an Error 500.

Reproduce code:
---
?php

$foo   = 'hello';
$bar   = 'world';
$fname = ($foo{4} != 'x') ?  /* condition */
   $foo.' '.$bar :   /* is true */
   $foo.$bar;/* is false */
echo $fname;

?

Expected result:

hello world

Actual result:
--
FastCGI crashes  Error 500 (Premature end of script headers)





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


#36289 [NEW]: SplFileObject needs fread()

2006-02-04 Thread robertpaul at gmail dot com
From: robertpaul at gmail dot com
Operating system: *
PHP version:  5.1.2
PHP Bug Type: Feature/Change Request
Bug description:  SplFileObject needs fread()

Description:

Please forgive me if I'm missing something, but it seems as though
SplFileObject has most of the useful file functions except fread.  Having
that available would be Really Good™.

Thanks!


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


#36288 [Opn-Csd]: fastcgi crashes on ternary operator and $foo{x}

2006-02-04 Thread pollita
 ID:   36288
 Updated by:   [EMAIL PROTECTED]
 Reported By:  scripts at freq9 dot de
-Status:   Open
+Status:   Closed
 Bug Type: Variables related
 Operating System: Windows XP Prof.
 PHP Version:  6CVS-2006-02-04 (snap)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Bug was in PECL/operator extension.  Forgot to take into account string
offsets.


Previous Comments:


[2006-02-05 00:05:28] scripts at freq9 dot de

if php_operator is loaded fastcgi/cli crashes!

-
cli# php -f test.php
 CLI hat ein Problem festgestellt und muss beendet werden.
-

-
browser# http://localhost/test.php
 CGI / FastCGI hat ein Problem festgestellt und muss beendet werden.
-

(german)



[2006-02-04 23:35:14] [EMAIL PROTECTED]

Does CLI work in the same time? 
Please explain what does it mean crashes and provide more info.
Also, I can't reproduce it on Linux. 



[2006-02-04 23:17:14] scripts at freq9 dot de

Description:

When I execute this code, fastcgi crashes and i´ll get an Error 500.

Reproduce code:
---
?php

$foo   = 'hello';
$bar   = 'world';
$fname = ($foo{4} != 'x') ?  /* condition */
   $foo.' '.$bar :   /* is true */
   $foo.$bar;/* is false */
echo $fname;

?

Expected result:

hello world

Actual result:
--
FastCGI crashes  Error 500 (Premature end of script headers)





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


#36290 [NEW]: tempnam() creates file on wrong drive

2006-02-04 Thread info at silisoftware dot com
From: info at silisoftware dot com
Operating system: Windows XP Pro SP2
PHP version:  4.4.2
PHP Bug Type: Filesystem function related
Bug description:  tempnam() creates file on wrong drive

Description:

tempnam() returns a temp filename, and creates the file. However, it
creates it on the wrong drive. For example:

$tempname = tempnam('', 'foo');
echo $tempname.'br';
echo realpath($tempname).'br';

This outputs:

\foo49.tmp
e:\foo49.tmp

Notice the returned filename has no drive letter. The file is created (to
prevent race condition) in C:\ but realpath() resolves that to E:\ (the
last drive letter of physical harddrives in this system).

For reference:
 getenv('TMP')== 'C:\WINDOWS\TEMP'
 getenv('TMPDIR') == ''

Reproduce code:
---
$tempname = tempnam('', 'foo');
echo $tempname.'br';
echo realpath($tempname).'br';



Expected result:

c:\foo49.tmp
c:\foo49.tmp


Actual result:
--
\foo49.tmp
e:\foo49.tmp


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


#36084 [Com]: apache2 segfaults on phpinfo()

2006-02-04 Thread yvovandoorn at comcast dot net
 ID:   36084
 Comment by:   yvovandoorn at comcast dot net
 Reported By:  clive at darkarts dot co dot za
 Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: FreeBSD
 PHP Version:  5.1.2
 New Comment:

I'm pretty sure this isn't related to Apache2. The reason why is that I
am experiencing this problem on two machines, one installed with FreeBSD
5.4 and the other FreeBSD 6.0. The only thing these two have in common
is that I installed all my additional applications via the ports.

On both machines the problem goes away the moment I disable the
imagemagick extension. Yes both machines are running Apache2, however
this problem appeared before php 5.1.2, but sometime a week after the
new year.

Since I strongly believe that the imagick extension is the cause of it,
I did some checking and found out the port was upgraded for pecl-imagick
on 01/05/06 so I'm pretty sure thats where the issue lies. 

I've contacted the maintainer for that port (and strangely he also
maintains php5  php5-extensions).


Previous Comments:


[2006-02-03 12:20:50] mail at skraemer dot net

This might help you:

I ran into the same problem, and the error dissapeared when i commented
out the ImageMagick-extension in my exentsions.ini
(FreeBSD-system).

If you need detailed informations about the cofiguration- /
compiling-process, please send me an e-mail.



[2006-01-28 01:00:05] 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-01-27 01:06:31] engin at turk-php dot com

i was having the same issue on same os and same php version
but i didnt try to re-compile with different configure options
coz in the previous php-5.0.5 with ZEND Debugger i faced with similar
bug , seg fault, when i removed the Zend Debugger module it was working
fine, ( on FreeBSD 4.11 - apache 1.3 )
recently i upgrade my os to FreeBSD-6.0 - apache 2.2 - php 5.1.2
with trial and error method i found imagick and recode modules cause
issue 

[Thu Jan 27 02:04:12 2006] [notice] child pid 5968 exit signal Abort
trap (6)
httpd in free(): error: junk pointer, too high to make sense



[2006-01-20 09:51:30] [EMAIL PROTECTED]

Then you need to add rest of your options one by one to see which one
is causing the problem for you.



[2006-01-20 09:47:12] clive at darkarts dot co dot za

commandline for both versions (again):

rm config.cache ; ./configure --disable-all --disable-cgi
--enable-maintainer-zts --with-apxs2=/usr/local/sbin/apxs  make clean
 make  sapi/cli/php -r 'phpinfo();'

no segfaulting, runs fine.



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

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