[PHP-BUG] Bug #65809 [NEW]: interface, abstract static function

2013-10-02 Thread spam at krol dot me
From: spam at krol dot me
Operating system: 
PHP version:  Irrelevant
Package:  Class/Object related
Bug Type: Bug
Bug description:interface, abstract static function

Description:

abstract static function in class isn't allowed,
but you can define static function in interface

This leads to funny inconsistency where you can create abstract static
function using interfaces



Test script:
---
//abstract class A { abstract static function a(); } //invalid

interface I { static function i(); } //valid
abstract class B implements I {} //valid
//class C extends B{} // invalid
//Fatal error: Class C contains 1 abstract method and must therefore be
declared abstract or implement the remaining methods (I::i) in php shell
code on line 1

class D extends B{
static function i(){echo I have to be implemented; }
}


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65809edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65809r=trysnapshot54
Try a snapshot (PHP 5.5):   
https://bugs.php.net/fix.php?id=65809r=trysnapshot55
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=65809r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=65809r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=65809r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65809r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=65809r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=65809r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=65809r=support
Expected behavior:  https://bugs.php.net/fix.php?id=65809r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65809r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65809r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=65809r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65809r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=65809r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=65809r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=65809r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65809r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65809r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65809r=mysqlcfg



Bug #65809 [Opn]: interface, abstract static function

2013-10-02 Thread spam at krol dot me
Edit report at https://bugs.php.net/bug.php?id=65809edit=1

 ID: 65809
 User updated by:spam at krol dot me
 Reported by:spam at krol dot me
 Summary:interface, abstract static function
 Status: Open
 Type:   Bug
 Package:Class/Object related
-PHP Version:Irrelevant
+PHP Version:5.3.15
 Block user comment: N
 Private report: N

 New Comment:

I changed PHP version as it IS revelant

According to this

http://php.net/manual/en/migration52.incompatible.php

Dropped abstract static class functions. Due to an oversight, PHP 5.0.x and 
5.1.x allowed abstract static functions in classes. As of PHP 5.2.x, only 
interfaces can have them.


Previous Comments:

[2013-10-02 23:43:36] phpmpan at mpan dot pl

Abstract static methods are allowed. Abstract static *constructors* aren't.


[2013-10-02 10:58:34] spam at krol dot me

Description:

abstract static function in class isn't allowed,
but you can define static function in interface

This leads to funny inconsistency where you can create abstract static function 
using interfaces



Test script:
---
//abstract class A { abstract static function a(); } //invalid

interface I { static function i(); } //valid
abstract class B implements I {} //valid
//class C extends B{} // invalid
//Fatal error: Class C contains 1 abstract method and must therefore be 
declared abstract or implement the remaining methods (I::i) in php shell code 
on line 1

class D extends B{
static function i(){echo I have to be implemented; }
}







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


Bug #65809 [Opn]: interface, abstract static function

2013-10-02 Thread spam at krol dot me
Edit report at https://bugs.php.net/bug.php?id=65809edit=1

 ID: 65809
 User updated by:spam at krol dot me
 Reported by:spam at krol dot me
 Summary:interface, abstract static function
 Status: Open
 Type:   Bug
 Package:Class/Object related
 PHP Version:5.3.15
 Block user comment: N
 Private report: N

 New Comment:

And use this test case. It don't make use of constructor

Test script:
---

abstract class A { abstract static function aa(); } //invalid
//Strict Standards: Static function A::aa() should not be abstract in php shell 
code on line 1

interface I { static function ii(); } //valid
abstract class B implements I {} //valid
//class C extends B{} // invalid
//Fatal error: Class C contains 1 abstract method and must therefore be 
declared abstract or implement the remaining methods (I::i) in php shell code 
on line 1

class D extends B{
static function ii(){echo I have to be implemented; }
}


Previous Comments:

[2013-10-03 05:10:24] spam at krol dot me

I changed PHP version as it IS revelant

According to this

http://php.net/manual/en/migration52.incompatible.php

Dropped abstract static class functions. Due to an oversight, PHP 5.0.x and 
5.1.x allowed abstract static functions in classes. As of PHP 5.2.x, only 
interfaces can have them.


[2013-10-02 23:43:36] phpmpan at mpan dot pl

Abstract static methods are allowed. Abstract static *constructors* aren't.


[2013-10-02 10:58:34] spam at krol dot me

Description:

abstract static function in class isn't allowed,
but you can define static function in interface

This leads to funny inconsistency where you can create abstract static function 
using interfaces



Test script:
---
//abstract class A { abstract static function a(); } //invalid

interface I { static function i(); } //valid
abstract class B implements I {} //valid
//class C extends B{} // invalid
//Fatal error: Class C contains 1 abstract method and must therefore be 
declared abstract or implement the remaining methods (I::i) in php shell code 
on line 1

class D extends B{
static function i(){echo I have to be implemented; }
}







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


[PHP-BUG] Bug #64350 [NEW]: fmod returning wrong values for negative dividends

2013-03-04 Thread spam at michaelburri dot ch
From: spam at michaelburri dot ch
Operating system: OS X 10.8.2 (12C3012)
PHP version:  5.4Git-2013-03-04 (Git)
Package:  Math related
Bug Type: Bug
Bug description:fmod returning wrong values for negative dividends

Description:

The fmod(dividend, divisor) function returns wrong values for negative
dividends 
that are smaller than the divisor.

For example -0.8 mod 6 = -1 * 6 + 5.2, so the result of the modulo (=
remainder) 
is 5.2.

Test script:
---
?php
  echo fmod(-0.8, 6); //Should return 5.2, but returns -0.8
?

Expected result:

5.2

Actual result:
--
-0.8

-- 
Edit bug report at https://bugs.php.net/bug.php?id=64350edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64350r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64350r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=64350r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=64350r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=64350r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64350r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=64350r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=64350r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=64350r=support
Expected behavior:  https://bugs.php.net/fix.php?id=64350r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=64350r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=64350r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=64350r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64350r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=64350r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=64350r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=64350r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64350r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64350r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64350r=mysqlcfg



Bug #40597 [Com]: FILTER_VALIDATE_INT limited to system's signed integer size

2013-01-23 Thread spam at redfishbluefishdesign dot com
Edit report at https://bugs.php.net/bug.php?id=40597edit=1

 ID: 40597
 Comment by: spam at redfishbluefishdesign dot com
 Reported by:mail957253 at lemurtastic dot com
 Summary:FILTER_VALIDATE_INT limited to system's signed
 integer size
 Status: Not a bug
 Type:   Bug
 Package:Filter related
 Operating System:   Windows XP SP2
 PHP Version:5.2.1
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

Ya, this is a bug.


Previous Comments:

[2012-03-15 02:33:25] php dot 20 dot rinogo at xoxy dot net

I'm with the OP.  I'm migrating an app from HostMonster shared hosting to a 
WiredTree VPS.

On HM, filter_var runs as expected (as stated above).  On WiredTree, it returns 
false.

So, at BEST, PHP's behavior is inconsistent.


[2007-02-22 22:48:08] paj...@php.net

It returns a PHP integer which is limited to 32bits.

If you like to get a string containing a big integer, you can use the sanitize 
rule.

Once PHP has 64bits integer support, it will be available in filter as well.

Not a bug  bogus.


[2007-02-22 22:36:02] mail957253 at lemurtastic dot com

Description:

FILTER_VALIDATE_INT should validate anything that normal people consider an 
integer as such, rather than being limited to what my computer can store in 32 
bits.

Reproduce code:
---
filter_var('2147483648', FILTER_VALIDATE_INT);

Expected result:

returns '2147483648'

Actual result:
--
returns FALSE






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


Bug #61141 [Com]: curl_multi_select returns -1

2012-06-06 Thread ihate at spam dot com
Edit report at https://bugs.php.net/bug.php?id=61141edit=1

 ID: 61141
 Comment by: ihate at spam dot com
 Reported by:amoo_miki at yahoo dot com
 Summary:curl_multi_select returns -1
 Status: Assigned
 Type:   Bug
 Package:cURL related
 Operating System:   Windows 7 x64
 PHP Version:5.3.10
 Assigned To:pierrick
 Block user comment: N
 Private report: N

 New Comment:

Always returns -1 on Windows 7 64bit. Tried on 5.4 and 5.4.3. It worked a 
couple 
of months ago, perhaps some Win7 update changed something.


Previous Comments:

[2012-05-30 02:48:04] larue...@php.net

Pierrick, could you please look at this? :)


[2012-05-29 11:52:09] amoo_miki at yahoo dot com

I can confirm that PHP 5.4.3 (cli) (built: May  8 2012 00:23:27) suffers from 
the same bug.


[2012-05-25 12:08:45] kulminaator at gmail dot com

Running PHP 5.4.0 on Windows 7 has the same issue,  curl_multi_select always  
returns -1 


PHP Version = 5.4.0
System = Windows NT MSA-3644048 6.1 build 7601 (Windows 7 Enterprise Edition 
Service Pack 1) i586

cURL support = enabled
cURL Information = 7.24.0
Age = 3
Features
AsynchDNS = Yes
Debug = No
GSS-Negotiate = Yes
IDN = No
IPv6 = Yes
Largefile = Yes
NTLM = Yes
SPNEGO = No
SSL = Yes
SSPI = Yes
krb4 = No
libz = Yes
CharConv = No
Protocols = dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, 
pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
Host = i386-pc-win32
SSL Version = OpenSSL/0.9.8t
ZLib Version = 1.2.5
libSSH Version = libssh2/1.3.0


[2012-04-03 16:26:35] bompus at gmail dot com

Related to 60790 and 61240


[2012-02-29 08:17:12] amoo_miki at yahoo dot com

The curl details on 5.3.9 are:
cURL support = enabled
cURL Information = 7.21.7
Age = 3
Features
AsynchDNS = Yes
Debug = No
GSS-Negotiate = Yes
IDN = No
IPv6 = Yes
Largefile = Yes
NTLM = Yes
SPNEGO = No
SSL = Yes
SSPI = Yes
krb4 = No
libz = Yes
CharConv = No
Protocols = dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, 
pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
Host = i386-pc-win32
SSL Version = OpenSSL/0.9.8r
ZLib Version = 1.2.5
libSSH Version = libssh2/1.2.7


meaning the changes are related to one of the following:
   5.3.9 - 5.3.10
libcURL:  7.21.7 - 7.24.0
GSS/Negotiate:   Yes - NO
SSPI:Yes - No
OpenSSL:  0.9.8r - 0.9.8t
libSSH:1.2.7 - 1.3.0

I don't see a reason for the last 2 effecting anything.




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

https://bugs.php.net/bug.php?id=61141


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


Bug #54404 [Com]: Imagick::cropImage segfault

2012-02-14 Thread spam at spam dot com
Edit report at https://bugs.php.net/bug.php?id=54404edit=1

 ID: 54404
 Comment by: spam at spam dot com
 Reported by:davidjmemmett at gmail dot com
 Summary:Imagick::cropImage segfault
 Status: Not a bug
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.10
 PHP Version:5.3.6
 Block user comment: N
 Private report: N

 New Comment:

I confirm, I have this error too in the latest PHP 5.3.3-7+squeeze3 with 
Suhosin-
Patch (cli) (built: Jun 28 2011 08:24:40)


Previous Comments:

[2011-03-28 00:01:31] davidjmemmett at gmail dot com

I've just run this again, and gotten a different error. Code is the same.

(gdb) run test.php 
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/bin/php test.php
[Thread debugging using libthread_db enabled]
[New Thread 0xb7d6eb70 (LWP 4252)]
[Thread 0xb7d6eb70 (LWP 4252) exited]
[New Thread 0xb7d6eb70 (LWP 4253)]
[New Thread 0xb6e32b70 (LWP 4254)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6e32b70 (LWP 4254)]
0x0144e8dd in do_wait (bar=0x89f15f0, state=4)
at ../../../src/libgomp/config/linux/wait.h:53
53  ../../../src/libgomp/config/linux/wait.h: No such file or directory.
in ../../../src/libgomp/config/linux/wait.h


[2011-03-27 23:33:13] paj...@php.net

Please report imagick bugs at pecl.php.net


[2011-03-27 23:31:17] davidjmemmett at gmail dot com

Description:

Calls to Imagick::cropImage fail. I've tried the OS-shipped imagick.so and I've 
also installed it via pecl (after uninstalling the OS-shipped one).

Test script:
---
?php

$image = new Imagick('mario-1-1.gif');
$image-cropImage(8,8,0,0);

Expected result:

I expect no segmentation fault.

Actual result:
--
david@icecap:~/mario-images$ gdb php
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i686-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/bin/php...Reading symbols from 
/usr/lib/debug/usr/bin/php5...done.
done.
(gdb) run test.php 
Starting program: /usr/bin/php test.php
[Thread debugging using libthread_db enabled]
[New Thread 0xb7d6eb70 (LWP 3597)]
[Thread 0xb7d6eb70 (LWP 3597) exited]
[New Thread 0xb7d6eb70 (LWP 3598)]
[New Thread 0xb6e32b70 (LWP 3599)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6e32b70 (LWP 3599)]
0x0144e8da in ?? ()
(gdb)






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


Bug #54404 [Com]: Imagick::cropImage segfault

2012-02-14 Thread spam at spam dot com
Edit report at https://bugs.php.net/bug.php?id=54404edit=1

 ID: 54404
 Comment by: spam at spam dot com
 Reported by:davidjmemmett at gmail dot com
 Summary:Imagick::cropImage segfault
 Status: Not a bug
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.10
 PHP Version:5.3.6
 Block user comment: N
 Private report: N

 New Comment:

This problem can be cured by setting the number of used threads to 1:

$img-setResourceLimit(6, 1); // 6 means THREAD_LIMIT (unfortunately, there is 
no 
such constant defined, so u have to use this integer value);


Previous Comments:

[2012-02-14 20:37:54] spam at spam dot com

I confirm, I have this error too in the latest PHP 5.3.3-7+squeeze3 with 
Suhosin-
Patch (cli) (built: Jun 28 2011 08:24:40)


[2011-03-28 00:01:31] davidjmemmett at gmail dot com

I've just run this again, and gotten a different error. Code is the same.

(gdb) run test.php 
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/bin/php test.php
[Thread debugging using libthread_db enabled]
[New Thread 0xb7d6eb70 (LWP 4252)]
[Thread 0xb7d6eb70 (LWP 4252) exited]
[New Thread 0xb7d6eb70 (LWP 4253)]
[New Thread 0xb6e32b70 (LWP 4254)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6e32b70 (LWP 4254)]
0x0144e8dd in do_wait (bar=0x89f15f0, state=4)
at ../../../src/libgomp/config/linux/wait.h:53
53  ../../../src/libgomp/config/linux/wait.h: No such file or directory.
in ../../../src/libgomp/config/linux/wait.h


[2011-03-27 23:33:13] paj...@php.net

Please report imagick bugs at pecl.php.net


[2011-03-27 23:31:17] davidjmemmett at gmail dot com

Description:

Calls to Imagick::cropImage fail. I've tried the OS-shipped imagick.so and I've 
also installed it via pecl (after uninstalling the OS-shipped one).

Test script:
---
?php

$image = new Imagick('mario-1-1.gif');
$image-cropImage(8,8,0,0);

Expected result:

I expect no segmentation fault.

Actual result:
--
david@icecap:~/mario-images$ gdb php
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i686-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/bin/php...Reading symbols from 
/usr/lib/debug/usr/bin/php5...done.
done.
(gdb) run test.php 
Starting program: /usr/bin/php test.php
[Thread debugging using libthread_db enabled]
[New Thread 0xb7d6eb70 (LWP 3597)]
[Thread 0xb7d6eb70 (LWP 3597) exited]
[New Thread 0xb7d6eb70 (LWP 3598)]
[New Thread 0xb6e32b70 (LWP 3599)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6e32b70 (LWP 3599)]
0x0144e8da in ?? ()
(gdb)






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


Bug #40417 [Com]: Suddenly binding as many vars as there are *identical* prepared tokens

2011-12-26 Thread spam at shishnet dot org
Edit report at https://bugs.php.net/bug.php?id=40417edit=1

 ID: 40417
 Comment by: spam at shishnet dot org
 Reported by:exaton at free dot fr
 Summary:Suddenly binding as many vars as there are
 *identical* prepared tokens
 Status: Closed
 Type:   Bug
 Package:PDO related
 Operating System:   Windows XP Pro SP2
 PHP Version:5.2.1
 Block user comment: N
 Private report: N

 New Comment:

Can someone clarify what is meant by fixed? I'm finding that binding multiple 
paramaters with the same name works fine for PDO/mysql, but fails in weird ways 
for PDO/postgres...


Previous Comments:

[2007-03-06 00:53:01] il...@php.net

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.




[2007-03-03 15:13:15] exaton at free dot fr

*Damn* *it*.

Good on you for spotting that, mgagne. For some freaking reason I was so bent 
on examining the documentation for binding methods that I skipped prepare(). No 
idea why.

Ilia, my apologies again, therefore ; but really I had not understood your 
intermediate reply. At least now we have the knowledge that you were working 
with all along.

So now, of course, the question is : should the spec' be changed in favor of 
PHP's behaviour up until now ? I of course advocate changing the manual, 
allowing for the new feature of multiple parameter markers with the same 
name. I argue with the following points :

1) This issue already seems quite popular ; obviously, quite a few people 
relied on the feature without realizing that it went against the true 
specification.

Now that, of course, is a rather specious argument ; developers working with 
PHP should stick to the spec' and get bent if they make use of unintended 
functionality which is suddenly dropped -- I'm the first to agree. However :

2) I see no compelling reason for which PHP should not support this feature. 
It is a very natural feature that makes perfect sense when it is used. It is 
most practical is naive search engine implementations for small sites 
(auto-generated : WHERE (title LIKE :term0 OR text LIKE :term0 OR author_name 
LIKE :term0) AND (title LIKE :term1 OR text LIKE :term1 OR author_name LIME 
:term1) ...).

The underlying code is already designed in such a way as to support the feature 
of multiple parameter markers with the same name. The only change in PHP 5.2.1 
is a condition check that throws an error, based on the specification. And 
admittedly, writing that check in conformance with the feature would be 
expensive (see e.g. my suggestion above) and/or cumbersome or complicated, etc.

This would be a call for the PHP core developers.


[2007-03-02 21:59:15] mgagne at generationphp dot net

Unfortunately for some people, Iliaa is right:

You cannot use a named parameter marker of the same name twice in a prepared 
statement.

However, even if it's was added to the documentation about a year ago (Sun Jan 
8 14:02:42 2006 UTC), the behavior changed between PHP 5.2.0 and PHP 5.2.1 and 
it should have been added to the changelog as well.

I didn't know when happened to my application until I saw this bug report.


[2007-03-02 07:25:23] mgagne at generationphp dot net

Hi,

I have the same bug using PHP 5.2.1. I had to downgrade to PHP 5.2.0 and it 
fixed the problem.

I'm using PDO::MYSQL. I have 2 bound variables in my request. All 2 have the 
same name. Since I'm only binding value once using PDO::bindValue, the error is 
triggered without valid reason.

My query is similar to this one:

SELECT *
FROM posts
WHERE post_title LIKE :q OR
  post_text LIKE :q

I'm binding value once like this:

$sth-bindValue(':q', $q, PDO::PARAM_STR);

This means there is something wrong within the internal count.

Also for the records, issue does not seem to be related to any specific PDO 
driver. (issue is present with PostGreSQL and MySQL driver)

Thanks


[2007-03-01 15:30:09] exaton at free dot fr

@ xing : I had not seen that word from Wez, but indeed is does make sense to 
add the check in principle -- the API should make sure that enough tokens were 
bound (to enhance its service and avoid silent bugs) and can also guarantee 
that not too many were bound (might as well).

It's back to the problem with bindno, however... I'm not even sure of the name 
of that variable. I think it would stand for number of bindings, e.g. the 
expected number of bound

Bug #54137 [Com]: file_get_contents POST request sends additional line breaks

2011-05-16 Thread spam at abma dot de
Edit report at http://bugs.php.net/bug.php?id=54137edit=1

 ID: 54137
 Comment by: spam at abma dot de
 Reported by:maurice-php at mertinkat dot net
 Summary:file_get_contents POST request sends additional line
 breaks
 Status: Open
 Type:   Bug
 Package:Streams related
 Operating System:   all
 PHP Version:5.3.5
 Block user comment: N
 Private report: N

 New Comment:

is this the same bug
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/650779 ?


Previous Comments:

[2011-04-26 09:12:02] xiezhenye at gmail dot com

I also meet with this problem.

As http protocol, message body size should exactly match the
content-length. when there exists unwanted \r\n\r\n, it maybe cause
some unexpected result, as connect resetted by server.


[2011-03-14 18:25:35] christophe dot bliard at trux dot info

I have the same problem here, with PHP 5.3.2 and also 5.2.10.



Another thing that may be interesting: if you do the same HTTP POST
request on a 

web server on localhost, then there will not be any \r\n\r\n after the
request.


[2011-03-02 14:45:02] maurice-php at mertinkat dot net

Description:

When doing HTTP POST requests using file_get_contents and an appropriate
stream context (http method = POST, content = ...) two additional line
breaks (\r\n\r\n) are added below the POST message body. This is wrong
according to the default encoding application/x-www-form-urlencoded
and has been seen to upset some webservers (content length is
incorrect).



Run the testscript and check the traffic using tcpdump/tcpflow or
wireshark. You'll see additional lines at the end of the message body.



Attached is a very simple patch against http_fopen_wrapper.c from PHP
5.3.5 source which removes sending \r\n\r\n.

Test script:
---
?php



$ctx = stream_context_create(array(

'http' = array(

'method' = 'POST',

'header' = 'Content-Type: application/x-www-form-urlencoded',

'content' = 'a=1b=2',

)

));



$response = file_get_contents('http://www.php.net/', false, $ctx);

echo $response;









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


[PHP-BUG] Bug #52218 [NEW]: php module not loaded when php module is enabled and then restarted

2010-07-01 Thread php at spam dot wizbit dot be
From: 
Operating system: Linux
PHP version:  Irrelevant
Package:  Apache2 related
Bug Type: Bug
Bug description:php module not loaded when php module is enabled and then 
restarted

Description:

When apache is restarted after enabling php then it does not load PHP.

When apache is restarted again then it does load PHP.



I first noticed this with (stock) php-4.4.9 and apache 2.2.15 where it
resulted in segmentation faults on every request.

I then tested this with php-5.2.6 that comes with debian
(PHP/5.2.6-1+lenny8 with Suhosin-Patch) and it shows the same problem but
does not segfault.





Steps to reproduce (on debian):

1. install apache2 and php

2. stop apache: apache2ctl -k stop

3. disable the php module: rm /etc/apache2/mods-enabled/php.*

4. start apache: apache2ctl -k start

5. enable the php module: ln -s /etc/apache2/mods-available/php.*
/etc/apache2/mods-enabled/

6. restart apache: apache2ctl -k restart

7. Check the log file = PHP not loaded. (on php-4.4.9 every request from
this moment on caused a segmentation fault)

8. restart apache again: apache2ctl -k restart

9. Check the log file = PHP is loaded



NOTE: do not use the debian init script (/etc/init.d/apache2). 







I do not know what the severity of this issue should be.

It does not appear to be segfaulting in recent versions but that does not
nessesarly mean that the segfault is fixed (it could be hiding somewhere -
I did not try very hard to get it to segfault).







The logfile/traces/a guess where the problem is:



An example log file:



PHP disabled: apache2ctl -k start:

  [Thu Jul 01 10:55:03 2010] [notice] Apache/2.2.9 (Debian) configured --
resuming normal operations



PHP enabled; apache2ctl -k restart:

  [Thu Jul 01 10:55:10 2010] [notice] SIGHUP received.  Attempting to
restart

  [Thu Jul 01 10:55:10 2010] [notice] Apache/2.2.9 (Debian) configured --
resuming normal operations

== PHP not loaded



Another restart: apache2ctl -k restart:

  [Thu Jul 01 10:55:15 2010] [notice] SIGHUP received.  Attempting to
restart

  [Thu Jul 01 10:55:15 2010] [notice] Apache/2.2.9 (Debian)
PHP/5.2.6-1+lenny8 with Suhosin-Patch configured -- resuming normal
operations

== PHP now loaded







debugging this with php 4.4.9 may points to a problem in
sapi/apache2handler/sapi_apache2.c: php_apache_server_startup.

(I did not debug this with php 5 but I did check the code in trunk and it
looks the same).



The start of the code:

static int

php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, 
apr_pool_t
*ptemp, server_rec *s)

{

void *data = NULL;

const char *userdata_key = apache2hook_post_config;



/* Apache will load, unload and then reload a DSO module. This

 * prevents us from starting PHP until the second load. */





The comment makes me believe that it is the expectation that
php_apache_server_startup is called twice but that does not appear to be
the case.



gdb session:



Breakpoint 1 (php_apache_server_startup) pending.

(gdb) c

Continuing.



Program received signal SIGHUP, Hangup.

0xb7c2cfb8 in select () from /ub/lib/libc.so.6

(gdb) c

Continuing.



Program received signal SIGHUP, Hangup.

0xb7b9df51 in kill () from /ub/lib/libc.so.6



# NOTE: this is the first restart after enabling the module

(gdb) c

Continuing.

Breakpoint 2 at 0xb78de20f: file
/root/work/php-4.4.9/sapi/apache2handler/sapi_apache2.c, line 367.

Pending breakpoint php_apache_server_startup resolved



Breakpoint 2, php_apache_server_startup (pconf=0x80e80a8, plog=0x81301c8,
ptemp=0x80f20d0, s=0x80ed0c0) at
/root/work/php-4.4.9/sapi/apache2handler/sapi_apache2.c:367

367 void *data = NULL;

(gdb) n

368 const char *userdata_key = apache2hook_post_config;

(gdb) n

372 apr_pool_userdata_get(data, userdata_key, s-process-pool);

(gdb) n

373 if (data == NULL) {

(gdb) p data

$1 = (void *) 0x0

(gdb) c

Continuing.



# NOTE: PHP is not loaded in apache even tho it is enabled



Program received signal SIGHUP, Hangup.

0xb7c2cfb8 in select () from /ub/lib/libc.so.6

(gdb) c

Continuing.



Program received signal SIGHUP, Hangup.

0xb7b9df51 in kill () from /ub/lib/libc.so.6

(gdb) c

Continuing.

# NOTE: this is the second restart after enabling the module





warning: Temporarily disabling breakpoints for unloaded shared library
/ub/pkg/httpd/modules/libphp4.so



Breakpoint 2, php_apache_server_startup (pconf=0x80e80a8, plog=0x81301c8,
ptemp=0x81361e0, s=0x80ed0c0) at
/root/work/php-4.4.9/sapi/apache2handler/sapi_apache2.c:367

367 void *data = NULL;

(gdb) n

368 const char *userdata_key = apache2hook_post_config;

(gdb) n

372 apr_pool_userdata_get(data, userdata_key, s-process-pool);

(gdb) n

373 if (data == NULL) {

(gdb) p data

$2 = (void *) 0x1

(gdb) n

384 if 

Bug #52218 [Bgs]: php module not loaded when php module is enabled and then restarted

2010-07-01 Thread php at spam dot wizbit dot be
Edit report at http://bugs.php.net/bug.php?id=52218edit=1

 ID:   52218
 User updated by:  php at spam dot wizbit dot be
 Reported by:  php at spam dot wizbit dot be
 Summary:  php module not loaded when php module is enabled and
   then restarted
 Status:   Bogus
 Type: Bug
 Package:  Apache2 related
 Operating System: Linux
-PHP Version:  Irrelevant
+PHP Version:  5.3.3-RC1

 New Comment:

Since you insisted: Retested with 5.3.3-RC1. (even tho I checked the
code in trunk and said it was the same.)



No surprise: the same problem exist.



First start with php disabled:

Thu Jul 01 18:02:07 2010] [notice] Digest: generating secret for digest
authentication ...

[Thu Jul 01 18:02:07 2010] [notice] Digest: done

[Thu Jul 01 18:02:07 2010] [notice] Apache/2.2.15 (Unix) DAV/2
configured -- resuming normal operations





First restart with php enabled:

[Thu Jul 01 18:02:13 2010] [notice] SIGHUP received.  Attempting to
restart

[Thu Jul 01 18:02:13 2010] [notice] Digest: generating secret for digest
authentication ...

[Thu Jul 01 18:02:13 2010] [notice] Digest: done

[Thu Jul 01 18:02:13 2010] [notice] Apache/2.2.15 (Unix) DAV/2
configured -- resuming normal operations



= PHP not loaded but it is enabled in the code



Second restart with PHP enabled:



[Thu Jul 01 18:02:15 2010] [notice] SIGHUP received.  Attempting to
restart

[Thu Jul 01 18:02:16 2010] [notice] Digest: generating secret for digest
authentication ...

[Thu Jul 01 18:02:16 2010] [notice] Digest: done

[Thu Jul 01 18:02:16 2010] [notice] Apache/2.2.15 (Unix) DAV/2
PHP/5.3.3-RC1 configured -- resuming normal operations





= PHP now loaded.





Note that this never was a problem debian builds. I said I experienced
this first with a stock php-4.4.9 and that I then tested with debian
since that was easier then compiling a stock 5.3.3 build.


Previous Comments:

[2010-07-01 16:03:35] johan...@php.net

Both 4.4.9 and 5.2.6 are old. If there is an issue with the Debian
builds please talk to them.


[2010-07-01 12:10:27] php at spam dot wizbit dot be

Description:

When apache is restarted after enabling php then it does not load PHP.

When apache is restarted again then it does load PHP.



I first noticed this with (stock) php-4.4.9 and apache 2.2.15 where it
resulted in segmentation faults on every request.

I then tested this with php-5.2.6 that comes with debian
(PHP/5.2.6-1+lenny8 with Suhosin-Patch) and it shows the same problem
but does not segfault.





Steps to reproduce (on debian):

1. install apache2 and php

2. stop apache: apache2ctl -k stop

3. disable the php module: rm /etc/apache2/mods-enabled/php.*

4. start apache: apache2ctl -k start

5. enable the php module: ln -s /etc/apache2/mods-available/php.*
/etc/apache2/mods-enabled/

6. restart apache: apache2ctl -k restart

7. Check the log file = PHP not loaded. (on php-4.4.9 every request
from this moment on caused a segmentation fault)

8. restart apache again: apache2ctl -k restart

9. Check the log file = PHP is loaded



NOTE: do not use the debian init script (/etc/init.d/apache2). 







I do not know what the severity of this issue should be.

It does not appear to be segfaulting in recent versions but that does
not nessesarly mean that the segfault is fixed (it could be hiding
somewhere - I did not try very hard to get it to segfault).







The logfile/traces/a guess where the problem is:



An example log file:



PHP disabled: apache2ctl -k start:

  [Thu Jul 01 10:55:03 2010] [notice] Apache/2.2.9 (Debian) configured
-- resuming normal operations



PHP enabled; apache2ctl -k restart:

  [Thu Jul 01 10:55:10 2010] [notice] SIGHUP received.  Attempting to
restart

  [Thu Jul 01 10:55:10 2010] [notice] Apache/2.2.9 (Debian) configured
-- resuming normal operations

== PHP not loaded



Another restart: apache2ctl -k restart:

  [Thu Jul 01 10:55:15 2010] [notice] SIGHUP received.  Attempting to
restart

  [Thu Jul 01 10:55:15 2010] [notice] Apache/2.2.9 (Debian)
PHP/5.2.6-1+lenny8 with Suhosin-Patch configured -- resuming normal
operations

== PHP now loaded







debugging this with php 4.4.9 may points to a problem in
sapi/apache2handler/sapi_apache2.c: php_apache_server_startup.

(I did not debug this with php 5 but I did check the code in trunk and
it looks the same).



The start of the code:

static int

php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog,
apr_pool_t *ptemp, server_rec *s)

{

void *data = NULL;

const char *userdata_key = apache2hook_post_config;



/* Apache will load, unload and then reload a DSO module. This

 * prevents us from starting PHP until the second load. */





The comment makes me believe

Bug #51298 [Com]: Error when loading php5apache2_2.dll

2010-05-25 Thread peter dot martin at spam dot la
Edit report at http://bugs.php.net/bug.php?id=51298edit=1

 ID:   51298
 Comment by:   peter dot martin at spam dot la
 Reported by:  trotsky_icepick at hotmail dot com
 Summary:  Error when loading php5apache2_2.dll
 Status:   Assigned
 Type: Bug
 Package:  Apache2 related
 Operating System: Windows Vista SP2
 PHP Version:  5.3.2
 Assigned To:  pajoye

 New Comment:

I've got faulting module php5ts.dll error while starting the Apache
server with PHP and Postgres in following instalation:

- httpd-2.2.15-win32-x86-openssl-0.9.8m-r2.msi

- php-5.3.2-Win32-VC6-x86.zip

httpd.conf:

- nothing unusual configured

php.ini configuration:

- set up my own php error log file error_log = C:/PHP/logs/error.log

- uncomment PgSQL extension



The solution for this was to modify httpd.conf as follows:

LoadModule php5_module C:/PHP/php5apache2_2.dll

PHPIniDir C:/PHP

# added

Loadfile C:/PHP/php5ts.dll 

Loadfile C:/PHP/libpq.dll



Try it and send response...:)


Previous Comments:

[2010-05-19 17:18:00] paj...@php.net

If you feel like you can fix this bug within days, heh, please go ahead.


[2010-05-19 17:10:33] williams at uncc dot edu

There is still a problem with the Windows PHP binaries.  From 4/19
pajoye seems to believe it is a date bug to fix as soon as possible.
It has been a month!



I have php-5.3.2-Win32-VC6-x86 and httpd-2.2.15-win32-x86-no_ssl
installed.  If I run phpinfo() (in web page) more than once (first run -
get results, second or later runs within a few seconds - get crash) I
get this error message:



AppName httpd.exe  AppVer 2.2.15.0  ModName php5ts.dll

ModVer 5.3.2.0  offset 001d79b5



I have searched for other versions of php5ts.dll - none

I have NOT mixed vc9 PHP with Apache



PHP seems to run okay in command-line, ie I can run phpinfo() in cmd box
with no problem.  I If run as test web page I get the error.



Here are php -m /php -m -n results:



C:\php -m

[PHP Modules]

bcmath

calendar

com_dotnet

Core

ctype

date

dom

ereg

filter

ftp

hash

iconv

json

libxml

mcrypt

mhash

mysqlnd

odbc

pcre

PDO

Phar

Reflection

session

SimpleXML

SPL

standard

tokenizer

wddx

xml

xmlreader

xmlwriter

zip

zlib



[Zend Modules]





C:\php -m -n

[PHP Modules]

bcmath

calendar

com_dotnet

Core

ctype

date

dom

ereg

filter

ftp

hash

iconv

json

libxml

mcrypt

mhash

mysqlnd

odbc

pcre

PDO

Phar

Reflection

session

SimpleXML

SPL

standard

tokenizer

wddx

xml

xmlreader

xmlwriter

zip

zlib



[Zend Modules]



I have disabled all but core modules.


[2010-04-30 15:43:09] slowchaos at msn dot com

Update I have Apached 2.2.15 and PHP 5.3.2 running just fine (WinXP
system). I'm not sure of the difference in 5.2 and 5.3 - I'm not a nuts
and bolts php guy - but all is now well in my world :)


[2010-04-30 06:55:02] slowchaos at msn dot com

Had this problem with Apache 2.2.15 and PHP 5.2.13. Tried rolling back
to earlier versions of PHP - back to PHP 5.2.10. Same thing. Rolled back
to Apache 2.2.14 - still same issue. My apache crashes when trying to
enable mysqli or mysql extension. System path is correct. Libmysql is in
appropriate place. Mcrypt also crashes the server as well as a few
others.


[2010-04-20 01:48:09] paj...@php.net

It happens to be a date bug (thread safety issue). We are trying to get
a fix as soon as possible.




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/bug.php?id=51298


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


Req #46919 [Com]: Multi threading

2010-04-01 Thread speedy dot spam at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=46919edit=1

 ID:   46919
 Comment by:   speedy dot spam at gmail dot com
 Reported by:  n0valyfe at gamergrid dot net
 Summary:  Multi threading
 Status:   Open
 Type: Feature/Change Request
 Package:  Feature/Change Request
 Operating System: All
 PHP Version:  5.2.8

 New Comment:

What would be really great to have is something similar to classic
pcntl_clone() linux kernel function on the PHP level, accepting a
function to be executed as a parameter and sharing all the
variables/state with the primary and other created threads.



Locking could be done with a simple and optional use of mutexes on the
application level, if one needs to view fully consistent state of a
certain variable / array. (ie. otherwise, foreach() loop while writing
to an array in the other thread might not see some recently added
entries)



As an idea, on the internal implementation side, copy-on-write semantics
could be used with read-only operations seeing the previous version
while the write/modify operation is executed on a copy.



Even if unstable at first (marked as experimental or some such), it
would be a good starting point for making PHP thread-safe, re-entrant,
and multi-core compatible.


Previous Comments:

[2008-12-21 19:39:34] n0valyfe at gamergrid dot net

Description:

Would it be possible to add some sort of multithreading into PHP, say a
new thread is created via a function, to execute a function or object
method in a new thread.



Keeping the scope intact, so that $this and global vars work inside that
function in another thread.



I think this would benefit PHP in many ways, for instance a script
wouldnt hang when executing something that can take a while, it can
just open a new thread.







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


Bug #50394 [Com]: Reference argument converted to value in __call

2010-03-21 Thread spam dot here at verizon dot net
Edit report at http://bugs.php.net/bug.php?id=50394edit=1

 ID:   50394
 Comment by:   spam dot here at verizon dot net
 Reported by:  tstarling at wikimedia dot org
 Summary:  Reference argument converted to value in __call
 Status:   Closed
 Type: Bug
 Package:  Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.3.1

 New Comment:

Mediawiki still reports that the problem still exists.



http://www.mediawiki.org/wiki/Project:Support_desk#PHP_5.3_Problem_Still_Exists



And it is still in their install document.



http://www.mediawiki.org/wiki/Installation



PHP version 5.1 or later (5.2.x recommended). PHP 5.3.1 is incompatible
with MediaWiki due to a bug.


Previous Comments:

[2009-12-18 19:20:33] s...@php.net

Automatic comment from SVN on behalf of stas
Revision: http://svn.php.net/viewvc/?view=revisionrevision=292296
Log: Fixed bug #50394 (Reference argument converted to value in __call)


[2009-12-18 19:13:37] s...@php.net

This bug has been fixed in SVN.

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.

fixed, thanks


[2009-12-18 19:12:12] s...@php.net

Automatic comment from SVN on behalf of stas
Revision: http://svn.php.net/viewvc/?view=revisionrevision=292295
Log: fix regression bug #50394: Reference argument converted to value in
__call


[2009-12-17 19:15:18] s...@php.net

This bug is actually deeper than it appears. The problem seems to be
that when __call is used, user function is simulated by internal
function processing __call. And there is when it gets hairy, since the
simulating function does not accept parameters by-ref, so they get
separated. 

I'll think about how to fix this situation - there might be a way to
carry the reference through... 


[2009-12-08 04:46:10] tstarling at wikimedia dot org

For the record, I've isolated this further, and the annotation suggests
it was introduced in r287466 by stas in the course of fixing another
bug.




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/bug.php?id=50394


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


#48684 [Com]: cant make STDIN non blocking

2009-12-11 Thread spam at helper3000 dot net
 ID:   48684
 Comment by:   spam at helper3000 dot net
 Reported By:  ryan at ryanmills dot net
 Status:   Open
 Bug Type: Streams related
 Operating System: win32 only - Vista X64
 PHP Version:  5.2.10
 New Comment:

Would also just like to add that after a mere day, a busy friend I know
managed to fix PHP 5.2 and apply the patch to 5.3, it now works
perfectly using his modified build.
UNDER A DAY. And this issue has been continuing in PHP for at least 7
years...


Previous Comments:


[2009-12-08 20:59:57] spam at helper3000 dot net

Problem experianced using 5.3.1 in both thread and non-thread safe
binaries on windows XP SP2.

I too have read that it is an ongoing problem; it should have been
fixed many years ago.



[2009-10-20 23:32:06] ron at rongage dot org

Actually, it still doesn't work on Linux either (5.2.11).

Yes, the actual fread is non-blocking.  However, if you press any key,
it is NOT registered so you can't react to keystrokes.

The code:
?php
stream_set_blocking(STDIN,FALSE);
while (1)
  {
  $x = fread(STDIN,1);
  var_dump($x);
  if ($x != )
exit;
  }

As expected with non-blocking, the fread doesn't hold up execution of
the program.  However, if a key is hit (something comes in on STDIN),
the program should immediately exit.  It doesn't - it just keeps on
going, and going, and going

Ron



[2009-06-25 22:43:30] ryan at ryanmills dot net

tested on linux and 32bit windows. Linux works, windows does not.



[2009-06-25 04:49:01] ryan at ryanmills dot net

Description:

I have read a number of past bug reports from 2002 to just a month or
two ago. Under windows it does not seem that you can make STDIN non
blocking.

Follow code from: http://bugs.php.net/bug.php?id=47893edit=2

Tested on 5.2.9-2 and 5.2.10

Notes say it was fixed in CVS so I assume 5.2.10 would have had the
fix.


*NOTE php.ini changes

;;;
; Resource Limits ;
;;;

max_execution_time = 0   ; Maximum execution time of each script, in
seconds
max_input_time = 0  ; Maximum amount of time each script may spend
parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 512M  ; Maximum amount of memory a script may
consume (128MB)



Reproduce code:
---
?php
stream_set_blocking(STDIN, FALSE);
while (1) {
var_dump(fread(STDIN,1));
echo \n;;
}
?

Expected result:

A never-ending sequence of var_dumps of either an empty string or a
typed character

Actual result:
--
stuck waiting for the user to press enter.





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



#48684 [Com]: cant make STDIN non blocking

2009-12-11 Thread spam at helper3000 dot net
 ID:   48684
 Comment by:   spam at helper3000 dot net
 Reported By:  ryan at ryanmills dot net
 Status:   Feedback
 Bug Type: Streams related
 Operating System: win32 only - Vista X64
 PHP Version:  5.2.10
 New Comment:

http://rapidshare.com/files/319636981/php-5.3.1L.zip.html

He's refining it more and as so includes no source.


Previous Comments:


[2009-12-11 22:46:48] paj...@php.net

And where is the patch then?



[2009-12-11 22:43:54] spam at helper3000 dot net

Would also just like to add that after a mere day, a busy friend I know
managed to fix PHP 5.2 and apply the patch to 5.3, it now works
perfectly using his modified build.
UNDER A DAY. And this issue has been continuing in PHP for at least 7
years...



[2009-12-08 20:59:57] spam at helper3000 dot net

Problem experianced using 5.3.1 in both thread and non-thread safe
binaries on windows XP SP2.

I too have read that it is an ongoing problem; it should have been
fixed many years ago.



[2009-10-20 23:32:06] ron at rongage dot org

Actually, it still doesn't work on Linux either (5.2.11).

Yes, the actual fread is non-blocking.  However, if you press any key,
it is NOT registered so you can't react to keystrokes.

The code:
?php
stream_set_blocking(STDIN,FALSE);
while (1)
  {
  $x = fread(STDIN,1);
  var_dump($x);
  if ($x != )
exit;
  }

As expected with non-blocking, the fread doesn't hold up execution of
the program.  However, if a key is hit (something comes in on STDIN),
the program should immediately exit.  It doesn't - it just keeps on
going, and going, and going

Ron



[2009-06-25 22:43:30] ryan at ryanmills dot net

tested on linux and 32bit windows. Linux works, windows does not.



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

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



#48684 [Com]: cant make STDIN non blocking

2009-12-08 Thread spam at helper3000 dot net
 ID:   48684
 Comment by:   spam at helper3000 dot net
 Reported By:  ryan at ryanmills dot net
 Status:   Open
 Bug Type: Streams related
 Operating System: win32 only - Vista X64
 PHP Version:  5.2.10
 New Comment:

Problem experianced using 5.3.1 in both thread and non-thread safe
binaries on windows XP SP2.

I too have read that it is an ongoing problem; it should have been
fixed many years ago.


Previous Comments:


[2009-10-20 23:32:06] ron at rongage dot org

Actually, it still doesn't work on Linux either (5.2.11).

Yes, the actual fread is non-blocking.  However, if you press any key,
it is NOT registered so you can't react to keystrokes.

The code:
?php
stream_set_blocking(STDIN,FALSE);
while (1)
  {
  $x = fread(STDIN,1);
  var_dump($x);
  if ($x != )
exit;
  }

As expected with non-blocking, the fread doesn't hold up execution of
the program.  However, if a key is hit (something comes in on STDIN),
the program should immediately exit.  It doesn't - it just keeps on
going, and going, and going

Ron



[2009-06-25 22:43:30] ryan at ryanmills dot net

tested on linux and 32bit windows. Linux works, windows does not.



[2009-06-25 04:49:01] ryan at ryanmills dot net

Description:

I have read a number of past bug reports from 2002 to just a month or
two ago. Under windows it does not seem that you can make STDIN non
blocking.

Follow code from: http://bugs.php.net/bug.php?id=47893edit=2

Tested on 5.2.9-2 and 5.2.10

Notes say it was fixed in CVS so I assume 5.2.10 would have had the
fix.


*NOTE php.ini changes

;;;
; Resource Limits ;
;;;

max_execution_time = 0   ; Maximum execution time of each script, in
seconds
max_input_time = 0  ; Maximum amount of time each script may spend
parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 512M  ; Maximum amount of memory a script may
consume (128MB)



Reproduce code:
---
?php
stream_set_blocking(STDIN, FALSE);
while (1) {
var_dump(fread(STDIN,1));
echo \n;;
}
?

Expected result:

A never-ending sequence of var_dumps of either an empty string or a
typed character

Actual result:
--
stuck waiting for the user to press enter.





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



#50268 [NEW]: PHP doesn't start: ntwdblib.dll not found

2009-11-23 Thread ben dot arnold dot spam at hotmail dot com
From: ben dot arnold dot spam at hotmail dot com
Operating system: Windows Vista
PHP version:  5.3.1
PHP Bug Type: Windows Installer
Bug description:  PHP doesn't start: ntwdblib.dll not found

Description:

I am running Apache 2.2.14. I do not have a database installed.


What I did:

1. Downloaded latest version of PHP (php-5.3.1-Win32-VC6-x86.msi)
2. Ran the installer using default values except:
* Web server: Apache 2.2.x Module
* Apache configuration directory: C:\Program Files\Apache Software
Foundation\Apache2.2\conf\
3. Tried to start Apache.
4. Tried to run PHP by entering php in a command window.


What happened:

1. Apache failed to start. A dialogue box says The requested operation
has failed and Windows error reporting kicked in. There is no error in
Apache's error.log.
2. When I tried to start php I get an error dialogue box titled php.exe -
Unable To Locate Component. The text of the box is:

This application has failed to start because ntwdblib.dll was not found.
Re-installing the application may fix this problem.


What I expected to happen:

1. I expected that Apache would start with PHP loaded as a module. I
expected to be able to put a php file in my htdocs directory and that I
could get it to display a Hello World message when I requested it through
Apache.

2. I expected PHP to display usage information when run from the
commandline.


I have tried uninstalling PHP, downloading the installer again and
reinstalling but I have the same problem.

When I uninstall PHP Apache works normally again.

I have Googled this error message and seen various people report that it
is connected to a database misconfiguration. I currently do not have a
database installed and have done nothing to configure one in PHP. All my
configuration steps are listed above.

I am unable to copy ntwdblib.dll from MSSQL 2000 as suggested in bug
#38849 because I do not have MSSQL installed. In any case that bug looks
like it is related to a different problem (I am not trying to connect to a
database I am just trying to launch PHP).



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



#50268 [Opn]: PHP doesn't start: ntwdblib.dll not found

2009-11-23 Thread ben dot arnold dot spam at hotmail dot com
 ID:   50268
 User updated by:  ben dot arnold dot spam at hotmail dot com
 Reported By:  ben dot arnold dot spam at hotmail dot com
 Status:   Open
 Bug Type: Windows Installer
 Operating System: Windows Vista
 PHP Version:  5.3.1
 New Comment:

Any suggestions for a workaround would be much appreciated.

As it stands I am not able to install PHP at all!


Previous Comments:


[2009-11-23 08:40:41] ben dot arnold dot spam at hotmail dot com

Description:

I am running Apache 2.2.14. I do not have a database installed.


What I did:

1. Downloaded latest version of PHP (php-5.3.1-Win32-VC6-x86.msi)
2. Ran the installer using default values except:
* Web server: Apache 2.2.x Module
* Apache configuration directory: C:\Program Files\Apache Software
Foundation\Apache2.2\conf\
3. Tried to start Apache.
4. Tried to run PHP by entering php in a command window.


What happened:

1. Apache failed to start. A dialogue box says The requested operation
has failed and Windows error reporting kicked in. There is no error in
Apache's error.log.
2. When I tried to start php I get an error dialogue box titled
php.exe - Unable To Locate Component. The text of the box is:

This application has failed to start because ntwdblib.dll was not
found. Re-installing the application may fix this problem.


What I expected to happen:

1. I expected that Apache would start with PHP loaded as a module. I
expected to be able to put a php file in my htdocs directory and that I
could get it to display a Hello World message when I requested it
through Apache.

2. I expected PHP to display usage information when run from the
commandline.


I have tried uninstalling PHP, downloading the installer again and
reinstalling but I have the same problem.

When I uninstall PHP Apache works normally again.

I have Googled this error message and seen various people report that
it is connected to a database misconfiguration. I currently do not have
a database installed and have done nothing to configure one in PHP. All
my configuration steps are listed above.

I am unable to copy ntwdblib.dll from MSSQL 2000 as suggested in bug
#38849 because I do not have MSSQL installed. In any case that bug looks
like it is related to a different problem (I am not trying to connect to
a database I am just trying to launch PHP).







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



#50268 [Asn]: PHP doesn't start: ntwdblib.dll not found

2009-11-23 Thread ben dot arnold dot spam at hotmail dot com
 ID:   50268
 User updated by:  ben dot arnold dot spam at hotmail dot com
 Reported By:  ben dot arnold dot spam at hotmail dot com
 Status:   Assigned
 Bug Type: Windows Installer
 Operating System: Windows Vista
 PHP Version:  5.3.1
 Assigned To:  pajoye
 New Comment:

Thanks for the speedy response!

I just commented out extension=php_mssql.dll and it all works
perfectly now. Apache starts and I have hello world up and running.


Previous Comments:


[2009-11-23 09:08:27] paj...@php.net

Do you need the mssql extension? If not simply comment out the mssql
lines in your php.ini.

I'll look into this problem (not sure why it did not install it).



[2009-11-23 08:47:13] ben dot arnold dot spam at hotmail dot com

Any suggestions for a workaround would be much appreciated.

As it stands I am not able to install PHP at all!



[2009-11-23 08:40:41] ben dot arnold dot spam at hotmail dot com

Description:

I am running Apache 2.2.14. I do not have a database installed.


What I did:

1. Downloaded latest version of PHP (php-5.3.1-Win32-VC6-x86.msi)
2. Ran the installer using default values except:
* Web server: Apache 2.2.x Module
* Apache configuration directory: C:\Program Files\Apache Software
Foundation\Apache2.2\conf\
3. Tried to start Apache.
4. Tried to run PHP by entering php in a command window.


What happened:

1. Apache failed to start. A dialogue box says The requested operation
has failed and Windows error reporting kicked in. There is no error in
Apache's error.log.
2. When I tried to start php I get an error dialogue box titled
php.exe - Unable To Locate Component. The text of the box is:

This application has failed to start because ntwdblib.dll was not
found. Re-installing the application may fix this problem.


What I expected to happen:

1. I expected that Apache would start with PHP loaded as a module. I
expected to be able to put a php file in my htdocs directory and that I
could get it to display a Hello World message when I requested it
through Apache.

2. I expected PHP to display usage information when run from the
commandline.


I have tried uninstalling PHP, downloading the installer again and
reinstalling but I have the same problem.

When I uninstall PHP Apache works normally again.

I have Googled this error message and seen various people report that
it is connected to a database misconfiguration. I currently do not have
a database installed and have done nothing to configure one in PHP. All
my configuration steps are listed above.

I am unable to copy ntwdblib.dll from MSSQL 2000 as suggested in bug
#38849 because I do not have MSSQL installed. In any case that bug looks
like it is related to a different problem (I am not trying to connect to
a database I am just trying to launch PHP).







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



#27792 [Com]: [PATCH] Functions fail on large files (filesize,is_file,is_dir,readdir)

2009-11-12 Thread boite dot pour dot spam at gmail dot com
 ID:   27792
 Comment by:   boite dot pour dot spam at gmail dot com
 Reported By:  kode at kodekrash dot com
 Status:   Critical
 Bug Type: Filesystem function related
 Operating System: * (LFS)
 PHP Version:  5.*, 6CVS (2009-04-30)
 New Comment:

The patch from Wez doesn't work, as it assumes size_t are 64 bits,
which is not the case, even when LFS is defined.

The patch from Mail Pourri works on 5.3.0 (I haven't tested in 5.3.1)


Previous Comments:


[2009-09-14 08:59:36] j...@php.net

The latest patch for this:

  http://www.php.net/~wez/lfs.diff



[2009-07-11 13:40:57] mail dot pourri at laposte dot net

Please see fix in http://bugs.php.net/bug.php?id=48886



[2009-04-30 19:45:57] j...@php.net

And bug #45040



[2009-04-30 19:45:19] j...@php.net

See also bug #48099 (NFS mounts misbehave also without the compile 
flags..)




[2008-12-05 17:28:36] aklmnop at gmail dot com

I had to change a couple more LVAL's to DVAL and RETURN_LONG to 
RETURN_DOUBLE after using the above patch, to make fseek(), fread(), 
ftell() and fwrite() work in PHP 5.2.4. This stuff is way too broken. 
Shamefully broken!



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

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



#48886 [Com]: [PATCH] Add support for 64bits file handling on 32 bits architecture

2009-09-11 Thread boite dot pour dot spam at gmail dot com
 ID:   48886
 Comment by:   boite dot pour dot spam at gmail dot com
 Reported By:  mail dot pourri at laposte dot net
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.3.0
 New Comment:

It's working. You should talk about this on the dev mailing list


Previous Comments:


[2009-07-11 13:39:03] mail dot pourri at laposte dot net

diff -aur php-5.3.0.orig/ext/phar/phar_internal.h
php-5.3.0/ext/phar/phar_internal.h
--- php-5.3.0.orig/ext/phar/phar_internal.h 2009-05-13
22:25:43.0 +0200
+++ php-5.3.0/ext/phar/phar_internal.h  2009-07-11 15:10:04.0
+0200
@@ -534,8 +534,15 @@
return FAILURE;
 }
 #else
-# define phar_stream_copy_to_stream(src, dest, maxlen,
len)_php_stream_copy_to_stream_ex((src), (dest), (maxlen), (len)
STREAMS_CC TSRMLS_CC)
-
+static inline size_t phar_stream_copy_to_stream(php_stream *src,
php_stream *dest, size_t maxlen, size_t *len)
+{
+   off_t _maxlen = maxlen == (size_t)PHP_STREAM_COPY_ALL ?
PHP_STREAM_COPY_ALL : maxlen, _len = 0;
+   size_t ret = php_stream_copy_to_stream_ex(src, dest, _maxlen,
_len);
+   if (ret == SUCCESS) {
+   if (len) *len = (size_t)_len;
+   } else if (len) *len = 0;
+   return ret;
+}
 #endif
 
 #if PHP_VERSION_ID = 6
diff -aur php-5.3.0.orig/ext/standard/file.c
php-5.3.0/ext/standard/file.c
--- php-5.3.0.orig/ext/standard/file.c  2009-06-22 13:37:30.0
+0200
+++ php-5.3.0/ext/standard/file.c   2009-07-11 15:23:32.0 +0200
@@ -594,7 +594,7 @@
char *filename;
int filename_len;
zval *data;
-   int numbytes = 0;
+   off_t numbytes = 0;
long flags = 0;
zval *zcontext = NULL;
php_stream_context *context = NULL;
@@ -642,7 +642,7 @@
 
switch (Z_TYPE_P(data)) {
case IS_RESOURCE: {
-   size_t len;
+   off_t len;
if (php_stream_copy_to_stream_ex(srcstream, stream,
PHP_STREAM_COPY_ALL, len) != SUCCESS) {
numbytes = -1;
} else {
@@ -659,9 +659,9 @@
 
case IS_STRING:
if (Z_STRLEN_P(data)) {
-   numbytes = php_stream_write(stream, 
Z_STRVAL_P(data),
Z_STRLEN_P(data));
-   if (numbytes != Z_STRLEN_P(data)) {
-   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, Only %d of %d bytes
written, possibly out of free disk space, numbytes, Z_STRLEN_P(data));
+   numbytes = (off_t)php_stream_write(stream, 
Z_STRVAL_P(data),
Z_STRLEN_P(data));
+   if (numbytes != (off_t)Z_STRLEN_P(data)) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, Only %d of %d bytes
written, possibly out of free disk space, (size_t)numbytes,
Z_STRLEN_P(data));
numbytes = -1;
}
}
@@ -680,13 +680,13 @@
convert_to_string(*tmp);
}
if (Z_STRLEN_PP(tmp)) {
-   numbytes += Z_STRLEN_PP(tmp);
+   numbytes += 
(off_t)Z_STRLEN_PP(tmp);
bytes_written = 
php_stream_write(stream, Z_STRVAL_PP(tmp),
Z_STRLEN_PP(tmp));
if (bytes_written  0 || 
bytes_written != Z_STRLEN_PP(tmp)) {
if (bytes_written  0) {

php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed to write
%d bytes to %s, Z_STRLEN_PP(tmp), filename);
} else {
-   
php_error_docref(NULL TSRMLS_CC, E_WARNING, Only %d of %d
bytes written, possibly out of free disk space, bytes_written,
Z_STRLEN_PP(tmp));
+   
php_error_docref(NULL TSRMLS_CC, E_WARNING, Only %d of %d
bytes written, possibly out of free disk space, (size_t)bytes_written,
Z_STRLEN_PP(tmp));
}
numbytes = -1;
break;
@@ -702,9 +702,9 @@
zval out;
 
if (zend_std_cast_object_tostring(data, out, 
IS_STRING TSRMLS_CC)
== SUCCESS) {
-   numbytes = php_stream_write(stream, 
Z_STRVAL(out),
Z_STRLEN(out

#48816 [NEW]: IteratorIterator seek() causes bus error

2009-07-06 Thread spam at burgestrand dot se
From: spam at burgestrand dot se
Operating system: Mac OS 10.5.7
PHP version:  5.3.0
PHP Bug Type: SPL related
Bug description:  IteratorIterator seek() causes bus error

Description:

After using seek() on an IteratorIterator containing an ArrayIterator the
next() call results in a bus error.

Also, the seek() method doesnÂ’t seem to advance the key to the specified
position on the inner iterator (unless issuing getInnerIterator()-seek(x)
directly and calling getInnerIterator()-current()).

Reproduce code:
---
?php
$iiter = new IteratorIterator(new ArrayIterator(range(0, 5)));
$iiter-rewind();
$iiter-seek(2);

var_dump($iiter-current());
$iiter-next(); // bus error
var_dump($iiter-current());

/* End of file */

Expected result:

int(2)
int(3)

Actual result:
--
int(0)

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



#18556 [Com]: Setting locale to 'tr_TR' lowercases class names

2009-06-18 Thread spam at pamignot dot org
 ID:   18556
 Comment by:   spam at pamignot dot org
 Reported By:  spud at nothingness dot org
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Linux (RedHat 7.2)
 PHP Version:  5CVS, 4CVS (2005-10-04)
 Assigned To:  andrei
 New Comment:

This bug is still alive !!
Can someone have a look to this ?

While it is not fixed, you can set LC_CTYPE to another locale to get it
works again.


Previous Comments:


[2009-03-05 19:28:22] cankoy at ymail dot com

This also occurs in function names:
?php
echo setlocale(LC_ALL, 'tr_TR').\n;
HI5();
function HI5() { echo Five!\n;}
?

outputs:
---
tr_TR

Fatal error: Call to undefined function HI5() in...
---
whereas the following works OK:
?php
echo setlocale(LC_ALL, 'tr_TR').\n;
function HI5() { echo Five!\n;}
HI5();
?

outputs:
---
tr_TR
Five!
---

using php-cli 5.2.6 on Ubuntu 8.10.



[2008-05-20 07:44:31] c dot muench at netz98 dot de

This bug is still alive in version 5.2.5.
I tested the posted script and get the same results.



[2008-04-21 18:40:05] jreeve at pelagodesign dot com

We are still getting this bug with PHP 5.2.3
PHP 5.2.3 (cli) (built: Feb  7 2008 06:40:06)

As noted below, this function:
?php
echo setlocale(LC_ALL, tr_TR.utf8).\n;
foreach(get_declared_classes() as $class)
{
if(!class_exists($class))
echo $class No Longer Exists!\n;
}
?

Produces this error:
tr_TR.utf8
DOMImplementationList No Longer Exists!
DOMImplementationSource No Longer Exists!
DOMImplementation No Longer Exists!
DOMProcessingInstruction No Longer Exists!
RecursiveIteratorIterator No Longer Exists!
IteratorIterator No Longer Exists!
FilterIterator No Longer Exists!
RecursiveFilterIterator No Longer Exists!
ParentIterator No Longer Exists!
LimitIterator No Longer Exists!
CachingIterator No Longer Exists!
RecursiveCachingIterator No Longer Exists!
NoRewindIterator No Longer Exists!
AppendIterator No Longer Exists!
InfiniteIterator No Longer Exists!
RegexIterator No Longer Exists!
RecursiveRegexIterator No Longer Exists!
EmptyIterator No Longer Exists!
ArrayIterator No Longer Exists!
RecursiveArrayIterator No Longer Exists!
SplFileInfo No Longer Exists!
DirectoryIterator No Longer Exists!
RecursiveDirectoryIterator No Longer Exists!
SimpleXMLIterator No Longer Exists!
InvalidArgumentException No Longer Exists!
__PHP_Incomplete_Class No Longer Exists!



[2007-08-16 17:24:36] tokul at users dot sourceforge dot net

class_exists() function uses zend_str_tolower(). zend_str_tolower()
uses
zend_tolower(). zend_tolower() uses _tolower_l() on Windows and
tolower() on other oses. _tolower_l() is not locale aware. tolower() is
LC_CTYPE aware.

Turkish language can trigger some i18n programming errors in case
insensitive comparison functions, because small latin i is not equal to
capital latin i in Turkish language. Azerbaijani (az) and Kurdish (ku)
locales use Turkish language rules on Linux.

P.S. According to msdn documentation _tolower_l() is not meant to be
called directly and is provided for internal use by _totlower_l



[2007-06-03 22:22:16] mike dot ditum at tripleplay-services dot com

I can confirm that this bug is still there... I'm testing with snapshot
php5.2-200706031230 and get the following...

Instantiating an infoBlob with a lowercase ibrFoobrInstantiating an
InfoBlob with an uppercase Ibr
Fatal error: Class 'InfoBlob' not found in
/root/php5.2-200706031230/test.php on line 18

Another simple script I have discovered that shows the same problem
is...

?php
echo setlocale(LC_ALL, tr_TR.utf8).\n;
foreach(get_declared_classes() as $class)
{
if(!class_exists($class))
echo $class No Longer Exists!\n;
}
?

For this program I get the following output...

[r...@blankfedora php5.2-200706031230]# sapi/cli/php  ~/test2.php
tr_TR.utf8
DOMImplementationList No Longer Exists!
DOMImplementationSource No Longer Exists!
DOMImplementation No Longer Exists!
DOMProcessingInstruction No Longer Exists!
RecursiveIteratorIterator No Longer Exists!
IteratorIterator No Longer Exists!
FilterIterator No Longer Exists!
RecursiveFilterIterator No Longer Exists!
ParentIterator No Longer Exists!
LimitIterator No Longer Exists!
CachingIterator No Longer Exists!
RecursiveCachingIterator No Longer Exists!
NoRewindIterator No Longer Exists!
AppendIterator No Longer Exists!
InfiniteIterator No Longer Exists!
RegexIterator No Longer Exists!
RecursiveRegexIterator No Longer Exists!
EmptyIterator No Longer Exists!
ArrayIterator No Longer

#48443 [NEW]: is_readable returns false on a file which is readable for group

2009-05-31 Thread spam at noamik dot de
From: spam at noamik dot de
Operating system: Debian Lenny
PHP version:  5.2.9
PHP Bug Type: Filesystem function related
Bug description:  is_readable returns false on a file which is readable for 
group

Description:

When executing is_readable(/path/to/my/file.txt) the function returns
false, even so file permissions are as follows:
-rw-rw 1 someuser www-data 1529 2009-06-01 04:28 file.txt
where www-data is a group the web server executing the script is member
of.
To eliminate caching issues, clearstatcache(); has been executed before.
The same goes for is_writable. I'm not shure if it is intended or a bug,
but if it is intended, the documentation would be wrong (at least IMHO).
If it is intended, a similar function for group rights would be needed ...

Reproduce code:
---
---
From manual page: function.is-readable
---


Expected result:

In the above example, is_readable should return true ...

Actual result:
--
is_readable returns true, but file can be opened with fopen anyways ...

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



#48443 [Opn]: is_readable returns false on a file which is readable for group

2009-05-31 Thread spam at noamik dot de
 ID:   48443
 User updated by:  spam at noamik dot de
 Reported By:  spam at noamik dot de
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: Debian Lenny
 PHP Version:  5.2.9
 New Comment:

In actual result: it should read is_readable returns *false*, but file
can be opened with fopen anyways ...


Previous Comments:


[2009-06-01 02:51:52] spam at noamik dot de

Description:

When executing is_readable(/path/to/my/file.txt) the function returns
false, even so file permissions are as follows:
-rw-rw 1 someuser www-data 1529 2009-06-01 04:28 file.txt
where www-data is a group the web server executing the script is member
of.
To eliminate caching issues, clearstatcache(); has been executed
before. The same goes for is_writable. I'm not shure if it is intended
or a bug, but if it is intended, the documentation would be wrong (at
least IMHO).
If it is intended, a similar function for group rights would be needed
...

Reproduce code:
---
---
From manual page: function.is-readable
---


Expected result:

In the above example, is_readable should return true ...

Actual result:
--
is_readable returns true, but file can be opened with fopen anyways ...





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



#48136 [Bgs]: Empty session id causes a warning

2009-05-04 Thread dont dot want at spam dot no
 ID:   48136
 User updated by:  dont dot want at spam dot no
 Reported By:  dont dot want at spam dot no
 Status:   Bogus
 Bug Type: Session related
 Operating System: Win XP SP2
 PHP Version:  5.2.9
 New Comment:

I'm quite familiar with the manual, but haven't been able to find a
page that mentions that session_start() may give a warning if the user
sets the session id to an empty string.

And in any case, the PHP warning message is not accurate. An empty
string is not illegal characters; it's illegal input perhaps but there
aren't any characters.


Previous Comments:


[2009-05-04 12:40:06] il...@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.



[2009-05-03 14:26:14] dont dot want at spam dot no

Description:

If session cookie is an empty string, PHP gives the following warning:
Warning:  session_start() [function.session-start]: The session id
contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,'.

Worst case scenario: If the user sets the session id to an empty string
manually in their browser and php errors are displayed, the page will
break (could not start session, headers already sent by warning message,
etc.).

Normal scenario: display_errors is disabled, so this will only clutter
the error log with an unnecessary warning.

In my case I have session.use_only_cookies enabled and I work around
the issue with the following code:
?php
if (isset($_COOKIE[session_name()])  $_COOKIE[session_name()] ===
'')
{
# PHP will throw a warning if session cookie is an empty string
# workaround: delete cookie if set to empty string
setcookie(session_name(), '', time()-42000, '/');
unset($_COOKIE[session_name()]);
}
?

Reproduce code:
---
I used jQuery with a cookie addon to set the cookie to an empty string
(was actually trying to delete the cookie), but the same could be
simulated with the following 2 lines of PHP:

?php
$_COOKIE[session_name()] = '';
session_start();
?

You also get the same using GET (eg. localhost/index.php?PHPSESSID=,
remember to delete any old cookies before trying this or it won't work)

?php
session_start();
?


Expected result:

No warning since session ID is empty and PHP should be smart enough to
realise that this means that the session id has not been generated yet.

Actual result:
--
Warning: session_start() [function.session-start]: The session id
contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,'
in F:\htdocs\index.php on line 9





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



#48136 [NEW]: session id = empty string produces warning

2009-05-03 Thread dont dot want at spam dot no
From: dont dot want at spam dot no
Operating system: Win XP SP2
PHP version:  5.2.9
PHP Bug Type: Session related
Bug description:  session id = empty string produces warning

Description:

If session cookie is an empty string, PHP gives the following warning:
Warning:  session_start() [function.session-start]: The session id
contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,'.

Worst case scenario: If the user sets the session id to an empty string
manually in their browser and php errors are displayed, the page will break
(could not start session, headers already sent by warning message, etc.).

Normal scenario: display_errors is disabled, so this will only clutter the
error log with an unnecessary warning.

In my case I have session.use_only_cookies enabled and I work around the
issue with the following code:
?php
if (isset($_COOKIE[session_name()])  $_COOKIE[session_name()] === '')
{
# PHP will throw a warning if session cookie is an empty string
# workaround: delete cookie if set to empty string
setcookie(session_name(), '', time()-42000, '/');
unset($_COOKIE[session_name()]);
}
?

Reproduce code:
---
I used jQuery with a cookie addon to set the cookie to an empty string
(was actually trying to delete the cookie), but the same could be simulated
with the following 2 lines of PHP:

?php
$_COOKIE[session_name()] = '';
session_start();
?

You also get the same using GET (eg. localhost/index.php?PHPSESSID=,
remember to delete any old cookies before trying this or it won't work)

?php
session_start();
?


Expected result:

No warning since session ID is empty and PHP should be smart enough to
realise that this means that the session id has not been generated yet.

Actual result:
--
Warning: session_start() [function.session-start]: The session id contains
illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in
F:\htdocs\index.php on line 9

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



#47432 [NEW]: Error message for built-in override is very non-obvious

2009-02-17 Thread spam at paulisageek dot com
From: spam at paulisageek dot com
Operating system: OS Independent
PHP version:  5.2.9RC2
PHP Bug Type: *General Issues
Bug description:  Error message for built-in override is very non-obvious

Description:

If you have a c extension defining certain classes, then defining the same
class in user land gives the message :

Fatal error: Cannot redeclare class *classname* in *file* on line
*linenum*

This is quite confusing, since most people will know to look through all
their user land scripts for the redefinition, and few will actually look at
their installed extensions to find conflicts.

I recommend changing the error message to:

Fatal error: Cannot redeclare built-in class *classname* in *file* on line
*linenum*

Reproduce code:
---
?php

class Exception {
}

?

Expected result:

Fatal error: Cannot redeclare built-in class *classname* in *file* on line
*linenum*

Actual result:
--
Fatal error: Cannot redeclare class *classname* in *file* on line
*linenum*

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



#46282 [Com]: Corrupt DBF When Using DATE

2009-01-15 Thread no at spam dot net
 ID:   46282
 Comment by:   no at spam dot net
 Reported By:  mattias dot geniar at gmail dot com
 Status:   No Feedback
 Bug Type: dBase related
 Operating System: CentOS 5.2
 PHP Version:  5.2.6
 New Comment:

I have the same problem on FreeBSD 6.3-STABLE, PHP5.2.8


Previous Comments:


[2008-11-18 01:00:02] 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.



[2008-11-10 11:32:59] j...@php.net

Please try using this CVS snapshot:

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

  http://windows.php.net/snapshots/





[2008-10-12 14:03:50] mattias dot geniar at gmail dot com

Description:

Creating a dBase file with a DATE-field type, will corrupt the
database. Work-around as for now is to use a CHAR-type and convert it
later manually.

This bug is similar to #42261, which dates back to August 2007.

Reproduce code:
---
?php
// database definition
$def = array(
  array(date, D),
  array(name, C,  50),
  array(email,C, 128),
  array(ismember, L)
);

// creation
if (!dbase_create('test.dbf', $def)) {
  echo Error, can't create the database\n;
}

// open in read-write mode
$db = dbase_open('test.dbf', 2);

if ($db) {
for ($i = 0; $i  5; $i++) {
dbase_add_record($db, array(
  date('Ymd'),
  'Name #'. $i,
  'Email #'. $i,
  'T'));
}
  dbase_close($db);
}
?


Expected result:

A simple database with 5 lines, where DATE, Name  Email are entered
correctly.

Actual result:
--
The code above will create file called test.dbf, which is corrupted
when opening it with any normal DBF-viewer (CDBF, DBF Manager, ...). If
the DATE-field is replaced with a CHAR-field, all works fine.
Date-format is taken from the PHP.NET website and confirmed by the
dBase-format.





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



#46621 [NEW]: Float conversion in french breaks PHP

2008-11-19 Thread php dot net at spam dot lublink dot net
From: php dot net at spam dot lublink dot net
Operating system: Gentoo Linux
PHP version:  5.2.6
PHP Bug Type: Scripting Engine problem
Bug description:  Float conversion in french breaks PHP

Description:

In French, it is written 0,05 not 0.05.  When in French, converting a
string to a float causes values to be truncated.

I have two servers that I tested this on. One is running Gentoo, the other
is running Ubuntu.

Reproduce code:
---
?php
setlocale(LC_ALL, 'fr_FR');

var_dump (  (string)(float) 0.01 ) ;
var_dump (  (float)(string)(float)(string)(float) 0.01 ) ;


?


Expected result:

string(4) 0,01
float(0,01)


Actual result:
--
string(4) 0,01
float(0)

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



#46338 [Ver-Csd]: Segfault on multiple error handler

2008-10-21 Thread spam at pamignot dot org
 ID:   46338
 User updated by:  spam at pamignot dot org
 Reported By:  spam at pamignot dot org
-Status:   Verified
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Irrelevant
 PHP Version:  5.3.0alpha3-dev
 New Comment:

Ok, sorry for the noise.

Duplicate bug closed, just see :
http://bugs.php.net/46241


Previous Comments:


[2008-10-21 15:36:53] [EMAIL PROTECTED]

Yeah, these are most definitely duplicates. (Doesn't know how to close
a bug as a dupe).



[2008-10-21 06:35:17] clemens dot kalb at netlogix dot de

Setting the error handler twice does indeed seem to be the problem. I
can reproduce this with 5.3 alpha3-dev Build Date Oct 19 2008 04:42:11.
See #46241 for a possible duplicate of this entry.



[2008-10-20 19:00:28] [EMAIL PROTECTED]

Oh, also, I tested it on the latest alpha3-dev build.

php --version
PHP 5.3.0alpha3-dev (cli) (built: Oct 20 2008 20:49:57)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies



[2008-10-20 18:54:55] [EMAIL PROTECTED]

I believe this is a problem with the error handler stack. I get
zend_mm_heap corrupted when I set the error handler twice.

?php

function mute() {}
set_error_handler('mute');
set_error_handler('mute');



[2008-10-20 18:02:06] spam at pamignot dot org

Here's the code. 
I notified HTMLPurifier developpers, since I think the problem comes
from the library.

?php

class myException extends Exception 
{ 
public static function exception_error_handler($errno, $errstr,
$errfile, $errline){}
}

require 'tools/htmlpurifier/library/HTMLPurifier.auto.php';
$filterObj = new HTMLPurifier;
$someVar = $filterObj-purify('something');
set_error_handler(array('myException', 'exception_error_handler'));

?



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

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



#46338 [Fbk-Opn]: Segfault on script ending

2008-10-20 Thread spam at pamignot dot org
 ID:   46338
 User updated by:  spam at pamignot dot org
 Reported By:  spam at pamignot dot org
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Linux 2.6.22-15-generic (Ubuntu)
 PHP Version:  5.3.0alpha2
 New Comment:

Here's the code. 
I notified HTMLPurifier developpers, since I think the problem comes
from the library.

?php

class myException extends Exception 
{ 
public static function exception_error_handler($errno, $errstr,
$errfile, $errline){}
}

require 'tools/htmlpurifier/library/HTMLPurifier.auto.php';
$filterObj = new HTMLPurifier;
$someVar = $filterObj-purify('something');
set_error_handler(array('myException', 'exception_error_handler'));

?


Previous Comments:


[2008-10-20 15:51:12] [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 ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2008-10-18 21:52:49] spam at pamignot dot org

Surely not related to Apache2, but maybe GC (?), deplaced in
Unknown/Other.



[2008-10-18 21:27:58] spam at pamignot dot org

Description:

I just passed from 5.1.6 to 5.3.

I cannot give a quick code to reproduce the bug, but the script
actually does those actions :
- getting GET POST COOKIE information, giving them to HTMLPurifier and
set an array of the result
- define custom error handler
- execute action given by user
- display HTML result page

The script goes to the end, echo'ing wanted html page but it results in
a segfault.

If I comment out the next line, or if I comment out the static method
'exception_error_handler' from my class MyException, the script just
works fine :

set_error_handler(array('MyException', 'exception_error_handler'));

But if I let declared the method 'exception_error_handler', even with
no code inside, returning true or false, or throwing an exception, the
script ends up with a segfault.


Reproduce code:
---
/* some code using some PEAR packages, 
custom error handler, echo'ing a HTML page */
exit();

Expected result:

Expected result is displaying HTML page to user.

Actual result:
--
The actual result is the output of my desired HTML page, ending with a
segfault :

# gdb php
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i486-linux-gnu...
Using host libthread_db library
/lib/tls/i686/cmov/libthread_db.so.1.
(gdb) r index.php
Starting program: /usr/local/bin/php index.php
[Thread debugging using libthread_db enabled]
[New Thread -1223292352 (LWP 21507)]

/* here comes my HTML page */

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1223292352 (LWP 21507)]
zend_hash_destroy (ht=0x8ce9ac4) at
/home/myhome/php-5.3.0alpha2/Zend/zend_hash.c:524
524 p = p-pListNext;
(gdb) bt
#0  zend_hash_destroy (ht=0x8ce9ac4) at
/home/myhome/php-5.3.0alpha2/Zend/zend_hash.c:524
#1  0x083d34e7 in _zval_dtor_func (zvalue=0x8ce9a78) at
/home/myhome/php-5.3.0alpha2/Zend/zend_variables.c:43
#2  0x083d2c55 in zend_ptr_stack_apply (stack=0x88ba628, func=0x83d3440
_zval_dtor_func) at
/home/myhome/php-5.3.0alpha2/Zend/zend_ptr_stack.c:90
#3  0x083d2c9f in zend_ptr_stack_clean (stack=0x88ba628, func=0x83d3440
_zval_dtor_func, free_elements=1 '\001')
at /home/myhome/php-5.3.0alpha2/Zend/zend_ptr_stack.c:97
#4  0x083c67f9 in shutdown_executor (tsrm_ls=0x88b82a0) at
/home/myhome/php-5.3.0alpha2/Zend/zend_execute_API.c:271
#5  0x083d3ab9 in zend_deactivate (tsrm_ls=0x88b82a0) at
/home/myhome/php-5.3.0alpha2/Zend/zend.c:899
#6  0x0837995a in php_request_shutdown (dummy=0x0) at
/home/myhome/php-5.3.0alpha2/main/main.c:1516
#7  0x0846a6da in main (argc=2, argv=0xbfc9d7a4) at
/home/myhome/php-5.3.0alpha2/sapi/cli/php_cli.c:1311
(gdb) 


When I try from my browser and gdb run -X option, the backtrace looks
like this :

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216632640 (LWP 21116)]
zend_hash_destroy (ht=0x85e50e8) at
/home/myhome/php-5.3.0alpha2/Zend/zend_hash.c:524
524 p = p

#46338 [NEW]: Segfault on script ending

2008-10-18 Thread spam at pamignot dot org
From: spam at pamignot dot org
Operating system: Linux 2.6.22-15-generic (Ubuntu)
PHP version:  5.3.0alpha2
PHP Bug Type: Apache2 related
Bug description:  Segfault on script ending

Description:

I just passed from 5.1.6 to 5.3.

I cannot give a quick code to reproduce the bug, but the script actually
does those actions :
- getting GET POST COOKIE information, giving them to HTMLPurifier and set
an array of the result
- define custom error handler
- execute action given by user
- display HTML result page

The script goes to the end, echo'ing wanted html page but it results in a
segfault.

If I comment out the next line, or if I comment out the static method
'exception_error_handler' from my class MyException, the script just works
fine :

set_error_handler(array('MyException', 'exception_error_handler'));

But if I let declared the method 'exception_error_handler', even with no
code inside, returning true or false, or throwing an exception, the script
ends up with a segfault.


Reproduce code:
---
/* some code using some PEAR packages, 
custom error handler, echo'ing a HTML page */
exit();

Expected result:

Expected result is displaying HTML page to user.

Actual result:
--
The actual result is the output of my desired HTML page, ending with a
segfault :

# gdb php
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i486-linux-gnu...
Using host libthread_db library /lib/tls/i686/cmov/libthread_db.so.1.
(gdb) r index.php
Starting program: /usr/local/bin/php index.php
[Thread debugging using libthread_db enabled]
[New Thread -1223292352 (LWP 21507)]

/* here comes my HTML page */

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1223292352 (LWP 21507)]
zend_hash_destroy (ht=0x8ce9ac4) at
/home/myhome/php-5.3.0alpha2/Zend/zend_hash.c:524
524 p = p-pListNext;
(gdb) bt
#0  zend_hash_destroy (ht=0x8ce9ac4) at
/home/myhome/php-5.3.0alpha2/Zend/zend_hash.c:524
#1  0x083d34e7 in _zval_dtor_func (zvalue=0x8ce9a78) at
/home/myhome/php-5.3.0alpha2/Zend/zend_variables.c:43
#2  0x083d2c55 in zend_ptr_stack_apply (stack=0x88ba628, func=0x83d3440
_zval_dtor_func) at
/home/myhome/php-5.3.0alpha2/Zend/zend_ptr_stack.c:90
#3  0x083d2c9f in zend_ptr_stack_clean (stack=0x88ba628, func=0x83d3440
_zval_dtor_func, free_elements=1 '\001')
at /home/myhome/php-5.3.0alpha2/Zend/zend_ptr_stack.c:97
#4  0x083c67f9 in shutdown_executor (tsrm_ls=0x88b82a0) at
/home/myhome/php-5.3.0alpha2/Zend/zend_execute_API.c:271
#5  0x083d3ab9 in zend_deactivate (tsrm_ls=0x88b82a0) at
/home/myhome/php-5.3.0alpha2/Zend/zend.c:899
#6  0x0837995a in php_request_shutdown (dummy=0x0) at
/home/myhome/php-5.3.0alpha2/main/main.c:1516
#7  0x0846a6da in main (argc=2, argv=0xbfc9d7a4) at
/home/myhome/php-5.3.0alpha2/sapi/cli/php_cli.c:1311
(gdb) 


When I try from my browser and gdb run -X option, the backtrace looks
like this :

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216632640 (LWP 21116)]
zend_hash_destroy (ht=0x85e50e8) at
/home/myhome/php-5.3.0alpha2/Zend/zend_hash.c:524
524 p = p-pListNext;
(gdb) 
(gdb) 
(gdb) 
(gdb) 
(gdb) 
(gdb) 
(gdb) bt
#0  zend_hash_destroy (ht=0x85e50e8) at
/home/myhome/php-5.3.0alpha2/Zend/zend_hash.c:524
#1  0xb72b9a57 in _zval_dtor_func (zvalue=0x85e509c) at
/home/myhome/php-5.3.0alpha2/Zend/zend_variables.c:43
#2  0xb72b91c5 in zend_ptr_stack_apply (stack=0x81e5980, func=0xb72b99b0
_zval_dtor_func) at
/home/myhome/php-5.3.0alpha2/Zend/zend_ptr_stack.c:90
#3  0xb72b920f in zend_ptr_stack_clean (stack=0x81e5980, func=0xb72b99b0
_zval_dtor_func, free_elements=1 '\001')
at /home/myhome/php-5.3.0alpha2/Zend/zend_ptr_stack.c:97
#4  0xb72acd69 in shutdown_executor (tsrm_ls=0x8132108) at
/home/myhome/php-5.3.0alpha2/Zend/zend_execute_API.c:271
#5  0xb72ba029 in zend_deactivate (tsrm_ls=0x8132108) at
/home/myhome/php-5.3.0alpha2/Zend/zend.c:899
#6  0xb725feca in php_request_shutdown (dummy=0x0) at
/home/myhome/php-5.3.0alpha2/main/main.c:1516
#7  0xb734fc1e in php_handler (r=0x8452b80) at
/home/myhome/php-5.3.0alpha2/sapi/apache2handler/sapi_apache2.c:470
#8  0x08079259 in ap_run_handler ()
#9  0x0807c5b7 in ap_invoke_handler ()
#10 0x08089998 in ap_process_request ()
#11 0x08086c9b in ?? ()
#12 0x08452b80 in ?? ()
#13 0x0004 in ?? ()
#14 0x08452b80 in ?? ()
#15 0x in ?? ()
(gdb)

-- 
Edit bug report at http://bugs.php.net/?id=46338edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=46338r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=46338r=trysnapshot53
Try a CVS snapshot (PHP 6.0

#46338 [Opn]: Segfault on script ending

2008-10-18 Thread spam at pamignot dot org
 ID:   46338
 User updated by:  spam at pamignot dot org
 Reported By:  spam at pamignot dot org
 Status:   Open
-Bug Type: Apache2 related
+Bug Type: Unknown/Other Function
 Operating System: Linux 2.6.22-15-generic (Ubuntu)
 PHP Version:  5.3.0alpha2
 New Comment:

Surely not related to Apache2, but maybe GC (?), deplaced in
Unknown/Other.


Previous Comments:


[2008-10-18 21:27:58] spam at pamignot dot org

Description:

I just passed from 5.1.6 to 5.3.

I cannot give a quick code to reproduce the bug, but the script
actually does those actions :
- getting GET POST COOKIE information, giving them to HTMLPurifier and
set an array of the result
- define custom error handler
- execute action given by user
- display HTML result page

The script goes to the end, echo'ing wanted html page but it results in
a segfault.

If I comment out the next line, or if I comment out the static method
'exception_error_handler' from my class MyException, the script just
works fine :

set_error_handler(array('MyException', 'exception_error_handler'));

But if I let declared the method 'exception_error_handler', even with
no code inside, returning true or false, or throwing an exception, the
script ends up with a segfault.


Reproduce code:
---
/* some code using some PEAR packages, 
custom error handler, echo'ing a HTML page */
exit();

Expected result:

Expected result is displaying HTML page to user.

Actual result:
--
The actual result is the output of my desired HTML page, ending with a
segfault :

# gdb php
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i486-linux-gnu...
Using host libthread_db library
/lib/tls/i686/cmov/libthread_db.so.1.
(gdb) r index.php
Starting program: /usr/local/bin/php index.php
[Thread debugging using libthread_db enabled]
[New Thread -1223292352 (LWP 21507)]

/* here comes my HTML page */

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1223292352 (LWP 21507)]
zend_hash_destroy (ht=0x8ce9ac4) at
/home/myhome/php-5.3.0alpha2/Zend/zend_hash.c:524
524 p = p-pListNext;
(gdb) bt
#0  zend_hash_destroy (ht=0x8ce9ac4) at
/home/myhome/php-5.3.0alpha2/Zend/zend_hash.c:524
#1  0x083d34e7 in _zval_dtor_func (zvalue=0x8ce9a78) at
/home/myhome/php-5.3.0alpha2/Zend/zend_variables.c:43
#2  0x083d2c55 in zend_ptr_stack_apply (stack=0x88ba628, func=0x83d3440
_zval_dtor_func) at
/home/myhome/php-5.3.0alpha2/Zend/zend_ptr_stack.c:90
#3  0x083d2c9f in zend_ptr_stack_clean (stack=0x88ba628, func=0x83d3440
_zval_dtor_func, free_elements=1 '\001')
at /home/myhome/php-5.3.0alpha2/Zend/zend_ptr_stack.c:97
#4  0x083c67f9 in shutdown_executor (tsrm_ls=0x88b82a0) at
/home/myhome/php-5.3.0alpha2/Zend/zend_execute_API.c:271
#5  0x083d3ab9 in zend_deactivate (tsrm_ls=0x88b82a0) at
/home/myhome/php-5.3.0alpha2/Zend/zend.c:899
#6  0x0837995a in php_request_shutdown (dummy=0x0) at
/home/myhome/php-5.3.0alpha2/main/main.c:1516
#7  0x0846a6da in main (argc=2, argv=0xbfc9d7a4) at
/home/myhome/php-5.3.0alpha2/sapi/cli/php_cli.c:1311
(gdb) 


When I try from my browser and gdb run -X option, the backtrace looks
like this :

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216632640 (LWP 21116)]
zend_hash_destroy (ht=0x85e50e8) at
/home/myhome/php-5.3.0alpha2/Zend/zend_hash.c:524
524 p = p-pListNext;
(gdb) 
(gdb) 
(gdb) 
(gdb) 
(gdb) 
(gdb) 
(gdb) bt
#0  zend_hash_destroy (ht=0x85e50e8) at
/home/myhome/php-5.3.0alpha2/Zend/zend_hash.c:524
#1  0xb72b9a57 in _zval_dtor_func (zvalue=0x85e509c) at
/home/myhome/php-5.3.0alpha2/Zend/zend_variables.c:43
#2  0xb72b91c5 in zend_ptr_stack_apply (stack=0x81e5980,
func=0xb72b99b0 _zval_dtor_func) at
/home/myhome/php-5.3.0alpha2/Zend/zend_ptr_stack.c:90
#3  0xb72b920f in zend_ptr_stack_clean (stack=0x81e5980,
func=0xb72b99b0 _zval_dtor_func, free_elements=1 '\001')
at /home/myhome/php-5.3.0alpha2/Zend/zend_ptr_stack.c:97
#4  0xb72acd69 in shutdown_executor (tsrm_ls=0x8132108) at
/home/myhome/php-5.3.0alpha2/Zend/zend_execute_API.c:271
#5  0xb72ba029 in zend_deactivate (tsrm_ls=0x8132108) at
/home/myhome/php-5.3.0alpha2/Zend/zend.c:899
#6  0xb725feca in php_request_shutdown (dummy=0x0) at
/home/myhome/php-5.3.0alpha2/main/main.c:1516
#7  0xb734fc1e in php_handler (r=0x8452b80) at
/home/myhome/php-5.3.0alpha2/sapi/apache2handler/sapi_apache2.c:470
#8  0x08079259 in ap_run_handler ()
#9  0x0807c5b7 in ap_invoke_handler ()
#10 0x08089998 in ap_process_request ()
#11 0x08086c9b in ?? ()
#12 0x08452b80 in ?? ()
#13

#44047 [Com]: IIS Worker Process stopped working

2008-04-03 Thread nonya at spam dot this
 ID:   44047
 Comment by:   nonya at spam dot this
 Reported By:  matthew dot horner at redprairie dot com
 Status:   Open
 Bug Type: IIS related
 Operating System: Windows Vista
 PHP Version:  5.2.5
 New Comment:

I see this topic has been labeled an IIS issue and there was no
response from PHP staff.

If it is a IIS7 issue, why was it not occurring in PHP4?


Previous Comments:


[2008-03-19 04:22:41] jaedsm at hotmail dot com

Having the same issue here too. Installed IIS7 and PHP 5.2.5 the other
day on my home system running Vista Home Premium. Didn't consider it
would have been caused by some timeout but after reading here that makes
sense.

No crash message has appeared while I've been working for hours on end,
once I stop though it appears a little while later and doesn't appear
again unless I load another php page.



[2008-03-06 14:00:56] matthew dot horner at redprairie dot com

I would still consider this a workaround, as this is not standard
procedure for installing ISAPI modules in IIS7.  Furthermore, this issue
is not an issue with PHP 4.  Which to me, would indicate there is
something coded differently with PHP 5 to cause the crash when recycling
the process.  Also, reconfiguring the Application Pool, affects more
than just your pool hosting PHP driven applications.  What side effects 
there are, is unclear to me, but certainly not something I would like to
find out about once a site is in production.

I posted this bug because I would like to have the PHP developers debug
this issue and determine if there is indeed a code problem or a problem
with IIS7.  Not to have a workaround to avoid crashes on IIS7.

I am not disputing the fact that your solution works.  However, this
appears to be an issue and should be addressed at the PHP level first. 


Thank you for your suggestions.



[2008-03-06 10:36:54] satan at dclxvi dot nl

to be clear, these are my settings:

Recycle time is set to the default every 1740 minutes.
Idle timeout is set to '0'
Disable Overlapped Recycle is set to 'True'

never had the error again...
no horrible workarround whatsoever.. it's just that IIS7 is defaultly
configured to run MS stuff like ASP.NET etc..



[2008-03-06 10:13:01] satan at dclxvi dot nl

Also, I found out the solution that it won't error on recycle...

go to the advanced settings of the appPool you are using and set
Disable Overlapped Recycle to True. 

PHP5 can't seam to run multiple instances so it errors out when it
starts a new instance before it recycles the old..

And again with the idle timeout set to 0, it will still recycle..



[2008-03-06 09:39:53] satan at dclxvi dot nl

it will still recycle if you set it to 0, it just won't time out.. on
higher traffic servers it will will never timeout and there's no problem
there, is there? the recycling is another setting..

besides, this has little or nothing to do with php, as it also occurs
after running asp..



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

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



#44047 [Com]: IIS Worker Process stopped working

2008-03-03 Thread nonya at spam dot this
 ID:   44047
 Comment by:   nonya at spam dot this
 Reported By:  matthew dot horner at redprairie dot com
 Status:   Open
 Bug Type: IIS related
 Operating System: Windows Vista
 PHP Version:  5.2.5
 New Comment:

Yea, that is a horrible idea.  You are literally telling IIS to never
clean it's caches or do garbage collection on the AppPools.  I am sure
that there are more critical consequences on high-volume web servers if
you decide to do this.

PHP just fix it


Previous Comments:


[2008-03-03 13:52:11] matthew dot horner at redprairie dot com

Setting the recycle time to 0 would not be considered a solution, but
rather a workaround.  The solution to the problem would require a code
change.  That change would resolve the issue, so that the workaround
would not have to be applied.  This change to standard code would also
avoid changing standard configuration of the IIS server for _every_
instance that has a PHP 5 installation.



[2008-03-02 12:27:34] satan at dclxvi dot nl

lol, your test is the solution... where you set it idle time out to 1
to test it earlier, just set it to '0'. it will error out once more and
the next time it starts it will stay on.. there is no problem with
leaving it on..



[2008-02-29 04:37:22] nonya at spam dot this

To elaborate on Matthew, (Every PHP5\Vista\IIS7 machine I have every
worked on does this; 20+ machines)

The same error can be achieved back-to-back simply by running any PHP,
which in turn will add 1 active application to the DefaultAppPool.  This
is visible in the IIS7 Manager.  You can select the DefaultAppPool and
click Recycle..., wait 3-5 secs (because WerFault.exe kicks in,
Windows Error Reporting Service) and you have a IIS Worker Process has
failed message with the event in the windows event log the way Matt
described which says the fault came from c:\windows\system32\ntdll.dll

If the PHP dev guys are trying to recreate this issue, you need to be
using Latest PHP5/IIS7/ISAPI-Configuration/Vista

This has been going on since Vista RC1.  Everyone who is not getting
this error may not be complaining because the error doesn't seem to do
major damage.

The closest thing to a resolution I have seen since the release of
Vista is to just adjust the timing of the automated recycle cycle. 
Since the error is only occurring during recycling, they have been
scheduling 1 recycle per day, hence 1 crash per day.

There are many, many, many, MANY forums and support threads with people
having the same problem, they just aren't posting here.
Here are a few:
forums.techarena.in/showthread.php?t=686723
www.developersdex.com/asp/message.asp?p=592r=6057007
www.issociate.de/board/post/468636/IIS_+_PHP_--_Worker_Process_alert__w3wp.exe_crash?.html
forums.techarena.in/showthread.php?t=821723
groups.google.com/group/comp.lang.php/browse_thread/thread/93aef1ff2f0ba3b0
www.thescripts.com/forum/thread742344.html



[2008-02-05 16:17:54] matthew dot horner at redprairie dot com

I removed all extensions and re-tested with the same results.



[2008-02-05 15:01:16] [EMAIL PROTECTED]

Do you have any extensions loaded via php.ini or this is purely whats
statically built into PHP?

If you do have extensions can you disable them all and see if you can
reproduce the problem.



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

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



#44047 [Com]: IIS Worker Process stopped working

2008-02-28 Thread nonya at spam dot this
 ID:   44047
 Comment by:   nonya at spam dot this
 Reported By:  matthew dot horner at redprairie dot com
 Status:   Open
 Bug Type: IIS related
 Operating System: Windows Vista
 PHP Version:  5.2.5
 New Comment:

To elaborate on Matthew, (Every PHP5\Vista\IIS7 machine I have every
worked on does this; 20+ machines)

The same error can be achieved back-to-back simply by running any PHP,
which in turn will add 1 active application to the DefaultAppPool.  This
is visible in the IIS7 Manager.  You can select the DefaultAppPool and
click Recycle..., wait 3-5 secs (because WerFault.exe kicks in,
Windows Error Reporting Service) and you have a IIS Worker Process has
failed message with the event in the windows event log the way Matt
described which says the fault came from c:\windows\system32\ntdll.dll

If the PHP dev guys are trying to recreate this issue, you need to be
using Latest PHP5/IIS7/ISAPI-Configuration/Vista

This has been going on since Vista RC1.  Everyone who is not getting
this error may not be complaining because the error doesn't seem to do
major damage.

The closest thing to a resolution I have seen since the release of
Vista is to just adjust the timing of the automated recycle cycle. 
Since the error is only occurring during recycling, they have been
scheduling 1 recycle per day, hence 1 crash per day.

There are many, many, many, MANY forums and support threads with people
having the same problem, they just aren't posting here.
Here are a few:
forums.techarena.in/showthread.php?t=686723
www.developersdex.com/asp/message.asp?p=592r=6057007
www.issociate.de/board/post/468636/IIS_+_PHP_--_Worker_Process_alert__w3wp.exe_crash?.html
forums.techarena.in/showthread.php?t=821723
groups.google.com/group/comp.lang.php/browse_thread/thread/93aef1ff2f0ba3b0
www.thescripts.com/forum/thread742344.html


Previous Comments:


[2008-02-05 16:17:54] matthew dot horner at redprairie dot com

I removed all extensions and re-tested with the same results.



[2008-02-05 15:01:16] [EMAIL PROTECTED]

Do you have any extensions loaded via php.ini or this is purely whats
statically built into PHP?

If you do have extensions can you disable them all and see if you can
reproduce the problem.



[2008-02-05 14:17:23] matthew dot horner at redprairie dot com

I have tested with the latest and the crash is still occurring with the
exact same stack trace.  The build date of the current installation is
Feb 5 2008 08:04:21.



[2008-02-05 05:07:30] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-02-04 23:42:22] matthew dot horner at redprairie dot com

Description:

I am able to reproduce this issue as others have seen reported in other
bug reports with no solution.  If you simply
run the following script, the error should reproduce itself.

I have done several different tests using IIS7 and have concluded that
there are no issues with PHP4 but 5.1.6 and 5.2.5 both cause the crash.

I am using Vista Businesss and confirmed with several other developers
in our organization the same issues with IIS7 on Vista.  Those
reporting
this issue to our group reported that the problem was also seen but
not
limited to 5.2.3.

I have slightly altered my configuration of IIS to accelerate the
crash.
 Using the IIS Manager, I clicked Application Pools, selected
DefaultAppPool and clicked Advanced Settings.  In settings
configuration
screen, I changed the Idle Timeout (minutes) under Process Model to 1.

Do an iisreset, execute the example script above in the brower and
wait.
 Within one minute you should see a message stating the 'IIS Worker
Process has stopped working.'

I downloaded the DebugDiag tool from
http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-4
6f1-b24d-f60151d875a3DisplayLang=en

If you would like the complete log of the crash as reported by the
DebugDiag
tool, I would be more than happy to pass it along.  If any assistance
is
required, please feel free to contact me and I will do everything I
can.

Thanks,
Matt

Reproduce code:
---
?php

phpinfo();

?

Expected result:

The phpinfo page, shows as expected.  However, after the Idle Timeout
specified in IIS has been reached, a crash message is displayed.  Expect
this message not be display after the offending code is fixed.

Actual result:
--
The crash results in the following

#44265 [NEW]: incorrect SOAP Encoding ERROR on response

2008-02-27 Thread gdk-spam at yes-co dot nl
From: gdk-spam at yes-co dot nl
Operating system: Debian r4.0
PHP version:  5.2.5
PHP Bug Type: SOAP related
Bug description:  incorrect SOAP Encoding ERROR on response

Description:

The PHP SOAP server incorrectly reports an SOAP-ERROR when the SOAP
response is returned in WSDL mode. The error indicates an optional property
is missing. The property is defined within a XML Schema sequence which has
its 'minOccurs' attribute set to '0', which should make the properties
optional.

The WSDL validates correctly against WS-I Basic Profile 1.1 + SOAP Binding
Profile 1.0 checks using Mindreef SOAPscope.

We recently upgraded from PHP 5.1.4 to PHP 5.2.4 (ZendCore package). We
are unable to reproduce this error in 5.1.4.

We've stripped down the Webservice and request/response, the production
code is ofcourse much more complicated.

If you uncomment the 'Letter' and 'Volgnummer' properties the SOAP
response is returned without a problem

Reproduce code:
---
WSDL: http://devel.yes-co.com/zendbugs/ws_kadaster.wsdl

SOAP Server: http://devel.yes-co.com/zendbugs/ws_kadaster.phps

SOAP Client: http://devel.yes-co.com/zendbugs/ws_kadaster_client.phps

Expected result:

ws_kadaster_client.php output:

stdClass Object ( )

Actual result:
--
ws_kadaster_client.php output:

SoapFault Object
(
[message:protected] = SOAP-ERROR: Encoding: object hasn't 'Letter'
property
[string:private] = 
[code:protected] = 0
[file:protected] =
/vol/vol0/home/geoffrey/public_html/ws_kadaster_client.php
[line:protected] = 11
[trace:private] = Array
(
[0] = Array
(
[function] = __call
[class] = SoapClient
[type] = -
[args] = Array
(
[0] = GetKadastraalBericht
[1] = Array
(
[0] = stdClass Object
(
)

)

)

)

[1] = Array
(
[file] =
/vol/vol0/home/geoffrey/public_html/ws_kadaster_client.php
[line] = 11
[function] = GetKadastraalBericht
[class] = SoapClient
[type] = -
[args] = Array
(
[0] = stdClass Object
(
)

)

)

)

[faultstring] = SOAP-ERROR: Encoding: object hasn't 'Letter'
property
[faultcode] = SOAP-ENV:Server
)
?xml version=1.0 encoding=UTF-8?
SOAP-ENV:Envelope
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:ns1=http://webservice.yes-co.nl/ws_kadaster;SOAP-ENV:Bodyns1:GetKadastraalBerichtRequest//SOAP-ENV:Body/SOAP-ENV:Envelope
?xml version=1.0 encoding=UTF-8?
SOAP-ENV:Envelope
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;SOAP-ENV:BodySOAP-ENV:FaultfaultcodeSOAP-ENV:Server/faultcodefaultstringSOAP-ERROR:
Encoding: object hasn't 'Letter'
property/faultstring/SOAP-ENV:Fault/SOAP-ENV:Body/SOAP-ENV:Envelope


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

#41413 [NEW]: HTTP proxying bug

2007-05-17 Thread vasso dot spam at gmail dot com
From: vasso dot spam at gmail dot com
Operating system: Windows
PHP version:  5.2.2
PHP Bug Type: HTTP related
Bug description:  HTTP proxying bug

Description:

HTTP proxing (after 5.1.0) works only if request_fulluri is set to true.
And there is no documentation about this.

Reproduce code:
---
$context = stream_context_create(
array('http'=
array(
   'proxy' = 'tcp://proxy.domain.com:3128/',
   //'request_fulluri' = true,//Works if uncommented
)
)
);
$data = file_get_contents('http://google.com/', false, $context);
var_export($data);


Expected result:

+

Actual result:
--
Warning: file_get_contents(http://google.com/): failed to open stream:
HTTP request failed! HTTP/1.0 400 Bad Request
 in http_proxy_bug.php on line 10
-

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


#41413 [Opn-Bgs]: HTTP proxying bug

2007-05-17 Thread vasso dot spam at gmail dot com
 ID:   41413
 User updated by:  vasso dot spam at gmail dot com
 Reported By:  vasso dot spam at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: HTTP related
 Operating System: Windows
 PHP Version:  5.2.2
 New Comment:

I was wrong


Previous Comments:


[2007-05-17 07:09:56] vasso dot spam at gmail dot com

Description:

HTTP proxing (after 5.1.0) works only if request_fulluri is set to
true.
And there is no documentation about this.

Reproduce code:
---
$context = stream_context_create(
array('http'=
array(
   'proxy' = 'tcp://proxy.domain.com:3128/',
   //'request_fulluri' = true,//Works if uncommented
)
)
);
$data = file_get_contents('http://google.com/', false, $context);
var_export($data);


Expected result:

+

Actual result:
--
Warning: file_get_contents(http://google.com/): failed to open stream:
HTTP request failed! HTTP/1.0 400 Bad Request
 in http_proxy_bug.php on line 10
-





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


#40963 [NEW]: --with-config-file-path is not respected

2007-03-30 Thread spam at 2xlp dot com
From: spam at 2xlp dot com
Operating system: Mac OSX 10.4.9
PHP version:  5.2.1
PHP Bug Type: *Compile Issues
Bug description:  --with-config-file-path is not respected

Description:

on osx 10.4.x and php 5.1.x  5.2.x

--with-config-file-path results in a binary that lists the custom path 
in phpinfo(), but does not actually read the custom path. nor does it 
seem to read the default config file path either -- it effectively 
disables the config file 

Reproduce code:
---
1) ./configure --with-config-file-path=/usr/local/lib/php5.2.0.ini 

2) view phpinfo(), note that '/usr/local/lib/php5.2.0.ini' appears as the
config file path

3) load modules or disable php in /usr/local/lib/php5.2.0.ini , restart
apache/fcgi ,  note that nothing in the ini is respected 

4) rename /usr/local/lib/php5.2.0.ini to /usr/local/lib/php.ini , restart
apache/fcgi ,  note that nothing in the ini is respected


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


#29249 [Com]: imagettfbbox / imagettfbbox returning wrong values w/ linebreaks

2007-01-27 Thread spam at dtdsoft dot com
 ID:   29249
 Comment by:   spam at dtdsoft dot com
 Reported By:  kees at tweakers dot net
 Status:   No Feedback
 Bug Type: GD related
 Operating System: Linux
 PHP Version:  5.0.0
 New Comment:

This bug is still present in PHP 5.2.0 (Running on Windows XP) I am
posting this to reactiveate the bug and make it known that it is still
present.

~DtD
BTW I fixed it by multiplying the height by 
substr_count($string,\n)+1)


Previous Comments:


[2005-01-22 01:00:17] 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.



[2005-01-15 00:42:59] [EMAIL PROTECTED]

I think you need to pass the string with double quotes:

bounds = imagettfbbox(8, 0, 'tahoma.ttf', j\nj);





[2004-07-19 03:26:46] kees at tweakers dot net

Actual result should be:
--
Both will give the same result, a box of x: 15 y: 12.



[2004-07-19 03:24:20] kees at tweakers dot net

Description:

The imagettfbbox / imagettftext should return an array with the
boundaries on texts. This works fine with a single string, but if you
use a multiline string (with \n in it) it fails to report the actual
size, and returns the size / box of a single line.

The string _is_ writen normally on the image, ie; with a newline
instead of an \n, but the sizes are wrong.

Reproduce code:
---
// string with a line break, try imagettftext, it'll put the correct
string on the image, but return the wrong results
$bounds = imagettfbbox(8, 0, 'tahoma.ttf', 'j\nj');
print_r($bounds);

// no line break here, just a \ instead of a /, which is the same
size.
$bounds = imagettfbbox(8, 0, 'tahoma.ttf', 'j/nj');
print_r($bounds);

Expected result:

The first line should return something like a box with an x/y of 3 / 26
(or close), the second result should return (and does ;)) an x/y box of
15 / 12.


Actual result:
--
Both will give the same result, a box of x: 15 y: 26.





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


#39635 [Com]: Better control for serialization (keyword for permit property serialization)

2007-01-25 Thread spam at thishell dot com
 ID:   39635
 Comment by:   spam at thishell dot com
 Reported By:  t dot prochazka at centrum dot cz
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  5CVS-2006-11-26 (CVS)
 New Comment:

While it is possible to exclude members from serialization using
__sleep(), it has downsides:
- Using get_object_vars($this) to return the members is extremely slow
- Manually maintaining an array with the members is error prone and can
be quite some work

A transient keyword to exclude members from serialization would make it
easier ...


Previous Comments:


[2006-11-26 11:40:40] t dot prochazka at centrum dot cz

Description:

PHP has no advanced support for serialization.

I think, that is problem, that PHP serialize all properties. What about
add single keyword (as transient) for property which can't be
serializable?

Example:

class Foo {
 
 public $a;
 public transient $b;

}

Description of Java transient keyword:

http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#78119






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


#39198 [Fbk-Opn]: is_dir seem to have permission problems

2006-11-09 Thread php dot spam at frogblender dot net
 ID:   39198
 User updated by:  php dot spam at frogblender dot net
 Reported By:  php dot spam at frogblender dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Directory function related
 Operating System: Windows 2003
 PHP Version:  5.1.6
 New Comment:

I don't have your directory structure either so I can't adapt the
script for your machine.

The Temp directory will be there in a standard installation of Windows.
You then search and replace in my script to adapt to your environment.
Finally you create one directory RP_Compile and give Everyone full
rights on that directory.

It shouldn't take more than five minutes for anyone who knows how to
log in to Windows.


Previous Comments:


[2006-11-08 21:21:32] [EMAIL PROTECTED]

This script is no enough, as we don't have your directory structure.



[2006-11-03 19:58:57] php dot spam at frogblender dot net

You've already got the reproducing script in my original post.



[2006-10-31 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-10-23 12:43:25] [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 ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2006-10-23 12:27:01] php dot spam at frogblender dot net

There's nothing wrong with our server, thank you.

I happened to remember an old Windows 2000 server I could test this on.
The bug was reproducible with PHP 5.0 and 5.2 RC6, no surprise there.
Was using IIS with default user, php5isapi.dll, unmodified php.ini

Tony2001, perhaps you shouldn't be managing bugs related to Windows if
you don't have the equipment to verify them.



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

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


#39405 [NEW]: regular expression breaking on strings = 24999 characters

2006-11-06 Thread spam at dragy dot de
From: spam at dragy dot de
Operating system: Any
PHP version:  5.2.0
PHP Bug Type: PCRE related
Bug description:  regular expression breaking on strings = 24999 characters

Description:

The following preg_replace breaks when the string is = 24999 characters.
Works perfectly fine with 24998 characters and worked fine with any
strings in PHP 5.1.5.

Reproduce code:
---
?php
$string = str_repeat('a', 10);
echo
preg_replace('#(^.*|.*)(\[(php|html|noparse)\].*\[/\\3])(.*|.*$)#siUe',
'', $string);
?

Expected result:

100.000 times 'a'

Actual result:
--
nothing

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


#39405 [Opn-Bgs]: regular expression breaking on strings = 24999 characters

2006-11-06 Thread spam at dragy dot de
 ID:   39405
 User updated by:  spam at dragy dot de
 Reported By:  spam at dragy dot de
-Status:   Open
+Status:   Bogus
 Bug Type: PCRE related
 Operating System: Any
 PHP Version:  5.2.0
 New Comment:

pcre.backtrack_limit=-1 in php.ini


Previous Comments:


[2006-11-06 20:48:02] ludvig dot ericson at gmail dot com

This is because of limits intentionally set, see the ini setting
pcre.backtrack_limit.



[2006-11-06 18:45:23] spam at dragy dot de

Description:

The following preg_replace breaks when the string is = 24999
characters. Works perfectly fine with 24998 characters and worked fine
with any strings in PHP 5.1.5.

Reproduce code:
---
?php
$string = str_repeat('a', 10);
echo
preg_replace('#(^.*|.*)(\[(php|html|noparse)\].*\[/\\3])(.*|.*$)#siUe',
'', $string);
?

Expected result:

100.000 times 'a'

Actual result:
--
nothing





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


#39198 [NoF-Opn]: is_dir seem to have permission problems

2006-11-03 Thread php dot spam at frogblender dot net
 ID:   39198
 User updated by:  php dot spam at frogblender dot net
 Reported By:  php dot spam at frogblender dot net
-Status:   No Feedback
+Status:   Open
 Bug Type: Directory function related
 Operating System: Windows 2003
 PHP Version:  5.1.6
 New Comment:

You've already got the reproducing script in my original post.


Previous Comments:


[2006-10-31 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-10-23 12:43:25] [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 ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2006-10-23 12:27:01] php dot spam at frogblender dot net

There's nothing wrong with our server, thank you.

I happened to remember an old Windows 2000 server I could test this on.
The bug was reproducible with PHP 5.0 and 5.2 RC6, no surprise there.
Was using IIS with default user, php5isapi.dll, unmodified php.ini

Tony2001, perhaps you shouldn't be managing bugs related to Windows if
you don't have the equipment to verify them.



[2006-10-19 16:09:35] [EMAIL PROTECTED]

Sorry, we can't go back to the past and fix it on your server.



[2006-10-19 15:38:54] php dot spam at frogblender dot net

Sorry, but I don't care whether this bug will be fixed or not.

The server is not mine to mess with so I can't install another PHP
version.



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

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


#39198 [Bgs-Opn]: is_dir seem to have permission problems

2006-10-23 Thread php dot spam at frogblender dot net
 ID:   39198
 User updated by:  php dot spam at frogblender dot net
 Reported By:  php dot spam at frogblender dot net
-Status:   Bogus
+Status:   Open
 Bug Type: Directory function related
 Operating System: Windows 2003
-PHP Version:  5.1.4
+PHP Version:  5.1.6
 New Comment:

There's nothing wrong with our server, thank you.

I happened to remember an old Windows 2000 server I could test this on.
The bug was reproducible with PHP 5.0 and 5.2 RC6, no surprise there.
Was using IIS with default user, php5isapi.dll, unmodified php.ini

Tony2001, perhaps you shouldn't be managing bugs related to Windows if
you don't have the equipment to verify them.


Previous Comments:


[2006-10-19 16:09:35] [EMAIL PROTECTED]

Sorry, we can't go back to the past and fix it on your server.



[2006-10-19 15:38:54] php dot spam at frogblender dot net

Sorry, but I don't care whether this bug will be fixed or not.

The server is not mine to mess with so I can't install another PHP
version.



[2006-10-19 14:04:55] [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-10-19 14:00:37] php dot spam at frogblender dot net

Description:

If you have a directory where Everyone has Full Control rights you
would expect is_dir to return true but it doesn't.

This bug has existed since 5.0.0 and I've had this problem on at least
three servers during the past year.

I'm lying about my PHP version (it's really 5.1.4) but I've checked the
change log.

realpath() seem to exhibit the proper behavior.

Reproduce code:
---
?php
print(pre);
error_reporting(E_ALL);
#clearstatcache();

$paths = array(
C:\\,
C:\\Windows,
C:\\Windows\\Temp,
C:\\Windows\\Temp\\RP_Compile,
C:\\Windows\\Temp\\DoesNotExist,
C:\\Windows\\Temp\\RP_Compile\\Subdir,
);

print(\nis_dir()\n);
foreach($paths as $path)
print(is_dir($path) .  \t$path\n);

print(\nrealpath()\n);
foreach($paths as $path)
print(!(realpath($path) === FALSE) .  \t$path\n);

print(\nstat()\n);
foreach($paths as $path)
print(!(stat($path) === FALSE) .  \t$path\n);

print(/pre);
?


Expected result:

is_dir()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
1   C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir

realpath()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
1   C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir


Actual result:
--
Notice the different result for C:\Windows\Temp\RP_Compile

is_dir()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir

realpath()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
1   C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir






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


#39198 [NEW]: is_dir seem to have permission problems

2006-10-19 Thread php dot spam at frogblender dot net
From: php dot spam at frogblender dot net
Operating system: Windows 2003
PHP version:  5.1.6
PHP Bug Type: Directory function related
Bug description:  is_dir seem to have permission problems

Description:

If you have a directory where Everyone has Full Control rights you would
expect is_dir to return true but it doesn't.

This bug has existed since 5.0.0 and I've had this problem on at least
three servers during the past year.

I'm lying about my PHP version (it's really 5.1.4) but I've checked the
change log.

realpath() seem to exhibit the proper behavior.

Reproduce code:
---
?php
print(pre);
error_reporting(E_ALL);
#clearstatcache();

$paths = array(
C:\\,
C:\\Windows,
C:\\Windows\\Temp,
C:\\Windows\\Temp\\RP_Compile,
C:\\Windows\\Temp\\DoesNotExist,
C:\\Windows\\Temp\\RP_Compile\\Subdir,
);

print(\nis_dir()\n);
foreach($paths as $path)
print(is_dir($path) .  \t$path\n);

print(\nrealpath()\n);
foreach($paths as $path)
print(!(realpath($path) === FALSE) .  \t$path\n);

print(\nstat()\n);
foreach($paths as $path)
print(!(stat($path) === FALSE) .  \t$path\n);

print(/pre);
?


Expected result:

is_dir()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
1   C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir

realpath()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
1   C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir


Actual result:
--
Notice the different result for C:\Windows\Temp\RP_Compile

is_dir()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir

realpath()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
1   C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir


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


#39198 [Fbk-Opn]: is_dir seem to have permission problems

2006-10-19 Thread php dot spam at frogblender dot net
 ID:   39198
 User updated by:  php dot spam at frogblender dot net
 Reported By:  php dot spam at frogblender dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Directory function related
 Operating System: Windows 2003
-PHP Version:  5.1.6
+PHP Version:  5.1.4
 New Comment:

Sorry, but I don't care whether this bug will be fixed or not.

The server is not mine to mess with so I can't install another PHP
version.


Previous Comments:


[2006-10-19 14:04:55] [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-10-19 14:00:37] php dot spam at frogblender dot net

Description:

If you have a directory where Everyone has Full Control rights you
would expect is_dir to return true but it doesn't.

This bug has existed since 5.0.0 and I've had this problem on at least
three servers during the past year.

I'm lying about my PHP version (it's really 5.1.4) but I've checked the
change log.

realpath() seem to exhibit the proper behavior.

Reproduce code:
---
?php
print(pre);
error_reporting(E_ALL);
#clearstatcache();

$paths = array(
C:\\,
C:\\Windows,
C:\\Windows\\Temp,
C:\\Windows\\Temp\\RP_Compile,
C:\\Windows\\Temp\\DoesNotExist,
C:\\Windows\\Temp\\RP_Compile\\Subdir,
);

print(\nis_dir()\n);
foreach($paths as $path)
print(is_dir($path) .  \t$path\n);

print(\nrealpath()\n);
foreach($paths as $path)
print(!(realpath($path) === FALSE) .  \t$path\n);

print(\nstat()\n);
foreach($paths as $path)
print(!(stat($path) === FALSE) .  \t$path\n);

print(/pre);
?


Expected result:

is_dir()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
1   C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir

realpath()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
1   C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir


Actual result:
--
Notice the different result for C:\Windows\Temp\RP_Compile

is_dir()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir

realpath()
1   C:\
1   C:\Windows
1   C:\Windows\Temp
1   C:\Windows\Temp\RP_Compile
C:\Windows\Temp\DoesNotExist
1   C:\Windows\Temp\RP_Compile\Subdir






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


#37854 [NEW]: Type Hinting with derived classes and interfaces not working

2006-06-19 Thread spam at codeword dot net
From: spam at codeword dot net
Operating system: Win XP
PHP version:  5.1.4
PHP Bug Type: Class/Object related
Bug description:  Type Hinting with derived classes and interfaces not working 

Description:

When adding type hinting to an interface then implementing that interface
using a derived class, the script compiler does not seem to recognise that
the implemented type hint is derived from the interfaces type hint.  I hope
that makes sense.  The code below may be more clear.

Reproduce code:
---
?php
interface MyInterface{public function test(ClassA $object);}
class MyClass implements myInterface{
  public function test(ClassB $object){// should work but does not
echo $object-x;
  }
}
class ClassA {public$x = Class is ClassA;  }
class ClassB extends ClassA{  public $x = Class is ClassB;}
$myclass = new MyClass;
$a = new ClassA;
$b = new ClassB;
$myclass-test($b);
$myclass-test($a);
?

Expected result:

Class is ClassB
Fatal error: Argument 1 passed to MyClass::test() must be an instance of
ClassB, called in typeHintTest.php on line 14 and defined in
typeHintTest.php on line 4

Actual result:
--
Fatal error: Declaration of MyClass::test() must be compatible with that
of MyInterface::test() in typeHintTest.php on line 3

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



#37268 [NEW]: basename() doesnt work with non-latin first letters of the file.

2006-05-01 Thread spam dot bugs dot php dot net at vano dot org
From: spam dot bugs dot php dot net at vano dot org
Operating system: Fedora Core 4
PHP version:  5.1.2
PHP Bug Type: Filesystem function related
Bug description:  basename() doesnt work with non-latin first letters of the 
file.

Description:

If a file starts with a non-latin letter (cyrillic) and not with a
non-letter character, basename will cut off the beginning of name untill a
latin letter or a non-letter character found in the name.
In my tests I was using Windows-1251 (CP1251) encoding and not UNICODE,
so, the problem is in basename() function itself not in multi-byte
charsets.


P.S. if you have problem with text encoding of the example below, you can
see a realtime example and test your own inputs there:
http://examples.vano.org/basename.php

Reproduce code:
---
?php
echo basename(/test/blah/music/ðóññêèélatin.mp3);
?

Expected result:

ðóññêèélatin.mp3

Actual result:
--
latin.mp3

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


#36191 [Bgs]: statement as function parameter gets evaluated after calling the function

2006-01-29 Thread mail dot spam at gmx dot net
 ID:   36191
 User updated by:  mail dot spam at gmx dot net
 Reported By:  mail dot spam at gmx dot net
 Status:   Bogus
 Bug Type: *General Issues
 Operating System: Windows
 PHP Version:  5.1.2
 New Comment:

Thanks for your replay, I reread the manual and found the line you
meant

But I still think it's a bug:

This code:
-
function test_func($test_param) {
  echo 'inside before:';
  print_r($test_param);
  $test_param[] = 2;
  echo 'inside after:';
  print_r($test_param);
}

echo 'pre';
echo 'outside before function call:';
print_r($test_array);
test_func($test_array = array(1));
echo 'outside after function call:';
print_r($test_array);
echo '/pre'; 
-
displays the following:
-
outside before function call:

Notice:  Undefined variable: test_array in filename goes here on line
13

inside before:Array
(
[0] = 1
)
inside after:Array
(
[0] = 1
[1] = 2
)
outside after function call:Array
(
[0] = 1
)
-
As you can see the expression I try to pass as argument gets evaluated
twice.
One time before calling the function itself (which is the behaviour
like in all earlier version) and a second time after returning from the
function call

If the expression got evaluated only one time (after returning from
function call) I'ld say its ok, you changed things a little bit.
But as you seem to execute the code two times I can't imagine why you
added this second execution?


Previous Comments:


[2006-01-29 16:08:52] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php





[2006-01-28 14:01:59] mail dot spam at gmx dot net

Description:

if you use a statement as actual parameter for a function (parameter is
called by reference) the statement get's executed after calling the
function thus overwriting the function's work

Reproduce code:
---
function test_array($test) {
$test[] = 2;
}

echo 'pre';

test_array($test_1);

test_array($test_2 = array(1));

$test_3 = array(1);
test_array($test_3);

print_r($test_1);
print_r($test_2);
print_r($test_3);

echo 'PHP-Version: '.phpversion();
echo '/pre';

Expected result:

Array
(
[0] = 2
)
Array
(
[0] = 1
[1] = 2
)
Array
(
[0] = 1
[1] = 2
)

Actual result:
--
output for version 4.3.11
Array
(
[0] = 2
)
Array
(
[0] = 1
[1] = 2
)
Array
(
[0] = 1
[1] = 2
)


output for version 5.1.2
Array
(
[0] = 2
)
Array
(
[0] = 1
)
Array
(
[0] = 1
[1] = 2
)





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


#36191 [NEW]: statement as function parameter gets evaluated after calling the function

2006-01-28 Thread mail dot spam at gmx dot net
From: mail dot spam at gmx dot net
Operating system: Windows
PHP version:  5.1.2
PHP Bug Type: *General Issues
Bug description:  statement as function parameter gets evaluated after calling 
the function

Description:

if you use a statement as actual parameter for a function (parameter is
called by reference) the statement get's executed after calling the
function thus overwriting the function's work

Reproduce code:
---
function test_array($test) {
$test[] = 2;
}

echo 'pre';

test_array($test_1);

test_array($test_2 = array(1));

$test_3 = array(1);
test_array($test_3);

print_r($test_1);
print_r($test_2);
print_r($test_3);

echo 'PHP-Version: '.phpversion();
echo '/pre';

Expected result:

Array
(
[0] = 2
)
Array
(
[0] = 1
[1] = 2
)
Array
(
[0] = 1
[1] = 2
)

Actual result:
--
output for version 4.3.11
Array
(
[0] = 2
)
Array
(
[0] = 1
[1] = 2
)
Array
(
[0] = 1
[1] = 2
)


output for version 5.1.2
Array
(
[0] = 2
)
Array
(
[0] = 1
)
Array
(
[0] = 1
[1] = 2
)

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


#35614 [NEW]: extends crashes apache with Segmentation fault

2005-12-09 Thread spam at gemal dot dk
From: spam at gemal dot dk
Operating system: Linux
PHP version:  5.1.1
PHP Bug Type: Apache related
Bug description:  extends crashes apache with Segmentation fault

Description:

the following code produces Segmentation fault on php

?php
class gpic {
function __construct() {
$conf = new gpicConfig();
print test;
}
}

class gpicConfig extends gpic {
}
?

PHP 5.0.5 (cli) (built: Oct 31 2005 10:51:24)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.5, Copyright (c) 1998-2004 Zend Technologies
with Zend Extension Manager v1.0.9, Copyright (c) 2003-2005, by Zend
Technologies
with Zend Optimizer v2.6.0, Copyright (c) 1998-2005, by Zend
Technologies
with Zend Debugger v5.0.0, Copyright (c) 1999-2005, by Zend
Technologies

Reproduce code:
---
?php
class gpic {
function __construct() {
$conf = new gpicConfig();
print test;
}
}

class gpicConfig extends gpic {
}
?



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


#35135 [Fbk-Opn]: Constructing PDOStatment succeeds but accessing its members crashes apache

2005-11-07 Thread phpbug20051107 at spam dot dusty dot org
 ID:   35135
 User updated by:  phpbug20051107 at spam dot dusty dot org
 Reported By:  phpbug20051107 at spam dot dusty dot org
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: windows xp
 PHP Version:  5.1.0RC4
 Assigned To:  wez
 New Comment:

Thanks; I meant to mention that I'd tried the most recent snap before
submitting. I just tried again from the latest snap and received the
same results.


Previous Comments:


[2005-11-07 15:28:55] [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-07 08:00:15] phpbug20051107 at spam dot dusty dot org

Description:

If a PDOStatement is directly constructed (new PDOStatment()) and then
any member of that instance accessed, Apache2 will crash.

Reproduce code:
---
?php

$s = new PDOStatement();
$s-errorInfo();  // -- apache crashes

?

Expected result:

An error, warning, or notice generated when PDOStatment is constructed
directly.

Actual result:
--
Apache crashes:

Faulting application Apache.exe, version 2.0.54.0, faulting module
php_pdo.dll, version 5.1.0.0, fault address 0x5508.





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


#35135 [NEW]: Constructing PDOStatment succeeds but accessing its members crashes apache

2005-11-06 Thread phpbug20051107 at spam dot dusty dot org
From: phpbug20051107 at spam dot dusty dot org
Operating system: windows xp
PHP version:  5.1.0RC4
PHP Bug Type: PDO related
Bug description:  Constructing PDOStatment succeeds but accessing its members 
crashes apache

Description:

If a PDOStatement is directly constructed (new PDOStatment()) and then any
member of that instance accessed, Apache2 will crash.

Reproduce code:
---
?php

$s = new PDOStatement();
$s-errorInfo();  // -- apache crashes

?

Expected result:

An error, warning, or notice generated when PDOStatment is constructed
directly.

Actual result:
--
Apache crashes:

Faulting application Apache.exe, version 2.0.54.0, faulting module
php_pdo.dll, version 5.1.0.0, fault address 0x5508.

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


#35046 [NEW]: bad css when using phpinfo()

2005-11-01 Thread spam at gemal dot dk
From: spam at gemal dot dk
Operating system: Linux
PHP version:  5.0.5
PHP Bug Type: PHP options/info functions
Bug description:  bad css when using phpinfo()

Description:

Error: Selector expected.  Ruleset ignored due to bad selector.
Source file: phpinfo.php
Line: 23

Error: Unexpected end of file while searching for closing } of invalid
rule set.
Source file: phpinfo.php
Line: 23


Reproduce code:
---
?php
phpinfo();
? 

Expected result:

style type=text/css!--
blabla
//--/style

should be:
style type=text/css
blabla
/style

to be valid css



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


#34673 [Fbk-Opn]: apache2 + php4 + phpwiki crash

2005-09-29 Thread blfijgnk at no-spam dot hu
 ID:   34673
 User updated by:  blfijgnk at no-spam dot hu
 Reported By:  blfijgnk at no-spam dot hu
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: linux
 PHP Version:  4.4.0
 New Comment:

with xdebug, process don't crash, and send this message in html:

Fatal error: Maximum function nesting level of '64' reached, aborting!
in /usr/share/phpwiki/lib/ErrorManager.php on line 844
Call Stack
#   FunctionLocation
1   {main}()/usr/share/phpwiki/index.php:0
2   include()   /usr/share/phpwiki/index.php:55
3   main()  /usr/share/phpwiki/lib/main.php:936
4   wikirequest-wikirequest()  /usr/share/phpwiki/lib/main.php:871
5   wikiuser()  /usr/share/phpwiki/lib/main.php:73
6   _determineadminuserorotheruser()
/usr/share/phpwiki/lib/WikiUserNew.php:229
7   _determinebogouserorpassuser()  
/usr/share/phpwiki/lib/WikiUserNew.php:173
8   _passuser-userexists() /usr/share/phpwiki/lib/WikiUserNew.php:197
9   _peardbpassuser-userexists()   
/usr/share/phpwiki/lib/WikiUserNew.php:1078
10  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1595
11  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
12  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
13  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
14  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
15  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
16  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
17  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
18  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
19  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
20  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
21  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
22  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
23  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
24  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
25  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
26  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
27  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
28  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
29  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
30  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
31  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
32  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
33  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
34  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
35  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
36  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
37  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
38  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
39  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
40  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
41  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
42  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
43  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
44  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
45  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
46  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
47  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
48  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
49  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
50  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
51  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
52  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
53  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
54  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php:1013
55  _peardbpassuser-prepare()  
/usr/share/phpwiki/lib/WikiUserNew.php

#34679 [NEW]: include not affected by open_basedir

2005-09-29 Thread blfijgnk at no-spam dot hu
From: blfijgnk at no-spam dot hu
Operating system: linux
PHP version:  4.4.0
PHP Bug Type: Safe Mode/open_basedir
Bug description:  include not affected by open_basedir

Description:

include not affected by open_basedir

Reproduce code:
---
open_basedir = /var/www

?php
include('/etc/passwd');
?



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


#34679 [Fbk-Opn]: include not affected by open_basedir

2005-09-29 Thread blfijgnk at no-spam dot hu
 ID:   34679
 User updated by:  blfijgnk at no-spam dot hu
 Reported By:  blfijgnk at no-spam dot hu
-Status:   Feedback
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: linux
 PHP Version:  4.4.0
 New Comment:

from phpinfo:

open_basedir/var/www/var/www


Previous Comments:


[2005-09-29 12:23:53] [EMAIL PROTECTED]

1) Check that you're editing the right php.ini
2) Check that open_basedir is really set (see phpinfo())
3) Restart your web-server.




[2005-09-29 12:19:16] blfijgnk at no-spam dot hu

Description:

include not affected by open_basedir

Reproduce code:
---
open_basedir = /var/www

?php
include('/etc/passwd');
?







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


#34679 [Fbk-Csd]: include not affected by open_basedir

2005-09-29 Thread blfijgnk at no-spam dot hu
 ID:   34679
 User updated by:  blfijgnk at no-spam dot hu
 Reported By:  blfijgnk at no-spam dot hu
-Status:   Feedback
+Status:   Closed
 Bug Type: Safe Mode/open_basedir
 Operating System: linux
 PHP Version:  4.4.0
 New Comment:

bogus.

sorry, i got cached page from mmcache.


Previous Comments:


[2005-09-29 12:48:13] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

Can't reproduce.



[2005-09-29 12:27:12] blfijgnk at no-spam dot hu

from phpinfo:

open_basedir/var/www/var/www



[2005-09-29 12:23:53] [EMAIL PROTECTED]

1) Check that you're editing the right php.ini
2) Check that open_basedir is really set (see phpinfo())
3) Restart your web-server.




[2005-09-29 12:19:16] blfijgnk at no-spam dot hu

Description:

include not affected by open_basedir

Reproduce code:
---
open_basedir = /var/www

?php
include('/etc/passwd');
?







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


#34673 [NEW]: apache2 + php4 + phpwiki crash

2005-09-28 Thread blfijgnk at no-spam dot hu
From: blfijgnk at no-spam dot hu
Operating system: linux
PHP version:  4.4.0
PHP Bug Type: Apache2 related
Bug description:  apache2 + php4 + phpwiki crash

Description:

apache2 + php4 + phpwiki crash

when i try to sign in to wiki the server process crash.

[notice] child pid exit signal Segmentation fault (11)


Actual result:
--
#0  0x404076ac in vfprintf () from /lib/libc.so.6
#1  0x40427ba8 in vsnprintf () from /lib/libc.so.6
#2  0x4077e02d in zend_error (type=512, format=0x4091550a %s) at
/usr/src/php-4.4.0/Zend/zend.c:806
#3  0x4078a8d9 in zif_trigger_error (ht=2, return_value=0x887545c,
this_ptr=0x0, return_value_used=0)
at /usr/src/php-4.4.0/Zend/zend_builtin_functions.c:861
#4  0x407940df in execute (op_array=0x8612464) at
/usr/src/php-4.4.0/Zend/zend_execute.c:1672
#5  0x4079435a in execute (op_array=0x8612464) at
/usr/src/php-4.4.0/Zend/zend_execute.c:1716

.
.
.


#461 0x40796777 in execute (op_array=0x8426894) at
/usr/src/php-4.4.0/Zend/zend_execute.c:2258
#462 0x4077e530 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /usr/src/php-4.4.0/Zend/zend.c:938
#463 0x4074045e in php_execute_script (primary_file=0xb510) at
/usr/src/php-4.4.0/main/main.c:1751
#464 0x4079ae84 in php_handler (r=0x81e6338) at
/usr/src/php-4.4.0/sapi/apache2handler/sapi_apache2.c:555
#465 0x08078375 in ap_run_handler ()
#466 0x08078980 in ap_invoke_handler ()
#467 0x08069c6a in ap_process_request ()
#468 0x0806512d in _start ()
#469 0x081e6338 in ?? ()
#470 0x0004 in ?? ()
#471 0x081e6338 in ?? ()
#472 0x0808370c in ap_run_pre_connection ()
#473 0x080835c5 in ap_run_process_connection ()
#474 0x08076974 in ap_graceful_stop_signalled ()
#475 0x08076b8b in ap_graceful_stop_signalled ()
#476 0x08076be8 in ap_graceful_stop_signalled ()
#477 0x0807745a in ap_mpm_run ()
#478 0x0807da8d in main ()


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


#3276 [Com]: Add PGP support

2005-08-14 Thread no at spam dot com
 ID:  3276
 Comment by:  no at spam dot com
 Reported By: mlemos at acm dot org
 Status:  Assigned
 Bug Type:Feature/Change Request
 PHP Version: 4.0
 Assigned To: yohgaki
 New Comment:

Thanks for great site! Please, visit my site:
a href=http://vicodin-vicodin.at.tut.by;vicodin/a, a
href=http://vicodin-vicodin.at.tut.by/vicodin-es.html;vicodin es/a


Previous Comments:


[2002-04-21 14:51:36] [EMAIL PROTECTED]

I looked at this recently for GPG; the links for the
application library were dead or the site was down.
You can do this stuff using popen (or the new proc_open
in the CVS version).



[2002-04-21 13:32:49] realmlord at hotmail dot com

Is anything happening on this? 
Gnupg at least would be nice since PGP seems to be a frozen project
by NAI/McAffee



[2002-01-28 16:48:11] [EMAIL PROTECTED]

I need it too :)
Assign to me



[2001-02-10 13:59:37] [EMAIL PROTECTED]

refiling against 4.0.



[2000-01-22 00:54:44] mlemos at acm dot org

Add at least the ability of encrypting messages with PGP using PGPlib
or gnupg

PGPLib
http://www.phpi.org/sdk/

gnupg
http://www.gnupg.org/





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


#33567 [Bgs-Csd]: SoapClient works only when exceptions are turned off

2005-07-16 Thread please-no-spam at blueyonder dot co dot uk
 ID:   33567
 User updated by:  please-no-spam at blueyonder dot co dot uk
 Reported By:  please-no-spam at blueyonder dot co dot uk
-Status:   Bogus
+Status:   Closed
 Bug Type: SOAP related
 Operating System: Windows XP Pro
 PHP Version:  5.1.0b2
 Assigned To:  dmitry
 New Comment:

Possible an IIS Problem


Previous Comments:


[2005-07-12 11:32:43] [EMAIL PROTECTED]

Hehe. Now I see.
The soap response is proper, but for some reason it enclosed into HTML.
You should have just:

?xml version=1.0
encoding=UTF-8? SOAP-ENV:Envelope
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:ns1=urn:xmethods-delayed-quotes
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/;
SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;SOAP
-ENV:Bodyns1:getQuoteResponseResult
xsi:type=xsd:float98.42/Result/ns1:getQuoteResponse/SOAP-ENV:Bod
y/SOAP-ENV:Envelope

and not any HTML tags. I haven't idea who inserted these tags (your
SOAP server's script or IIS).
Please, verify you soap server PHP script and IIS configuration.



[2005-07-11 23:55:26] please-no-spam at blueyonder dot co dot uk

From Cmd Line:

!doctype html public -//W3C//DTD HTML 4.0 //EN
html
head
   titleTitle here!/title
/head
body

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Couldn't load from 'C:\Program Files\Php\stockquote2.wsdl' in
C:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:21
Stack trace:
#0 C:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(21):
SoapClient-__construct('stockquote2.wsd...', Array)
#1 {main}
  thrown in
C:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php on line
21

***

From Web Page using the browser:

SoapFault exception: [SOAP-ENV:Client] looks like we got no XML
document in
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:24 Stack
trace: #0
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24):
SoapClient-__call('getQuote', Array) #1
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24):
SoapClient-getQuote('ibm') #2 {main}

string(110) HTTP/1.1 100 Continue Server: Microsoft-IIS/5.1 Date: Mon,
11 Jul 2005 21:44:35 GMT X-Powered-By: ASP.NET  string(660)  98.42 
string(868) !doctype html public -//W3C//DTD HTML 4.0 //EN html
head titleTitle here!/title /head body ?xml version=1.0
encoding=UTF-8? SOAP-ENV:Envelope
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:ns1=urn:xmethods-delayed-quotes
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/;
SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;SOAP-ENV:Bodyns1:getQuoteResponseResult
xsi:type=xsd:float98.42/Result/ns1:getQuoteResponse/SOAP-ENV:Body/SOAP-ENV:Envelope
/body /html  

***

Hope this helps.



[2005-07-11 10:20:02] [EMAIL PROTECTED]

Seems ext/soap is right.
You server answer - string(660)  98.42  is not an XML.
However may be all XML was hidden. Please try to run client from
command line or use
var_dump(htmlspecialchars($x-__getLastResponse())).



[2005-07-05 17:44:13] please-no-spam at blueyonder dot co dot uk

Dump Info From:
===

var_dump($x-__getLastResponseHeaders());
var_dump($x-__getLastResponse());

*

string(110) HTTP/1.1 100 Continue Server: Microsoft-IIS/5.1 Date: Tue,
05 Jul 2005 15:37:50 GMT X-Powered-By: ASP.NET  string(660)  98.42  

*

Exception Info:
==

SoapFault exception: [SOAP-ENV:Client] looks like we got no XML
document in
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:24 Stack
trace: #0
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24):
SoapClient-__call('getQuote', Array) #1
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24):
SoapClient-getQuote('ibm') #2 {main}


Hope this helps.



[2005-07-05 15:13:28] [EMAIL PROTECTED]

I cannot reproduce this bug, but may be this is IIS6 specific problem.
Could you please add trace option to SoapClient constructor and the
following code after soap call. 

var_dump($x-__getLastResponseHeaders());
var_dump($x-__getLastResponse());





The remainder of the comments for this report are too long. To view
the rest

#33694 [NEW]: IIS needs restart when invalid MSSQL statement run

2005-07-14 Thread spam at meyrick dot co dot nz
From: spam at meyrick dot co dot nz
Operating system: Windows 2003 Server Enterprise
PHP version:  4.4.0
PHP Bug Type: MSSQL related
Bug description:  IIS needs restart when invalid MSSQL statement run

Description:

I am using IIS6 (Win2k3 Server, SQL Server 2000, PHP 4.3.4 DLL)

I am connecting to MSSQL using username/pwd and pconnect

no probs there.

My problem is that if I execute a horribly incorrect SQL statement one of
the perminant connections to MSSQL is disabled giving 'unable to connec to
database' (pconnect() == false) errors 50% of the time..

For example:

Table: [Stock Items]:
StockItemID int no nulls identity
SupplierID int no nulls  --**
test varchar(50) allow null
...

$sql = INSERT INTO [Stock Items] (test) VALUES ('this should fail');
$result = mssql_query($sql);


Warning: mssql_query(): message: Cannot insert the value NULL into column
'SupplierID', table 'Database Name.dbo.Stock Items'; column does not allow
nulls. INSERT fails. (severity 16) in
C:\Inetpub\websites\sitename\public_html\acweb\includes\functions\database.php
on line 49

Warning: mssql_query(): message: The statement has been terminated.
(severity 0) in
C:\Inetpub\websites\sitename\public_html\acweb\includes\functions\database.php
on line 49

Warning: mssql_query(): General SQL Server error: Check messages from the
SQL Server. (severity 5) in
C:\Inetpub\websites\sitename\public_html\acweb\includes\functions\database.php
on line 49

Warning: mssql_query(): Query failed in
C:\Inetpub\websites\sitename\public_html\acweb\includes\functions\database.php
on line 49

Warning: mssql_query(): Attempt to initiate a new SQL Server operation
with results pending. (severity 7) in
C:\Inetpub\websites\sitename\public_html\acweb\includes\functions\database.php
on line 186



The last error is the one that is the kick in the guts as now EVERY sql
statement until the page finishes loading will fail.

When the page is refreshed pconnect() will work 50% of the time (if they
get a valid connection it works, if they get the dead connection it
fails).

The only way I can fix this problem is restarting IIS which is a pain.


I can replicate the problem by killing the process from MSSQL Enterprise
manager.

Any help would be great.

ps. an answer of just fix your sql statement is not what I'm looking for
as it is not allways related to invalid sql statements, running large
querieis using ODBC over the www seems to cause the exact same problem, so
does re/syncronizing a large replicated sql database.

Thanks.


Reproduce code:
---
Table: [Stock Items]:
StockItemID int no nulls identity
SupplierID int no nulls  --**
test varchar(50) allow null
...

$sql = INSERT INTO [Stock Items] (test) VALUES ('this should fail');
$result = mssql_query($sql);


Expected result:

$result == valid mssql result

Actual result:
--
Warning: mssql_query(): message: Cannot insert the value NULL into column
'SupplierID', table 'Database Name.dbo.Stock Items'; column does not allow
nulls. INSERT fails. (severity 16) in
C:\Inetpub\websites\sitename\public_html\acweb\includes\functions\database.php
on line 49

Warning: mssql_query(): message: The statement has been terminated.
(severity 0) in
C:\Inetpub\websites\sitename\public_html\acweb\includes\functions\database.php
on line 49

Warning: mssql_query(): General SQL Server error: Check messages from the
SQL Server. (severity 5) in
C:\Inetpub\websites\sitename\public_html\acweb\includes\functions\database.php
on line 49

Warning: mssql_query(): Query failed in
C:\Inetpub\websites\sitename\public_html\acweb\includes\functions\database.php
on line 49

Warning: mssql_query(): Attempt to initiate a new SQL Server operation
with results pending. (severity 7) in
C:\Inetpub\websites\sitename\public_html\acweb\includes\functions\database.php
on line 186


+ dead pconnection to MSSQL server until IIS (php dll) is restarted

-- 
Edit bug report at http://bugs.php.net/?id=33694edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33694r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33694r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33694r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=33694r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=33694r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=33694r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=33694r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=33694r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33694r=support
Expected behavior:   http://bugs.php.net/fix.php?id=33694r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=33694r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=33694r=submittedtwice
register_globals:http

#33567 [Asn]: SoapClient works only when exceptions are turned off

2005-07-11 Thread please-no-spam at blueyonder dot co dot uk
 ID:   33567
 User updated by:  please-no-spam at blueyonder dot co dot uk
 Reported By:  please-no-spam at blueyonder dot co dot uk
 Status:   Assigned
 Bug Type: SOAP related
 Operating System: Windows XP Pro
 PHP Version:  5.1.0b2
 Assigned To:  dmitry
 New Comment:

From Cmd Line:

!doctype html public -//W3C//DTD HTML 4.0 //EN
html
head
   titleTitle here!/title
/head
body

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Couldn't load from 'C:\Program Files\Php\stockquote2.wsdl' in
C:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:21
Stack trace:
#0 C:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(21):
SoapClient-__construct('stockquote2.wsd...', Array)
#1 {main}
  thrown in
C:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php on line
21

***

From Web Page using the browser:

SoapFault exception: [SOAP-ENV:Client] looks like we got no XML
document in
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:24 Stack
trace: #0
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24):
SoapClient-__call('getQuote', Array) #1
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24):
SoapClient-getQuote('ibm') #2 {main}

string(110) HTTP/1.1 100 Continue Server: Microsoft-IIS/5.1 Date: Mon,
11 Jul 2005 21:44:35 GMT X-Powered-By: ASP.NET  string(660)  98.42 
string(868) !doctype html public -//W3C//DTD HTML 4.0 //EN html
head titleTitle here!/title /head body ?xml version=1.0
encoding=UTF-8? SOAP-ENV:Envelope
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:ns1=urn:xmethods-delayed-quotes
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/;
SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;SOAP-ENV:Bodyns1:getQuoteResponseResult
xsi:type=xsd:float98.42/Result/ns1:getQuoteResponse/SOAP-ENV:Body/SOAP-ENV:Envelope
/body /html  

***

Hope this helps.


Previous Comments:


[2005-07-11 10:20:02] [EMAIL PROTECTED]

Seems ext/soap is right.
You server answer - string(660)  98.42  is not an XML.
However may be all XML was hidden. Please try to run client from
command line or use
var_dump(htmlspecialchars($x-__getLastResponse())).



[2005-07-05 17:44:13] please-no-spam at blueyonder dot co dot uk

Dump Info From:
===

var_dump($x-__getLastResponseHeaders());
var_dump($x-__getLastResponse());

*

string(110) HTTP/1.1 100 Continue Server: Microsoft-IIS/5.1 Date: Tue,
05 Jul 2005 15:37:50 GMT X-Powered-By: ASP.NET  string(660)  98.42  

*

Exception Info:
==

SoapFault exception: [SOAP-ENV:Client] looks like we got no XML
document in
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:24 Stack
trace: #0
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24):
SoapClient-__call('getQuote', Array) #1
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24):
SoapClient-getQuote('ibm') #2 {main}


Hope this helps.



[2005-07-05 15:13:28] [EMAIL PROTECTED]

I cannot reproduce this bug, but may be this is IIS6 specific problem.
Could you please add trace option to SoapClient constructor and the
following code after soap call. 

var_dump($x-__getLastResponseHeaders());
var_dump($x-__getLastResponse());





[2005-07-04 19:52:34] please-no-spam at blueyonder dot co dot uk

Description:

When I try to create my own web service using php 5.0.3 or 5.1.0b2
using Dmitry Stogov's example at zend.com code on Windows XP Pro IIS6:

eg:
$x = SoapClient(WSDL);

I get:

SoapFault exception: [SOAP-ENV:Client] looks like we got no XML
document in
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:13
Stack trace:
#0 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13):
SoapClient-__call('getQuote', Array)
#1 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13):
SoapClient-getQuote('ibm')
#2 {main}

Enabling Trace  Disabling exceptions like this:
$x = SoapClient(WSDL, array(trace=1, exceptions=0));
and the problem goes away.

This means I can't enable exceptions with the Soap Client.


Reproduce code:
---
$client = new SoapClient(stockquote.wsdl;
try
{

$client-getQuote(ibm);
echo $client-__getLastResponse();
} catch (SoapFault $exception) {
echo $exception;
}

Expected result:

98.42

Actual result:
--
SoapFault exception: [SOAP-ENV:Client] looks like we got no XML
document

#33567 [Fbk-Opn]: SoapClient Only Works If Exceptions Turned Off

2005-07-05 Thread please-no-spam at blueyonder dot co dot uk
 ID:   33567
 User updated by:  please-no-spam at blueyonder dot co dot uk
 Reported By:  please-no-spam at blueyonder dot co dot uk
-Status:   Feedback
+Status:   Open
 Bug Type: SOAP related
 Operating System: Windows XP Pro
 PHP Version:  5.1.0b2
 Assigned To:  dmitry
 New Comment:

Dump Info From:
===

var_dump($x-__getLastResponseHeaders());
var_dump($x-__getLastResponse());

*

string(110) HTTP/1.1 100 Continue Server: Microsoft-IIS/5.1 Date: Tue,
05 Jul 2005 15:37:50 GMT X-Powered-By: ASP.NET  string(660)  98.42  

*

Exception Info:
==

SoapFault exception: [SOAP-ENV:Client] looks like we got no XML
document in
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:24 Stack
trace: #0
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24):
SoapClient-__call('getQuote', Array) #1
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24):
SoapClient-getQuote('ibm') #2 {main}


Hope this helps.


Previous Comments:


[2005-07-05 15:13:28] [EMAIL PROTECTED]

I cannot reproduce this bug, but may be this is IIS6 specific problem.
Could you please add trace option to SoapClient constructor and the
following code after soap call. 

var_dump($x-__getLastResponseHeaders());
var_dump($x-__getLastResponse());





[2005-07-04 21:58:52] [EMAIL PROTECTED]

Assigned to the maintainer.



[2005-07-04 19:52:34] please-no-spam at blueyonder dot co dot uk

Description:

When I try to create my own web service using php 5.0.3 or 5.1.0b2
using Dmitry Stogov's example at zend.com code on Windows XP Pro IIS6:

eg:
$x = SoapClient(WSDL);

I get:

SoapFault exception: [SOAP-ENV:Client] looks like we got no XML
document in
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:13
Stack trace:
#0 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13):
SoapClient-__call('getQuote', Array)
#1 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13):
SoapClient-getQuote('ibm')
#2 {main}

Enabling Trace  Disabling exceptions like this:
$x = SoapClient(WSDL, array(trace=1, exceptions=0));
and the problem goes away.

This means I can't enable exceptions with the Soap Client.


Reproduce code:
---
$client = new SoapClient(stockquote.wsdl;
try
{

$client-getQuote(ibm);
echo $client-__getLastResponse();
} catch (SoapFault $exception) {
echo $exception;
}

Expected result:

98.42

Actual result:
--
SoapFault exception: [SOAP-ENV:Client] looks like we got no XML
document in
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:13
Stack trace:
#0 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13):
SoapClient-__call('getQuote', Array)
#1 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13):
SoapClient-getQuote('ibm')
#2 {main}






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


#33567 [NEW]: SoapClient Only Works If Exceptions Turned Off

2005-07-04 Thread please-no-spam at blueyonder dot co dot uk
From: please-no-spam at blueyonder dot co dot uk
Operating system: Windows XP Pro
PHP version:  5.1.0b2
PHP Bug Type: SOAP related
Bug description:  SoapClient Only Works If Exceptions Turned Off

Description:

When I try to create my own web service using php 5.0.3 or 5.1.0b2 using
Dmitry Stogov's example at zend.com code on Windows XP Pro IIS6:

eg:
$x = SoapClient(WSDL);

I get:

SoapFault exception: [SOAP-ENV:Client] looks like we got no XML document
in
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:13
Stack trace:
#0 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13):
SoapClient-__call('getQuote', Array)
#1 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13):
SoapClient-getQuote('ibm')
#2 {main}

Enabling Trace  Disabling exceptions like this:
$x = SoapClient(WSDL, array(trace=1, exceptions=0));
and the problem goes away.

This means I can't enable exceptions with the Soap Client.


Reproduce code:
---
$client = new SoapClient(stockquote.wsdl;
try
{

$client-getQuote(ibm);
echo $client-__getLastResponse();
} catch (SoapFault $exception) {
echo $exception;
}

Expected result:

98.42

Actual result:
--
SoapFault exception: [SOAP-ENV:Client] looks like we got no XML document
in
c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:13
Stack trace:
#0 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13):
SoapClient-__call('getQuote', Array)
#1 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13):
SoapClient-getQuote('ibm')
#2 {main}


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


#27792 [Com]: Functions fail on large files (filesize,is_file,is_dir)

2005-07-01 Thread no at spam dot net
 ID:   27792
 Comment by:   no at spam dot net
 Reported By:  kode at kodekrash dot com
 Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: * (LFS)
 PHP Version:  5.1*
 Assigned To:  wez
 New Comment:

is_link also fails on large files 2GB


Previous Comments:


[2005-06-30 06:40:29] dan at baximus dot com

Gee I hope it's included in PHP 5.1. IMHO this is a pretty 
important feature to have. But then, not everyone is in the 
business of serving up such large files from a PHP-driven 
website.



[2004-03-31 07:14:18] [EMAIL PROTECTED]

PHP does not currently support LFS.
This is something to be addressed in PHP 5.1



[2004-03-31 03:27:56] kode at kodekrash dot com

Description:

Error:
 (errno=75 - Value too large for defined data type)

Functions:
 is_file
 is_dir
 filesize

Premise:
 size of file is greater than 2GB.

--

I have been able to reproduce this error on 4 different PHP
installations (all on RedHat 7.3 machines), using 12 different files
for each test.

--

This bug has been submitted before, but is marked as BOGUS, which it is
certainly not.

Reproduce code:
---
filesize( $fname );
or
is_file( $fname )
or
is_dir( $fname )

where filesize( $fname )  2GB

Expected result:

Function: filesize
Expected: numeric value matching size of file

Function: is_file
Expected: boolean value

Function: is_dir
Expected: boolean value

Actual result:
--
(errno=75 - Value too large for defined data type)





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


#33418 [NEW]: FEATURE: Alternative to eval() to effectively optimize scripts

2005-06-21 Thread alex-spam at rdc dot ru
From: alex-spam at rdc dot ru
Operating system: all
PHP version:  4.3.11
PHP Bug Type: Feature/Change Request
Bug description:  FEATURE: Alternative to eval() to effectively optimize scripts

Description:

From: Alex Fortuna

My proposal, if accepted and implemented, will allow for ever tougher
optimization of processing-intensive PHP scripts.

I think it would be great if, in addition to existing eval() function, a
pair of functions were implemented, like:

int eval_prepare (string $code);
bool eval_exec (int $handle);

eval_prepare() compiles a piece of code and stores it in engine's memory
under an integer handle. You call it once outside the processing loop.

eval_exec() executes the given handle's code. You call it INSIDE the
processing loop.

The reason is practical: sometimes the programmer KNOWS how to optimize a
piece of code, but he CAN'T, since certain parts of it are dynamic. For
example, actual string token values may differ from call to call, though
processing logic is always the same.

The possibility to separately compile and execute script-generated PHP
code will give programmers a unique chance to achieve ever greater script
performance, the demand for which is continuosly growing.

I've made some prototype performance benchmarks on a script which parses
syntax. The results were amazing: about 2 to 3 times performance increase
without extra script complexity.

If you need a working example, please write via e-mail.

Thank you for your time.

Best regards,
Alex


Reproduce code:
---
.

Expected result:

.

Actual result:
--
.

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


#33418 [Bgs-Opn]: FEATURE: Alternative to eval() to effectively optimize scripts

2005-06-21 Thread alex-spam at rdc dot ru
 ID:   33418
 User updated by:  alex-spam at rdc dot ru
 Reported By:  alex-spam at rdc dot ru
-Status:   Bogus
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.3.11
 New Comment:

create_function() will create a _function_. When we're talking tough
optimization, every extra function call is an issue.

On 10k calls strcmp() is MUCH slower than '==' operator on strings.

Function calls are quite expensive in PHP. The context is switched and
caller's variables become invisible.

Precompiled eval()s would allow to unroll small loops without changing
the context, which is also important. What do you think?


Previous Comments:


[2005-06-21 11:36:32] [EMAIL PROTECTED]

You could use create_function() to create your dynamic 
code and execute the returned function. No need for a new 
function. 



[2005-06-21 11:13:35] alex-spam at rdc dot ru

Description:

From: Alex Fortuna

My proposal, if accepted and implemented, will allow for ever tougher
optimization of processing-intensive PHP scripts.

I think it would be great if, in addition to existing eval() function,
a pair of functions were implemented, like:

int eval_prepare (string $code);
bool eval_exec (int $handle);

eval_prepare() compiles a piece of code and stores it in engine's
memory under an integer handle. You call it once outside the processing
loop.

eval_exec() executes the given handle's code. You call it INSIDE the
processing loop.

The reason is practical: sometimes the programmer KNOWS how to optimize
a piece of code, but he CAN'T, since certain parts of it are dynamic.
For example, actual string token values may differ from call to call,
though processing logic is always the same.

The possibility to separately compile and execute script-generated PHP
code will give programmers a unique chance to achieve ever greater
script performance, the demand for which is continuosly growing.

I've made some prototype performance benchmarks on a script which
parses syntax. The results were amazing: about 2 to 3 times performance
increase without extra script complexity.

If you need a working example, please write via e-mail.

Thank you for your time.

Best regards,
Alex


Reproduce code:
---
.

Expected result:

.

Actual result:
--
.





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


#33418 [Opn]: FEATURE: Alternative to eval() to effectively optimize scripts

2005-06-21 Thread alex-spam at rdc dot ru
 ID:   33418
 User updated by:  alex-spam at rdc dot ru
 Reported By:  alex-spam at rdc dot ru
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.3.11
 New Comment:

I'm not a PHP internals expert so I can't get into detail on how
'precompiled evals' can be implemented.

No matter how it's named or implemented, the desired functionality
would allow a programmer to:
- build a piece of code in CURRENT context and prepare it for execution
(compile, bind all variables, functions etc.)
- execute this code using a lightweight language construct

'Preparation' process may have limitations, e.g. all referenced
variables must already be created, etc. In this case eval_prepare()
might just return FALSE with an appropriate error message.

Creating anonymous functions or using eval() are great by themselves,
but not for optimization purposes. I hope you've got my idea.


Previous Comments:


[2005-06-21 12:54:29] [EMAIL PROTECTED]

New OpArrays (like your eval thing returns) can only be executing by
calling a function (or something that resembles it very closely)... so
you're not gaining anything here.



[2005-06-21 12:43:39] alex-spam at rdc dot ru

create_function() will create a _function_. When we're talking tough
optimization, every extra function call is an issue.

On 10k calls strcmp() is MUCH slower than '==' operator on strings.

Function calls are quite expensive in PHP. The context is switched and
caller's variables become invisible.

Precompiled eval()s would allow to unroll small loops without changing
the context, which is also important. What do you think?



[2005-06-21 11:36:32] [EMAIL PROTECTED]

You could use create_function() to create your dynamic 
code and execute the returned function. No need for a new 
function. 



[2005-06-21 11:13:35] alex-spam at rdc dot ru

Description:

From: Alex Fortuna

My proposal, if accepted and implemented, will allow for ever tougher
optimization of processing-intensive PHP scripts.

I think it would be great if, in addition to existing eval() function,
a pair of functions were implemented, like:

int eval_prepare (string $code);
bool eval_exec (int $handle);

eval_prepare() compiles a piece of code and stores it in engine's
memory under an integer handle. You call it once outside the processing
loop.

eval_exec() executes the given handle's code. You call it INSIDE the
processing loop.

The reason is practical: sometimes the programmer KNOWS how to optimize
a piece of code, but he CAN'T, since certain parts of it are dynamic.
For example, actual string token values may differ from call to call,
though processing logic is always the same.

The possibility to separately compile and execute script-generated PHP
code will give programmers a unique chance to achieve ever greater
script performance, the demand for which is continuosly growing.

I've made some prototype performance benchmarks on a script which
parses syntax. The results were amazing: about 2 to 3 times performance
increase without extra script complexity.

If you need a working example, please write via e-mail.

Thank you for your time.

Best regards,
Alex


Reproduce code:
---
.

Expected result:

.

Actual result:
--
.





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


#33418 [WFx]: FEATURE: Alternative to eval() to effectively optimize scripts

2005-06-21 Thread alex-spam at rdc dot ru
 ID:   33418
 User updated by:  alex-spam at rdc dot ru
 Reported By:  alex-spam at rdc dot ru
 Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.3.11
 New Comment:

Hope that may become possible in future versions of Zend Engine.

Thank you for your comments.


Previous Comments:


[2005-06-21 13:28:44] [EMAIL PROTECTED]

Yes, I get what you want... but it's impossible to implement. You can't
insert compiled code INTO the current scope - that's just not possible
with the Zend Engine. (and it would require way too much work to do
this.



[2005-06-21 13:03:11] alex-spam at rdc dot ru

I'm not a PHP internals expert so I can't get into detail on how
'precompiled evals' can be implemented.

No matter how it's named or implemented, the desired functionality
would allow a programmer to:
- build a piece of code in CURRENT context and prepare it for execution
(compile, bind all variables, functions etc.)
- execute this code using a lightweight language construct

'Preparation' process may have limitations, e.g. all referenced
variables must already be created, etc. In this case eval_prepare()
might just return FALSE with an appropriate error message.

Creating anonymous functions or using eval() are great by themselves,
but not for optimization purposes. I hope you've got my idea.



[2005-06-21 12:54:29] [EMAIL PROTECTED]

New OpArrays (like your eval thing returns) can only be executing by
calling a function (or something that resembles it very closely)... so
you're not gaining anything here.



[2005-06-21 12:43:39] alex-spam at rdc dot ru

create_function() will create a _function_. When we're talking tough
optimization, every extra function call is an issue.

On 10k calls strcmp() is MUCH slower than '==' operator on strings.

Function calls are quite expensive in PHP. The context is switched and
caller's variables become invisible.

Precompiled eval()s would allow to unroll small loops without changing
the context, which is also important. What do you think?



[2005-06-21 11:36:32] [EMAIL PROTECTED]

You could use create_function() to create your dynamic 
code and execute the returned function. No need for a new 
function. 



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

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


#33088 [Fbk-Opn]: Output Buffering + Callback method = unable to change object properties

2005-05-22 Thread spam at cimmanon dot org
 ID:   33088
 User updated by:  spam at cimmanon dot org
 Reported By:  spam at cimmanon dot org
-Status:   Feedback
+Status:   Open
 Bug Type: Output Control
 Operating System: OpenBSD
 PHP Version:  4.3.11
 New Comment:

In the constructor, $this-var gets set to 'rar'.  Output buffering is
started using foo::bar as the callback.  I attempt to set $this-var to
'rarar' from outside of the object, which fails because of the output
buffering callback method.  The script finishes executing and the
callback method is executed, prints $this-var (which is supposed to be
set to 'rarar' at this point, but is still just 'rar'), sets $this-var
to 'asdf' (successfully), then prints $this-var yet again.

If I attempt to print $foo-var right after I modify it on line #20, it
displays exactly what I expect:  'rarar'.

This problem does not exist if I use a callback that is a function, nor
does it happen if I start output buffering without a callback and just
manually call foo::bar() at the end of the script.  Also, PHP 5 doesn't
have this problem, for whatever reason, and performs exactly as I
expect.

PHP 5.0.4:
http://www.sketchdiary.com/testcases/buffertest.php
http://www.sketchdiary.com/testcases/viewsource.php?file=buffertest.php

Modified source (forgot 1 line):
?
class foo {
var $var = '';

function foo() {
$this-var = 'rar';
print 'foo startedhr';
ob_start(array($this, 'bar'));
}

function bar() {
print $this-var . br;
$this-var = 'asdf';
print $this-var;
return ob_get_contents(); // missing line from example
}
}

$foo = new foo;
$foo-var = 'rarar';
?


Previous Comments:


[2005-05-22 15:34:39] [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 ?php and ends 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.

Please provide a more real-life example with expected and actual
results.



[2005-05-21 02:10:51] spam at cimmanon dot org

Description:

For some reason output buffering inside a callback method prevents an
object's properties from being modified outside of the object.  Using
output buffering without a callback works as expected, though.

Reproduce code:
---
?
class foo {
var $var = '';

function foo() {
$this-var = 'rar';
print 'foo startedhr';
ob_start(array($this, 'bar'));
}

function bar() {
print $this-var . br;
$this-var = 'asdf';
print $this-var;
}
}

$foo = new foo;
$foo-var = 'rarar';
?

Expected result:

I expected $foo-var to be set to 'rarar' after the initial object
creation via constructor, then 'asdf'.  Instead, it remains set to
'rar', then 'asdf'.






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


#33088 [NEW]: Output Buffering + Callback method = unable to change object properties

2005-05-20 Thread spam at cimmanon dot org
From: spam at cimmanon dot org
Operating system: OpenBSD
PHP version:  4.3.11
PHP Bug Type: Output Control
Bug description:  Output Buffering + Callback method = unable to change object 
properties

Description:

For some reason output buffering inside a callback method prevents an
object's properties from being modified outside of the object.  Using
output buffering without a callback works as expected, though.

Reproduce code:
---
?
class foo {
var $var = '';

function foo() {
$this-var = 'rar';
print 'foo startedhr';
ob_start(array($this, 'bar'));
}

function bar() {
print $this-var . br;
$this-var = 'asdf';
print $this-var;
}
}

$foo = new foo;
$foo-var = 'rarar';
?

Expected result:

I expected $foo-var to be set to 'rarar' after the initial object
creation via constructor, then 'asdf'.  Instead, it remains set to 'rar',
then 'asdf'.


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


#32695 [NEW]: CURLPROXY_SOCKS5 Notices

2005-04-13 Thread just-anonimus-no-spam at no-such-host dot com
From: just-anonimus-no-spam at no-such-host dot com
Operating system: Linux fc3 2.6.11.6 #1 Tue Apr
PHP version:  5.0.4
PHP Bug Type: cURL related
Bug description:  CURLPROXY_SOCKS5 Notices

Description:

I can't solve some problem while trying to get a site content via 
socks5 proxy (CURL Information: libcurl/7.13.1 OpenSSL/0.9.7d zlib/1.1.4)


  While trying to do like this: 

Reproduce code:
---
 ?php
error_reporting(E_ALL); 
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL, http://www.yahoo.com;);
curl_setopt ($ch, CURLOPT_TIMEOUT, 30);
curl_setopt ($ch, CURLOPT_PROXY, 192.168.1.12:1080);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt ($ch, CURLOPT_FAILONERROR, true);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
$result = curl_exec($ch);
print curl_errno ($ch);
print $result;
curl_close ($ch);
?

Expected result:

I get: print $result is Ok;

Notice: Use of undefined constant CURLOPT_PROXYTYPE - assumed
'CURLOPT_PROXYTYPE' in /home/jim/php/curl_socks.php on line 7 
Notice: Use of undefined constant CURLPROXY_SOCKS5 - assumed
'CURLPROXY_SOCKS5' in /home/jim/php/curl_socks.php on line 7

Actual result:
--
But: The socks proxy is ok = $result also Ok!
PS: PLEASE CHECK ERROR (Near Notices)

THANKS::FOR_YOUR_WORK

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


#32695 [Opn]: CURLPROXY_SOCKS5 Notices

2005-04-13 Thread just-anonimus-no-spam at no-such-host dot com
 ID:   32695
 User updated by:  just-anonimus-no-spam at no-such-host dot com
 Reported By:  just-anonimus-no-spam at no-such-host dot com
 Status:   Open
 Bug Type: cURL related
 Operating System: Linux fc3 2.6.11.6 #1 Tue Apr
-PHP Version:  5.0.4
+PHP Version:  4.3.11
 New Comment:

PHP v: 4.3.11


Previous Comments:


[2005-04-13 16:00:41] just-anonimus-no-spam at no-such-host dot com

Description:

I can't solve some problem while trying to get a site content via 
socks5 proxy (CURL Information: libcurl/7.13.1 OpenSSL/0.9.7d
zlib/1.1.4) 

  While trying to do like this: 

Reproduce code:
---
 ?php
error_reporting(E_ALL); 
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL, http://www.yahoo.com;);
curl_setopt ($ch, CURLOPT_TIMEOUT, 30);
curl_setopt ($ch, CURLOPT_PROXY, 192.168.1.12:1080);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt ($ch, CURLOPT_FAILONERROR, true);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
$result = curl_exec($ch);
print curl_errno ($ch);
print $result;
curl_close ($ch);
?

Expected result:

I get: print $result is Ok;

Notice: Use of undefined constant CURLOPT_PROXYTYPE - assumed
'CURLOPT_PROXYTYPE' in /home/jim/php/curl_socks.php on line 7 
Notice: Use of undefined constant CURLPROXY_SOCKS5 - assumed
'CURLPROXY_SOCKS5' in /home/jim/php/curl_socks.php on line 7

Actual result:
--
But: The socks proxy is ok = $result also Ok!
PS: PLEASE CHECK ERROR (Near Notices)

THANKS::FOR_YOUR_WORK





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


#32686 [NEW]: Require/include file in destructor causes segfault

2005-04-12 Thread spam at cimmanon dot org
From: spam at cimmanon dot org
Operating system: OpenBSD
PHP version:  5.0.4
PHP Bug Type: Reproducible crash
Bug description:  Require/include file in destructor causes segfault

Description:

Including a file inside the destructor of a class causes Apache to
segfault, if the file is attempting to print properties of the object. 
This did not happen in 5.0.3 (stable).

The problem seems to be in the included file itself.  Setting and printing
local variables seems to work just fine, it's the printing of the object's
properties that causes the segfault.

Reproduce code:
---
?
/* main script */
class a {
var $foo = '';
var $bar = '';

function __construct() {
$this-foo = 5;
$this-bar = 'boo';
}

function __destruct() {
print $this-bar;
include('include.php');
}
}

$test = new a;
?

?
/* include.php */
print $this-foo;
?

Expected result:

This should print boo, then 5.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x09d63402 in yy_push_state (new_state=6) at
Zend/zend_language_scanner.c:5990 5990   
yy_start_stack[yy_start_stack_ptr++] = YY_START;(gdb) bt
#0  0x09d63402 in yy_push_state (new_state=6) at
Zend/zend_language_scanner.c:5990#1  0x09d6025f in lex_scan
(zendlval=0xcfbf40c4) at Zend/zend_language_scanner.c:4021#2  
0x09d6d975
in zendlex (zendlval=0xcfbf40c0)at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/Zend/
zend_compile.
c:3688#3  0x09d5effd in zendparse () at Zend/
zend_language_parser.c:2221
#4  0x09d5f4a2 in compile_file (file_handle=incomplete type,
 type=2)
at Zend/zend_language_scanner.c:3157
#5  0x09d5f632 in compile_filename (type=2, 
filename=0x3c147324) at
Zend/zend_language_scanner.c:3202#6  0x09da0dad in
zend_include_or_eval_handler (execute_data=0xcfbf4310,
opline=0x3c147308, op_array=0x3c082f24) at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/Zend/
zend_execute.
c:3551#7  0x09d9b2ea in execute (op_array=0x3c082f24)
at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/Zend/
zend_execute.
c:1406#8  0x09d701b0 in zend_call_function (fci=0xcfbf44b0,
fci_cache=0xcfbf4490)at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/Zend/
zend_execute_
API.c:852#9  0x09d890b6 in zend_call_method 
(object_pp=0xcfbf453c,
obj_ce=0x3c111c24, fn_proxy=0x0, function_name=0x29c61fb6
__destruct, function_name_len=10, retval_ptr_ptr=0x0, 
param_count=0,  
  arg1=0x0, arg2=0x0) at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/Zend/
zend_interfac
es.c:86#10 0x09d8cf64 in zend_objects_destroy_object 
(object=0x3c137ce4,
handle=1)at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/Zend/
zend_objects.
c:78#11 0x09d8f218 in zend_objects_store_call_destructors
(objects=0x29c874d0)at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/Zend/
zend_objects_
API.c:54#12 0x09d6ecbd in shutdown_executor ()
at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/Zend/
zend_execute_
API.c:207#13 0x09d79ede in zend_deactivate ()
at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/Zend/
zend.c:817#14
0x09d40077 in php_request_shutdown (dummy=0x0)at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/main/
main.c:1216#15
0x09da5d0a in apache_php_module_main (r=0x3c07b034,
display_source_mode=0)at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/sapi/
apache/sapi_a
pache.c:60#16 0x09da679e in send_php (r=0x3c07b034,
display_source_mode=0, filename=0x0)at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/sapi/
apache/mod_ph
p5.c:622#17 0x09da6932 in send_parsed_php (r=0x3c07b034)
at
/usr/ports/www/php5/core/w-php5-core-5.0.4/php-5.0.4/sapi/
apache/mod_ph
p5.c:637#18 0x1c036732 in ap_invoke_handler ()
---Type return to continue, or q return to quit---
#19 0x1c046e57 in ap_some_auth_required ()
#20 0x1c047007 in ap_process_request ()
#21 0xcfbf4bb0 in ?? ()
#22 0x0003 in ?? ()
#23 0x3c07b034 in ?? ()
#24 0x3c07b034 in ?? ()
#25 0x3c078044 in ?? ()
#26 0xcfbf4be8 in ?? ()
#27 0x1c03fdbd in ap_child_terminate ()

-- 
Edit bug report at http://bugs.php.net/?id=32686edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32686r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32686r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32686r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=32686r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=32686r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=32686r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=32686r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=32686r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32686r=support
Expected behavior:   http

#29032 [Com]: Session are closed before all object destructors executed.

2005-04-10 Thread spam at cimmanon dot org
 ID:   29032
 Comment by:   spam at cimmanon dot org
 Reported By:  antonr at game dot permonline dot ru
 Status:   No Feedback
 Bug Type: Session related
 Operating System: Irrelevant
 PHP Version:  5CVS-2004-07-06 (dev)
 New Comment:

This bug still persists in PHP 5.0.4 (my problem is related to output
buffers being cleared before destructors are executed).  Is the latest
CVS snapshot mentioned by [EMAIL PROTECTED] [6 Mar 8:35pm CET] reflected
in the 5.0.4 release [31 Mar]?


Previous Comments:


[2005-03-14 01:00:10] 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.



[2005-03-06 20:35: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





[2004-12-06 05:34:29] anthony at ectrolinux dot com

For reference, this bug appears to be synonymous to bug #30578, with
the same cause but a different effect.



[2004-10-26 02:40:15] auroraeosrose at hotmail dot com

Modifying $_SESSION in the destructor ONLY works if you call
unset($object) before the end of your script, however this is a pain in
the rear - and if you have references to that object elsewhere it
doesn't work properly.

There is a workaround... You CAN use register_shutdown_function in the
constructor of your class

  public function __construct()
{ 
register_shutdown_function(array($this, '__destruct');
} 

and then the destruct is called early enough that you can modify
$_SESSION. But this defeats the whole purpose of a destructor - I could
do that in every class if php5 didn't support destructors (in fact I did
in php4) but I thought the point was to eliminate messy workarounds. 
Now why in the world the sessions are closed in between when shutdown
functions and destructors are called is beyond me.



[2004-07-06 16:58:15] antonr at game dot permonline dot ru

Description:

Session are closed before all object destructors executed. It seems to
be wrong, cause objects desctructors may save information in opened
session.


Reproduce code:
---
?php

  class MySession
{ public $number; 
  public function __construct()
{ session_start();
  $this-number = @$_SESSION[number];
}
  public function Process()
{ $this-number++;
}
  public function __destruct()
{ $_SESSION[number] = $this-number;
  session_write_close();
}
}

  $ss = new MySession();
  $ss-Process();
  echo $ss-number;

?


Expected result:

With every page reloading number in the page must increase by 1.

Actual result:
--
Everytime number is equal 1.





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


#32388 [NEW]: specifing open_basedir or doc_root enables safe_mode even safe_mode is disabled

2005-03-20 Thread carlos-spam at wfmh dot org dot pl
From: carlos-spam at wfmh dot org dot pl
Operating system: Debian
PHP version:  4.3.10
PHP Bug Type: Apache related
Bug description:  specifing open_basedir or doc_root enables safe_mode even 
safe_mode is disabled

Description:

Use of open_basedir or doc_root in vhost (apache 1) as shown below:

php_admin_value open_basedir /
php_admin_value doc_root /
php_admin_flag safe_mode off

enables safe_mode, even safe_mode is set to off, whcih spits out:

Warning: main(): open_basedir restriction in effect. File(.//prepend.php)
is not within the allowed path(s): (/) in my-path on line 18

Warning: main(prepend.php): failed to open stream: Operation not permitted
in my-path on line 18

The above used to work with 4.3.4 but stopped after upgrade t 4.3.10-9
(debian package)

Actual result:
--
open_basedir, doc_root shall have no effect unless safe_mode is enabled

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


#31417 [Opn]: $HTTP_RAW_POST_DATA but $_POST not populated

2005-01-05 Thread j-spam at starline dot ee
 ID:   31417
 User updated by:  j-spam at starline dot ee
 Reported By:  j-spam at starline dot ee
 Status:   Open
 Bug Type: Variables related
 Operating System: Linux
 PHP Version:  5.0.3
 New Comment:

Typo: $HTTP_RAW_POST_DATA not $_HTTP_RAW_POST_DATA on Reproduce
code, line 2.


Previous Comments:


[2005-01-05 15:55:35] j-spam at starline dot ee

Description:

$_POST is not populated, however $HTTP_RAW_POST_DATA is.

lighttpd 1.3.5 using cgi (not fcgi)
CGI-PHP5 5.0.3
Firefox 1.0

Reproduce code:
---
$_POST: ?php print_r($_POST); ?br
$HTTP_RAW_POST_DATA: ?php print_r($_HTTP_RAW_POST_DATA); ?brbr
form action=?=$_SERVER[PHP_SELF] ? method=post
textarea name=duh?=$_POST[duh];?/textarea
input type=submit /
/form

Actual result:
--
$_POST: Array ( )
$HTTP_RAW_POST_DATA: bla=asdfduh=eeca%0D%0Aasdf%0D%0Aasdf





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


#31417 [NEW]: $HTTP_RAW_POST_DATA but $_POST not populated

2005-01-05 Thread j-spam at starline dot ee
From: j-spam at starline dot ee
Operating system: Linux
PHP version:  5.0.3
PHP Bug Type: Variables related
Bug description:  $HTTP_RAW_POST_DATA but $_POST not populated

Description:

$_POST is not populated, however $HTTP_RAW_POST_DATA is.

lighttpd 1.3.5 using cgi (not fcgi)
CGI-PHP5 5.0.3
Firefox 1.0

Reproduce code:
---
$_POST: ?php print_r($_POST); ?br
$HTTP_RAW_POST_DATA: ?php print_r($_HTTP_RAW_POST_DATA); ?brbr
form action=?=$_SERVER[PHP_SELF] ? method=post
textarea name=duh?=$_POST[duh];?/textarea
input type=submit /
/form

Actual result:
--
$_POST: Array ( )
$HTTP_RAW_POST_DATA: bla=asdfduh=eeca%0D%0Aasdf%0D%0Aasdf

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


#31417 [Opn]: $HTTP_RAW_POST_DATA but $_POST not populated

2005-01-05 Thread j-spam at starline dot ee
 ID:   31417
 User updated by:  j-spam at starline dot ee
 Reported By:  j-spam at starline dot ee
 Status:   Open
 Bug Type: Variables related
 Operating System: Linux
 PHP Version:  5.0.3
 New Comment:

btw $_GET works.


Previous Comments:


[2005-01-05 15:58:37] j-spam at starline dot ee

Typo: $HTTP_RAW_POST_DATA not $_HTTP_RAW_POST_DATA on Reproduce
code, line 2.



[2005-01-05 15:55:35] j-spam at starline dot ee

Description:

$_POST is not populated, however $HTTP_RAW_POST_DATA is.

lighttpd 1.3.5 using cgi (not fcgi)
CGI-PHP5 5.0.3
Firefox 1.0

Reproduce code:
---
$_POST: ?php print_r($_POST); ?br
$HTTP_RAW_POST_DATA: ?php print_r($_HTTP_RAW_POST_DATA); ?brbr
form action=?=$_SERVER[PHP_SELF] ? method=post
textarea name=duh?=$_POST[duh];?/textarea
input type=submit /
/form

Actual result:
--
$_POST: Array ( )
$HTTP_RAW_POST_DATA: bla=asdfduh=eeca%0D%0Aasdf%0D%0Aasdf





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


#31238 [NEW]: pg_field_is_null fails for column with upper case name

2004-12-21 Thread phpdevel-no-spam at pv2c dot sk
From: phpdevel-no-spam at pv2c dot sk
Operating system: Linux
PHP version:  4.3.10
PHP Bug Type: PostgreSQL related
Bug description:  pg_field_is_null fails for column with upper case name

Description:

When calling pg_field_is_null() with 3. parameter the column name and it
has upper case letters in it, an error is the result:
PHP Warning:  pg_field_is_null(): Bad column offset specified in
bugtest.php on line 15

This bug was reproduced using PostgreSQL 7.4.6, PHP 4.3.10
PostgreSQL 7.4.6, PHP 4.3.9
PostgreSQL 7.4.6, PHP 4.3.10
using two different servers.

This bug doesn't occur when the 3. parameter is column offset, or the
column name contains only lover case letters.

Reproduce code:
---
http://www.pv2c.sk/php/bugtest.zip (1KB)

Included is also a sample db creation script.

Expected result:

Just want to know if the column is NULL.

Actual result:
--
Just an warning.

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


#31022 [NEW]: Using '_' in a hostname causes sessions to break

2004-12-08 Thread spam at taylorw dot com
From: spam at taylorw dot com
Operating system: Gentoo Linux
PHP version:  4.3.9
PHP Bug Type: *Configuration Issues
Bug description:  Using '_' in a hostname causes sessions to break

Description:

Previously I submitted a bug report about sessions not working, in the
sense that every session_start() call created a new session, and a new
file in /tmp. I have concluded that the host name spare_ribs was the
issue. By changing the hostname to spareribs (no '_') the session issue
is fixed. I am not sure if using '_' in a hostname is against some RFC and
thus this is not really a bug, but I think that since bind accepted it, and
the two browsers I tried with it worked fine, this is not breaking protocol
and should work fine.

(Apache 2.0.52 being used here.)

Reproduce code:
---
Set hostname to anything with _ such as spare_ribs. Then reboot box and
browse to page one which includes the following code.

/* Page 1 */

?php
 session_start();
 $_SESSION['test'] = 'this is a test.';

 echo $_SESSION['test'];
 echo 'a href=page2.phpclick here for page 2/a';

?

/* Page 2 */

?php
 session_start();
 echo 'You should see this is a test:';
 echo $_SESSION['test'];
 echo 'a href=page1.phpclick here for page 1/a';

?



Expected result:

Page one should say 'this is a test', and page two should say 'You should
see this is a test: this is a test'. 

Actual result:
--
However page two only says 'You should see this is a test'. And a new
session id has been assigned, as well as a new session created in /tmp.

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


#16263 [Com]: session.start() create new empty session file and not resume existing session

2004-12-07 Thread spam at taylorw dot com
 ID:   16263
 Comment by:   spam at taylorw dot com
 Reported By:  kur at natur dot cuni dot cz
 Status:   No Feedback
 Bug Type: Session related
 Operating System: ANY
 PHP Version:  4.3.0-dev
 New Comment:

I have this same issue. Just did a clean install of Apache 2.0.52 and
PHP/4.3.9 ... and I have the same issues. A new session is created, and
yes, the php.ini is correct (the one that installed with the Gentoo
ebuild).


Previous Comments:


[2004-10-28 15:43:58] kovalchuk at dopomoga dot org dot ua

I got simmilar problem with PHP 5.0.2, Apache 2.0.52 
(Linux, kernel 2.6.8.1). 
The session files are apeared in the session.save_path 
directory and they contains correct entryes, but each time 
I call session_start() a new file is apeared and $_SESSION 
array does not contain anything.



[2002-11-14 14:42:28] murray dot rennie at ec dot gc dot ca

Redhat 7.2 or 7.3.  PhP 4.1.2, Apache 1.3.23.

I get something similar to this when I change session.cookie_lifetime
to something other than zero, and only when connecting with IE (my
version 5.5).  PHP generates two session files, one has all the info I
initialized with, the second just has the sessionId in it.
It's as if it ignores the first session it created and makes a new one.
 Netscape 4.79 works properly, and when I set session.cookie_lifetime to
0 the problem goes away on IE.



[2002-04-15 20:27:19] [EMAIL PROTECTED]

once again, whenever you update/downgrade PHP remember
to replace ALL the dlls and other binaries in your systems
with the ones found in the release packages.





[2002-04-10 05:17:06] alex at netflex dot nl

Hi,

It is fixed in PHP 4.2.0

Look for PHP 4.2.0 at:
http://www.php.net/~derick/



[2002-04-06 08:13:00] [EMAIL PROTECTED]

When updating PHP, remember to always replace the php4ts.dll 
with the one found in the release package.




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

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


#30789 [NEW]: New Session created for every session_start() call.

2004-11-14 Thread spam at taylorw dot com
From: spam at taylorw dot com
Operating system: Linux - 2.6.8-gentoo-r3
PHP version:  Irrelevant
PHP Bug Type: Session related
Bug description:  New Session created for every session_start() call.

Description:

I have tried 4.3.9 and 5.0.2 (both emerged via gentoo) with various Apache
2.0.5x versions (currently using 2.0.52)... none seem to solve this
problem. Anytime session_start(); is called a new session is created,
along with a new session_id. I have verified that /tmp is where the
sessions are being stored, and have watched the directory as I refreshed a
page with nothing but session_start(); in it, and a new session is created
each time. And session autostart is not on in php.ini.

Relevant php.ini information:

session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain = 
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0


Reproduce code:
---
/* Page One (page1.php)*/
?php

session_start();

echo session_id();

?
a href=page2.phpclick here for page 2/a

/* Page Two (page2.php)*/
?php

session_start();

echo session_id();

?
a href=page2.phpclick here for page one/a

Expected result:

The echo'ed session_id()'s should be the same for both pages, and no new
session file should exist in /tmp .

Actual result:
--
The session id's differ, and a new session file has been created in /tmp .
Refreshing either page creates another session file in /tmp as well.

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


#30789 [Fbk-Opn]: New Session created for every session_start() call.

2004-11-14 Thread spam at taylorw dot com
 ID:   30789
 User updated by:  spam at taylorw dot com
 Reported By:  spam at taylorw dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: Linux - 2.6.8-gentoo-r3
 PHP Version:  Irrelevant
 New Comment:

Changed, and checked using two different machines, and browsers... same
problem. I did note something of interest. After changing that setting,
I echo'ed phpinfo() and it does not show the updated setting in the
php.ini... So then I noticed something else (compared to another system
with exact same Apache and mod_php versions)...

For the box it wont work on:
--with-config-file-path=/etc/php/apache2-php4
Configuration File (php.ini) Path  /php.ini  

For the box it does work on:
--with-config-file-path=/etc/php/apache2-php4
Configuration File (php.ini) Path  /etc/php/apache2-php4/php.ini  

The second one has the correct path despite the fact that they both
have the same --with-configure lines. I'm not sure if that has anything
to do with the session issue?


Previous Comments:


[2004-11-15 07:45:17] [EMAIL PROTECTED]

Try to set session.use_trans_sid to 1 and check if cookies are enabled
in your browser.



[2004-11-15 07:08:41] spam at taylorw dot com

Description:

I have tried 4.3.9 and 5.0.2 (both emerged via gentoo) with various
Apache 2.0.5x versions (currently using 2.0.52)... none seem to solve
this problem. Anytime session_start(); is called a new session is
created, along with a new session_id. I have verified that /tmp is
where the sessions are being stored, and have watched the directory as
I refreshed a page with nothing but session_start(); in it, and a new
session is created each time. And session autostart is not on in
php.ini.

Relevant php.ini information:

session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain = 
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0


Reproduce code:
---
/* Page One (page1.php)*/
?php

session_start();

echo session_id();

?
a href=page2.phpclick here for page 2/a

/* Page Two (page2.php)*/
?php

session_start();

echo session_id();

?
a href=page2.phpclick here for page one/a

Expected result:

The echo'ed session_id()'s should be the same for both pages, and no
new session file should exist in /tmp .

Actual result:
--
The session id's differ, and a new session file has been created in
/tmp . Refreshing either page creates another session file in /tmp as
well.





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


#30789 [Bgs]: New Session created for every session_start() call.

2004-11-14 Thread spam at taylorw dot com
 ID:   30789
 User updated by:  spam at taylorw dot com
 Reported By:  spam at taylorw dot com
 Status:   Bogus
 Bug Type: Session related
 Operating System: Linux - 2.6.8-gentoo-r3
 PHP Version:  Irrelevant
 New Comment:

Not sure what you mean put it to the right place ? I understand that
it's trying to read it from /php.ini but I havent been able to find
where that is set?

I also used 'locate' to find all php.ini files and updated the two it
found to turn on the trans_sid, but still having the same issue.


Previous Comments:


[2004-11-15 08:05:12] [EMAIL PROTECTED]

No, put your php.ini to the right place first.



[2004-11-15 07:56:01] spam at taylorw dot com

Changed, and checked using two different machines, and browsers... same
problem. I did note something of interest. After changing that setting,
I echo'ed phpinfo() and it does not show the updated setting in the
php.ini... So then I noticed something else (compared to another system
with exact same Apache and mod_php versions)...

For the box it wont work on:
--with-config-file-path=/etc/php/apache2-php4
Configuration File (php.ini) Path  /php.ini  

For the box it does work on:
--with-config-file-path=/etc/php/apache2-php4
Configuration File (php.ini) Path  /etc/php/apache2-php4/php.ini  

The second one has the correct path despite the fact that they both
have the same --with-configure lines. I'm not sure if that has anything
to do with the session issue?



[2004-11-15 07:45:17] [EMAIL PROTECTED]

Try to set session.use_trans_sid to 1 and check if cookies are enabled
in your browser.



[2004-11-15 07:08:41] spam at taylorw dot com

Description:

I have tried 4.3.9 and 5.0.2 (both emerged via gentoo) with various
Apache 2.0.5x versions (currently using 2.0.52)... none seem to solve
this problem. Anytime session_start(); is called a new session is
created, along with a new session_id. I have verified that /tmp is
where the sessions are being stored, and have watched the directory as
I refreshed a page with nothing but session_start(); in it, and a new
session is created each time. And session autostart is not on in
php.ini.

Relevant php.ini information:

session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain = 
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0


Reproduce code:
---
/* Page One (page1.php)*/
?php

session_start();

echo session_id();

?
a href=page2.phpclick here for page 2/a

/* Page Two (page2.php)*/
?php

session_start();

echo session_id();

?
a href=page2.phpclick here for page one/a

Expected result:

The echo'ed session_id()'s should be the same for both pages, and no
new session file should exist in /tmp .

Actual result:
--
The session id's differ, and a new session file has been created in
/tmp . Refreshing either page creates another session file in /tmp as
well.





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


#30789 [Bgs]: New Session created for every session_start() call.

2004-11-14 Thread spam at taylorw dot com
 ID:   30789
 User updated by:  spam at taylorw dot com
 Reported By:  spam at taylorw dot com
 Status:   Bogus
 Bug Type: Session related
 Operating System: Linux - 2.6.8-gentoo-r3
 PHP Version:  Irrelevant
 New Comment:

Yeah it did, removed that one (which I know remember I copied off the
other box to compare with this boxes). The correct ini file is now
reported... but nothing else new to report.


Previous Comments:


[2004-11-15 08:16:36] [EMAIL PROTECTED]

I mean delete /php.ini and use /etc/php/apache2-php4/php.ini instead.
Does `ls -l /php.ini` report that there is no such file ?



[2004-11-15 08:13:27] spam at taylorw dot com

Not sure what you mean put it to the right place ? I understand that
it's trying to read it from /php.ini but I havent been able to find
where that is set?

I also used 'locate' to find all php.ini files and updated the two it
found to turn on the trans_sid, but still having the same issue.



[2004-11-15 08:05:12] [EMAIL PROTECTED]

No, put your php.ini to the right place first.



[2004-11-15 07:56:01] spam at taylorw dot com

Changed, and checked using two different machines, and browsers... same
problem. I did note something of interest. After changing that setting,
I echo'ed phpinfo() and it does not show the updated setting in the
php.ini... So then I noticed something else (compared to another system
with exact same Apache and mod_php versions)...

For the box it wont work on:
--with-config-file-path=/etc/php/apache2-php4
Configuration File (php.ini) Path  /php.ini  

For the box it does work on:
--with-config-file-path=/etc/php/apache2-php4
Configuration File (php.ini) Path  /etc/php/apache2-php4/php.ini  

The second one has the correct path despite the fact that they both
have the same --with-configure lines. I'm not sure if that has anything
to do with the session issue?



[2004-11-15 07:45:17] [EMAIL PROTECTED]

Try to set session.use_trans_sid to 1 and check if cookies are enabled
in your browser.



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

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


#30789 [Bgs]: New Session created for every session_start() call.

2004-11-14 Thread spam at taylorw dot com
 ID:   30789
 User updated by:  spam at taylorw dot com
 Reported By:  spam at taylorw dot com
 Status:   Bogus
 Bug Type: Session related
 Operating System: Linux - 2.6.8-gentoo-r3
 PHP Version:  Irrelevant
 New Comment:

Not sure why this got changed to bogus, when the session issue is still
happening?


Previous Comments:


[2004-11-15 08:19:51] spam at taylorw dot com

Yeah it did, removed that one (which I know remember I copied off the
other box to compare with this boxes). The correct ini file is now
reported... but nothing else new to report.



[2004-11-15 08:16:36] [EMAIL PROTECTED]

I mean delete /php.ini and use /etc/php/apache2-php4/php.ini instead.
Does `ls -l /php.ini` report that there is no such file ?



[2004-11-15 08:13:27] spam at taylorw dot com

Not sure what you mean put it to the right place ? I understand that
it's trying to read it from /php.ini but I havent been able to find
where that is set?

I also used 'locate' to find all php.ini files and updated the two it
found to turn on the trans_sid, but still having the same issue.



[2004-11-15 08:05:12] [EMAIL PROTECTED]

No, put your php.ini to the right place first.



[2004-11-15 07:56:01] spam at taylorw dot com

Changed, and checked using two different machines, and browsers... same
problem. I did note something of interest. After changing that setting,
I echo'ed phpinfo() and it does not show the updated setting in the
php.ini... So then I noticed something else (compared to another system
with exact same Apache and mod_php versions)...

For the box it wont work on:
--with-config-file-path=/etc/php/apache2-php4
Configuration File (php.ini) Path  /php.ini  

For the box it does work on:
--with-config-file-path=/etc/php/apache2-php4
Configuration File (php.ini) Path  /etc/php/apache2-php4/php.ini  

The second one has the correct path despite the fact that they both
have the same --with-configure lines. I'm not sure if that has anything
to do with the session issue?



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

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


#30609 [Com]: cURL functions bypass open_basedir

2004-10-31 Thread say at no dot to dot spam
 ID:   30609
 Comment by:   say at no dot to dot spam
 Reported By:  guillaume dot maes at celeonet dot fr
 Status:   Open
 Bug Type: cURL related
 Operating System: Linux
 PHP Version:  4.3.9
 New Comment:

any solution to this? other then disabling curl


Previous Comments:


[2004-10-29 10:47:07] guillaume dot maes at celeonet dot fr

Sorry for the double post. My browser has crashed at this moment of my
submit



[2004-10-29 10:43:45] [EMAIL PROTECTED]

Sorry, this one should be open =)
I do think it should be fixed and no, this is not a cURL problem.



[2004-10-29 10:38:02] [EMAIL PROTECTED]

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.

.



[2004-10-29 10:21:17] guillaume dot maes at celeonet dot fr

Description:

PHP cURL functions bypass open_basedir
protection, so users can navigate through
filesystem.

For example, setting open_basedir in php.ini to
/var/www/html anybody can retrieve /etc/parla
using cURL functions

This vulnerability has been discovered wednesday
:http://www.securitytrap.com/mail/bugtraq/2004/Oct/0287.html





Reproduce code:
---
?php
$ch = curl_init(file:///etc/parla);
$file=curl_exec($ch);
echo $file
? 

Expected result:

The execution of the file /etc/parla is not allowed because the value
of openbase_dir restriction is /var/www/html.

Actual result:
--
The file /etc/parla is executed. 

If /etc/parla contents :

bodyhtml Test of vulnerability /html/body

The execution of this code with cURL functions showns the message.





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


#30458 [NEW]: glob() overlooks broken symlinks

2004-10-16 Thread spam at ww981 dot net
From: spam at ww981 dot net
Operating system: Linux
PHP version:  5.0.2
PHP Bug Type: Directory function related
Bug description:  glob() overlooks broken symlinks

Description:

 If a symlink doesn't point to a existing file/dir, glob
overlooks it. I'm pretty sure this is a bug because glob
should return everything existing in the pattern. glob in
php 4.3.9 has the same bug.


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


#30281 [Fbk-Opn]: returned size for WBMP is always 1x0

2004-10-04 Thread spam at batz dot org
 ID:   30281
 User updated by:  spam at batz dot org
 Reported By:  spam at batz dot org
-Status:   Feedback
+Status:   Open
 Bug Type: GetImageSize related
 Operating System: Windows XP
 PHP Version:  5.0.1
 New Comment:

Any file in ICO-format should do it. But you can just use
http://www.favicon.com/favicon.ico as sample.


Previous Comments:


[2004-09-30 03:16:00] [EMAIL PROTECTED]

Please supply the image used.



[2004-09-29 21:25:49] spam at batz dot org

Description:

getimagesize returns always 1 as width and 0 as height for WBMP
pictures. problem occurs on 4.3.8 and 4.3.9 as well.
WBMP/ICO can hold multiple frames with different sizes.


Reproduce code:
---
$imageinfo = getimagesize('favicon.ico');
echo width:{$imageinfo[0]}br;
echo height:{$imageinfo[1]}br;
echo imagetype:{$imageinfo[2]}br;
echo to show that the size is wrong:br;
echo img src=\favicon.ico\;

Expected result:

width:16
height:16
imagetype:15
to show that the size is wrong:
IMAGE

Actual result:
--
width:1
height:0
imagetype:15
to show that the size is wrong:
IMAGE





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


#30281 [NEW]: returned size for WBMP is always 1x0

2004-09-29 Thread spam at batz dot org
From: spam at batz dot org
Operating system: Windows XP
PHP version:  5.0.1
PHP Bug Type: GetImageSize related
Bug description:  returned size for WBMP is always 1x0

Description:

getimagesize returns always 1 as width and 0 as height for WBMP pictures.
problem occurs on 4.3.8 and 4.3.9 as well.
WBMP/ICO can hold multiple frames with different sizes.


Reproduce code:
---
$imageinfo = getimagesize('favicon.ico');
echo width:{$imageinfo[0]}br;
echo height:{$imageinfo[1]}br;
echo imagetype:{$imageinfo[2]}br;
echo to show that the size is wrong:br;
echo img src=\favicon.ico\;

Expected result:

width:16
height:16
imagetype:15
to show that the size is wrong:
IMAGE

Actual result:
--
width:1
height:0
imagetype:15
to show that the size is wrong:
IMAGE

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


#29669 [NEW]: Setting ADO RecordSet CursorLocation to adUseClient causes query delay

2004-08-13 Thread www dot spam at whoah dot net
From: www dot spam at whoah dot net
Operating system: Windows 2000 Professional
PHP version:  5.0.1
PHP Bug Type: COM related
Bug description:  Setting ADO RecordSet CursorLocation to adUseClient causes query 
delay

Description:

When attempting to use ADODB.RecordSet COM object to query an MS Access
database via a DSNless connection, setting the CursorLocation to
adUseClient causes a significant delay on the processing of a query
execution. 

ASP has no such issue with this, so maybe PHP's support can be improved
(client-side cursor location allows the use of additional RecordSet
features such as -Sort() and -Filter(), handy for porting ASP code that
uses it instead of writing a dynamic query).

Any database and query should reproduce this, so please modify the
'reproduce code' appropriately (to point to your own database and use your
own query).

Reproduce code:
---
define(adLockReadOnly,1);
define(adOpenStatic,3);
define(adUseClient,3);

function simpleRS($conn,$q) {
$rs = new COM('ADODB.RecordSet');
$rs-ActiveConnection = $conn;
$rs-LockType = adLockReadOnly;
$rs-CursorLocation = adUseClient; //comment this line to remove the
delay
$rs-CursorType = adOpenStatic;
$rs-Source = $q;
echo 'opening... '; $rs-Open(); echo 'done';
return $rs;
}

$dbconn = new COM('ADODB.Connection');
$dbconn-open('Provider=Microsoft.Jet.OLEDB.4.0; Data Source='.
realpath('../../data/phpbb2.mdb'));
$rsUserList = simpleRS($dbconn,'SELECT * FROM phpbb_users');
$dbconn-close();

Expected result:

opening... *almost instant* done

Actual result:
--
opening... *delay* done

-- 
Edit bug report at http://bugs.php.net/?id=29669edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29669r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29669r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29669r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29669r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29669r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29669r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29669r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29669r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29669r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29669r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29669r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29669r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29669r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29669r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29669r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29669r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29669r=float


#29669 [Opn]: Setting ADO RecordSet CursorLocation to adUseClient causes query delay

2004-08-13 Thread www dot spam at whoah dot net
 ID:   29669
 User updated by:  www dot spam at whoah dot net
 Reported By:  www dot spam at whoah dot net
 Status:   Open
 Bug Type: COM related
 Operating System: Windows 2000 Professional
 PHP Version:  5.0.1
 New Comment:

Further:

The delay seems to be related to the size of the results data being
returned. The table referenced by my query has some 11000 records
whereas the same query on another table with only a few records
experiences no delay.

Querying the same table (11000 records) using a server-side cursor
causes no delay.

ASP experiences no such delay using the same COM objects and routines,
on the same server.


Previous Comments:


[2004-08-14 03:29:38] www dot spam at whoah dot net

Description:

When attempting to use ADODB.RecordSet COM object to query an MS Access
database via a DSNless connection, setting the CursorLocation to
adUseClient causes a significant delay on the processing of a query
execution. 

ASP has no such issue with this, so maybe PHP's support can be improved
(client-side cursor location allows the use of additional RecordSet
features such as -Sort() and -Filter(), handy for porting ASP code
that uses it instead of writing a dynamic query).

Any database and query should reproduce this, so please modify the
'reproduce code' appropriately (to point to your own database and use
your own query).

Reproduce code:
---
define(adLockReadOnly,1);
define(adOpenStatic,3);
define(adUseClient,3);

function simpleRS($conn,$q) {
$rs = new COM('ADODB.RecordSet');
$rs-ActiveConnection = $conn;
$rs-LockType = adLockReadOnly;
$rs-CursorLocation = adUseClient; //comment this line to remove the
delay
$rs-CursorType = adOpenStatic;
$rs-Source = $q;
echo 'opening... '; $rs-Open(); echo 'done';
return $rs;
}

$dbconn = new COM('ADODB.Connection');
$dbconn-open('Provider=Microsoft.Jet.OLEDB.4.0; Data Source='.
realpath('../../data/phpbb2.mdb'));
$rsUserList = simpleRS($dbconn,'SELECT * FROM phpbb_users');
$dbconn-close();

Expected result:

opening... *almost instant* done

Actual result:
--
opening... *delay* done





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


  1   2   >