#43721 [NEW]: parse_url does not handle "protocol relative" URLs

2007-12-31 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5.2.5
PHP Bug Type: URL related
Bug description:  parse_url does not handle "protocol relative" URLs

Description:

parse_url does not parse "protocol relative" URLs correctly.

"protocol relative" URLs start with to slashes, leaving the "proto:" 
part out.

parse_url should parse them like a "http://"; url, but leave 
the "protocol" key unset, as far as I can see.

See RFC3986.

Reproduce code:
---
$ php -r '$p = parse_url("//example.com/bar"); var_dump($p);'


Expected result:

array(2) {
  ["host"]=>
  string(11) "example.com"
  ["path"]=>
  string(17) "/bar"
}


Actual result:
--
array(1) {
  ["path"]=>
  string(17) "//example.com/bar"
}


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


#42077 [Com]: Why have the session folder in open_basedir

2007-08-16 Thread phpbugs at thequod dot de
 ID:   42077
 Comment by:   phpbugs at thequod dot de
 Reported By:  spam2 at rhsoft dot net
 Status:   No Feedback
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  5CVS-2007-07-23 (snap)
 Assigned To:  stas
 New Comment:

I can confirm that the bug is fixed, too.
Thank you.


Previous Comments:


[2007-08-14 01:00:00] 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".



[2007-08-07 08:55:38] harry at rhsoft dot net

Yes seems to work correct



Notice: Undefined variable: a in /mnt/data/www/www.rhsoft.net/test.php
on line 3
PHP Version 5.2.4RC1-dev

__

Session was started with a save-path outside open_basedir
The Warning-Message was written in the global error_log also outside
open_basedir



[2007-08-07 00:25:39] [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

AFAIK, this is now fixed. Please try the snapshot.



[2007-08-03 18:13:36] harry at rhsoft dot net

Nice - The bug is present and you make a release candidate?
Aug 2007, PHP 5.2.4
02 Aug 2007, PHP 5.2.4RC1

Hopefully this is a joke..

If this will go to final i need a address to send a bill for changing
200 Host-Files on some servers!

Need to make for each one a session-directory and set it to
open_basedir or a stupid global configuration that allows scripts
reading of all session-files from other users too.

But what should we do with global error_log?
Give all Hosts access to the log-folder? NO - Never!



[2007-07-28 13:45:07] harry at rhsoft dot net

Is there any change?
The downloaded snapshot contains following in "news.txt"
Fixed session.save_path and error_log values to be checked against
open_basedir and safe_mode (CVE-2007-3378) 


If this change goes in php 5.2.4 final it will break many setups 
"session.save_path" and "error_log" set by admin in php.ini must not
checked against open_basedir 

If you have 100 virtual hosts with open_basedir for each per
 and the server is configured for one central errorlog and
one central session.save_path all hosts will crash.

You must check changig this in .htaccess/ini_set() against open_basedir
but not on the global configuration.

A script has not to look in the session-dir because in worst case it
can read ALL session-files and display the content - so open_basedir has
to block this and did it before the change.



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

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


#41847 [NEW]: open_basedir warning if a symlink does not exist

2007-06-28 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2007-06-29 (CVS)
PHP Bug Type: *General Issues
Bug description:  open_basedir warning if a symlink does not exist

Description:

You'll get a open_basedir related warning, if you try to access a 
symlink in open_basedir, but which points to a non-existent file:

PHP Warning:  file_exists(): open_basedir restriction in effect. 
File(symlink-exists-not) is not within the allowed path(s): 
(/tmp/open_basedir-symlinks)



Reproduce code:
---
$ ls -l
.
..
open_basedir-warning-if-symlink-does-not-exist.php
symlink-exists -> .
symlink-exists-not -> foo

$ php -d open_basedir=`pwd`
open_basedir-warning-if-symlink-does-not-exist.php

open_basedir-warning-if-symlink-does-not-exist.php:
---

---


Expected result:

bool(true)
bool(false)
bool(true)
bool(false)


Actual result:
--
bool(true)
PHP Warning:  file_exists(): open_basedir restriction in effect. 
File(symlink-exists-not) is not within the allowed path(s): 
(/tmp/open_basedir-symlinks) 
in
/tmp/open_basedir-symlinks/open_basedir-warning-if-symlink-does-not-exist.php

on line 3
bool(false)
bool(true)
bool(false)


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


#41677 [Com]: Cannot redeclare found after allowed memory exhausted

2007-06-15 Thread phpbugs at thequod dot de
 ID:   41677
 Comment by:   phpbugs at thequod dot de
 Reported By:  bobson at rpg dot pl
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Linux Gentoo
 PHP Version:  5.2.3
 New Comment:

Are you using an opcode cache like xcache, Zend Optimizer, 
eaccelerator, etc?


Previous Comments:


[2007-06-13 10:34:50] bobson at rpg dot pl

Description:

I provide this issue as php5.2.3 because it probaby can be noticed on
this version too (dont found bugfix in changelog).

My configuration is lighttpd + php (on FastCGI).
PHP from getnoo emerge (PHP 5.2.2-pl1-gentoo).

First apears:
PHP Fatal error:  Allowed memory size of 18874368 bytes exhausted
(tried to allocate 7881777 bytes) in
/var/www/sites/partner/deny/lib/new/global_session_handing.php on line
171
(yes, there was bug)

After that php start to show such message:
PHP Fatal error:  Cannot redeclare clearme() in
/var/www/sites/partner/index.php on line 6

clearme() is simple function with if's and unset() for unset some vars
if exists.

So... I move function clearme() a several line (still first in file).
PHP said:
PHP Fatal error:  Cannot redeclare clearme() (previously declared in
/var/www/sites/partner/index.php:7) in /var/www/sites/partner/index.php
on line 19
( line 19 is end "}" of clearme() )

Then I move other simple function to begin of file, PHP said:
PHP Fatal error:  Cannot redeclare translatebeforeregexping()
(previously declared in /var/www/sites/partner/index.php:23) in
/var/www/sites/partner/index.php on line 18

How "previously declared" line can be higher than declaration line? 

When I require_once() library used in problematic script to simple php
file - PHP shows:
Cannot redeclare h2_ajaxvarencode() in
/usr/local/share/php/wdgHarvest3_HA/harvest_addons.php on line 4
(this is first function in this lib)

Sorry for not attaching code of index.php - copyright issues :/

There is no self inclusions. Function is first declaration in file.
After lighttpd restart problem disappear (is this pointing to some kind
of  interpreter stack problem?). There is hard to makes case study code
reproducing this problem.







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


#41518 [Com]: file_exists() warns of open_basedir restriction on non-existent file

2007-05-31 Thread phpbugs at thequod dot de
 ID:   41518
 Comment by:   phpbugs at thequod dot de
 Reported By:  ruben dot willmes at emil2001 dot de
 Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Linux
 PHP Version:  5.2.2
 New Comment:

This might be related to bug #39123, where open_basedir=/tmp/ 
started to fail, as internally only "/tmp" (without trailing slash) 
got considered. (http://bugs.php.net/bug.php?id=39123)


Previous Comments:


[2007-05-31 12:40:31] ruben dot willmes at emil2001 dot de

Your example is correct, that does work, but what if you change the 
following:

Instead of 

#php -d open_basedir=/tmp -r 'var_dump(file_exists("/tmp/nosuch"));'

try

#php -d open_basedir=/tmp/ -r 'var_dump(file_exists("/tmp/nosuch"));'

Notice the slash behind "open_basedir=/tmp/". With that you get

Warning: file_exists(): open_basedir restriction in effect. File(/tmp/
nosuch) is not within the allowed path(s): (/tmp/) in Command line 
code on line 1
bool(false)



[2007-05-31 11:06:13] [EMAIL PROTECTED]

I don't think I get what you're talking about:
# ls -l /tmp/nosuch
ls: cannot access /tmp/nosuch: No such file or directory
#php -d open_basedir=/tmp -r 'var_dump(file_exists("/tmp/nosuch"));'
bool(false)

No warning whatsoever.



[2007-05-30 20:20:58] ruben dot willmes at emil2001 dot de

Sorry, but i have to reopen this bug again.

Thx for the reply, Tony, but i don't think you understood me. 

I don't want to generally remove this error message, it's just under 
your OWN open_basedir, where you shouldn't get this message since 
you should be able to check whether the file exists under your OWN 
open_basedir, or am i wrong?

Let's make an example:

Two users, user1 and user2, both locked in their homedirs with 
open_basedir:
/home/user1/
/home/user2/

Both have one file in their directory, let's call it test.php

Now, if user1 checks whether test.php exists, he get's a true, as 
well as user2. If user1 checks user2's test.php, he'll get a false 
and an open_basedir warning since he's out of his open_basedir. 
That's correct. 

But what if user1 checks a file called test2.php under his own 
directory, /home/user1/? Should he get an open_basedir error? In my 
eyes he should only get a 'false' as the file does not exist, but no 
open_basedir warning, since he's still in his own open_basedir.

In the recent PHP5 release (5.2.2) one get's an open_basedir warning 
if you check a non-existent file under your OWN open_basedir. In a 
previous release the message was not present (i think it was 5.2.0 
or 5.2.1).

so, please reconsider this bug



[2007-05-29 20:39:47] [EMAIL PROTECTED]

If we remove this warning for non-existent files, it could be possible
to use file_exists() to detect which files exists (since it's perfectly
legal to print this warning when the file exists).



[2007-05-29 06:58:06] ruben dot willmes at emil2001 dot de

You're right, it does work correctly if i set my open_basedir to
'/var/
www/localhost/htdocs' (without the trailing slash). But if i set it to

'/var/www/localhost/htdocs/' (with the trailing slash), it doesn't work

in my test case. Could you please try it once more setting your 
open_basedir to '/www/home/user/' (with the trailing slash)?

The system this is running on is PHP 5.2.2, with Apache 2.0.58.

thx in advance



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

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


#35752 [Com]: PHP_AUTH_USER and PHP_AUTH_PW not available when using FastCGI

2007-03-25 Thread phpbugs at thequod dot de
 ID:   35752
 Comment by:   phpbugs at thequod dot de
 Reported By:  fcu-phpbugs at no-way dot org
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  4.4.2RC1
 Assigned To:  dmitry
 New Comment:

Any progress on this one? It's still the case with PHP5-CVS.


Previous Comments:


[2006-11-30 03:47:22] phpbugs at thequod dot de

Hmm.. I'm dumb.
1. The above contains the user and password
2. I've forgotten to replace the patched php binary

But still, I'm wondering why "Authorization" gets passed 
from Apache to the fastcgi server (but that's no PHP 
problem and actually good).

(Would someone be so kind and "starify" the above 
user/password data?)

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

[2006-11-30 03:29:56] phpbugs at thequod dot de

Even with patching PHP to use "Authorization", it does not 
work.

I've added "-pass-header Authorization" to the 
FastCgiServer (mod_fastcgi) configuration and get the 
following:
_SERVER["Authorization"] => "Basic ZGFuaWVsOmxzZDQy"

But this gets ignored (as it seems) by 
php_handle_auth_data(), because there's no user in there.

I'm wondering though, why "Authorization" gets passed by 
Apache though, because SECURITY_HOLE_PASS_AUTHORIZATION 
does not seem to be defined and therefor "Authorization" 
should not be passed on to CGIs..?!

-
"Authorization" patch for PHP:
--- sapi/cgi/cgi_main.c 15 Nov 2006 13:33:41 -  
1.267.2.15.2.18
+++ sapi/cgi/cgi_main.c 30 Nov 2006 02:18:13 -
@@ -972,7 +972,7 @@
SG(request_info).content_length = 
(content_length ? atoi(content_length) : 0);

/* The CGI RFC allows servers to pass on 
unvalidated Authorization data */
-   auth = 
sapi_cgibin_getenv("HTTP_AUTHORIZATION", 
sizeof("HTTP_AUTHORIZATION")-1 TSRMLS_CC);
+   auth = sapi_cgibin_getenv("Authorization", 
sizeof("Authorization")-1 TSRMLS_CC);
php_handle_auth_data(auth TSRMLS_CC);
}
 }
-



[2006-01-02 16:20:41] [EMAIL PROTECTED]

Also this behaviour is seen in PHP 5.1.1 run under FastCGI.



[2005-12-20 22:28:30] fcu-phpbugs at no-way dot org

Description:

When using Apache's Basic Auth together with php in FastCGI Mode, the
credentials of the User do not get passed to the PHP Script.

When I configure FastCGI to pass the Authentication Headers
(-pass-header Authorization), these get passed to the script, but they
are ignored by PHP.

This is because in cgi_main.c only the Env-Var "HTTP_AUTHORIZATION"
gets checked and not "Authorization" which seems to be the correct
Header value (at least with apache2).

All the apache Handler correctly use that header to set the
Authentication Env-Vars.

Could the cgi handler also check for that header?






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


#40867 [Bgs]: open_basedir does not allow access to "/tmp" if "/tmp/" is in open_basedir list

2007-03-25 Thread phpbugs at thequod dot de
 ID:   40867
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Bogus
 Bug Type: Safe Mode/open_basedir
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2007-03-20 (CVS)
 New Comment:

..and directory "/tmp/" is in "/tmp"?


Previous Comments:


[2007-03-20 17:31:44] [EMAIL PROTECTED]

Yeah, directory /tmp is in /, not in /tmp/.



[2007-03-20 17:18:43] phpbugs at thequod dot de

Description:

If open_basedir is set to "/tmp/" and you do

you get a warning:
Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is 
not within the allowed path(s): (/tmp/) in ..

Bug 39123 "Default for "upload_tmp_dir" changed to "/tmp" 
(regression)" (http://bugs.php.net/39123) is related. Maybe the 
regression's root is here?

Has this behaviour changed in PHP5 (e.g. 5.1.x)?

btw: the reason for not having "/tmp" in the open_basedir setting is 
that it would allow access to all directories beginning with "tmp" 
in the root filesystem.

Reproduce code:
---
$ php -d open_basedir=/tmp/ -d error_reporting=E_ALL \
 -d display_errors=1 -r 'echo is_dir( "/tmp" ) ? 1 : 0;'


Expected result:

1

Actual result:
--
Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is 
not within the allowed path(s): (/tmp/) in Command line code on line 
1
0





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


#40867 [NEW]: open_basedir does not allow access to "/tmp" if "/tmp/" is in open_basedir list

2007-03-20 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2007-03-20 (CVS)
PHP Bug Type: Safe Mode/open_basedir
Bug description:  open_basedir does not allow access to "/tmp" if "/tmp/" is in 
open_basedir list

Description:

If open_basedir is set to "/tmp/" and you do

you get a warning:
Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is 
not within the allowed path(s): (/tmp/) in ..

Bug 39123 "Default for "upload_tmp_dir" changed to "/tmp" 
(regression)" (http://bugs.php.net/39123) is related. Maybe the 
regression's root is here?

Has this behaviour changed in PHP5 (e.g. 5.1.x)?

btw: the reason for not having "/tmp" in the open_basedir setting is 
that it would allow access to all directories beginning with "tmp" 
in the root filesystem.

Reproduce code:
---
$ php -d open_basedir=/tmp/ -d error_reporting=E_ALL \
 -d display_errors=1 -r 'echo is_dir( "/tmp" ) ? 1 : 0;'


Expected result:

1

Actual result:
--
Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is 
not within the allowed path(s): (/tmp/) in Command line code on line 
1
0

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


#40828 [Bgs->Opn]: Overloading: "Indirect modification" with "$this->foo[] = $x"

2007-03-20 Thread phpbugs at thequod dot de
 ID:   40828
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: Arrays related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2007-03-15 (CVS)
 New Comment:

Re-opening.


Previous Comments:


[2007-03-16 14:57:28] phpbugs at thequod dot de

>>Can't PHP internally do "$this->test = array()"?
>No, it can't do your job for you. You have to do it in the __get()
method.

1. It also won't work with
function &__get($name)
{
echo "__get() called.\n";
$r = array();
return $r;
}
2. It would not make sense to init any unknown/unhandled property 
as "array()" anyway
3. Your comment works, if you remove the "(array)" typecast in 
&__get() - it will cause "Only variable references should be 
returned by reference" otherwise
4. I'm not looking for support, but state that "$this->foo[]" is not 
supported in overloading - in contrast what you would expect

Please note that this is different from bug 40823, where _any_ 
property (which goes through __get()) gets handled as Foo::array!

What I want to work is:
Only handle some members as overloaded properties (e.g. $foo and 
$bar), but let all others work as intended - and that 
means "$A->foobar[]=" should work, just like "$foobar[]=" does.

Please make sure you really understand what the problem IMHO is 
here!

At least this should get closed as "Wont fix" and documented on 
http://php.net/manual/en/language.oop5.overloading.php.

See also 
http://php.net/manual/en/language.oop5.overloading.php#73512



[2007-03-15 19:45:15] [EMAIL PROTECTED]

Please, if you have any other _questions_ - ask them on a support
forum.



[2007-03-15 19:44:25] [EMAIL PROTECTED]

>as Tony stated in http://bugs.php.net/bug.php?id=40823 
>(the code in his comment does not work (anymore?)).
The code in my comment works perfectly fine.

>Can't PHP internally do "$this->test = array()"?
No, it can't do your job for you. You have to do it in the __get()
method.




[2007-03-15 19:35:49] phpbugs at thequod dot de

Description:

If a member of an object is not defined and "gets initialized" by 
PHP after/during the overloading process, a notice ("Indirect 
modification of overloaded property") gets triggered when PHP has to 
initialize it as an array type.

It makes no difference, if __get() returns by reference instead (a 
ref to a null value), as Tony stated in 
http://bugs.php.net/bug.php?id=40823 (the code in his comment does 
not work (anymore?)).


Background: we have a base class "Plugin" in our project and it uses 
__get() for some properties and returns null otherwise.
Now, if some user-created plugin does
$this->foo[] = 'bar'
it will create this notice - which is quite confusing (if the 
derived plugin does not "init" $foo with "var $foo").


Can't PHP internally do "$this->test = array()"?


(This may likely be a dupe of http://bugs.php.net/bug.php?id=39337 - 
but that one got quite confusing, so this one here may become 
a "reference bogus bug" for this issue at least.)

Reproduce code:
---
test[] = 'foo';
}
}

$A = new A();

?>


Expected result:

__get() called.


Actual result:
--
__get() called.

Notice: Indirect modification of overloaded property A::$test has no 
effect in foo.php on line 12






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


#40828 [Bgs]: Overloading: "Indirect modification" with "$this->foo[] = $x"

2007-03-16 Thread phpbugs at thequod dot de
 ID:   40828
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2007-03-15 (CVS)
 New Comment:

>>Can't PHP internally do "$this->test = array()"?
>No, it can't do your job for you. You have to do it in the __get()
method.

1. It also won't work with
function &__get($name)
{
echo "__get() called.\n";
$r = array();
return $r;
}
2. It would not make sense to init any unknown/unhandled property 
as "array()" anyway
3. Your comment works, if you remove the "(array)" typecast in 
&__get() - it will cause "Only variable references should be 
returned by reference" otherwise
4. I'm not looking for support, but state that "$this->foo[]" is not 
supported in overloading - in contrast what you would expect

Please note that this is different from bug 40823, where _any_ 
property (which goes through __get()) gets handled as Foo::array!

What I want to work is:
Only handle some members as overloaded properties (e.g. $foo and 
$bar), but let all others work as intended - and that 
means "$A->foobar[]=" should work, just like "$foobar[]=" does.

Please make sure you really understand what the problem IMHO is 
here!

At least this should get closed as "Wont fix" and documented on 
http://php.net/manual/en/language.oop5.overloading.php.

See also 
http://php.net/manual/en/language.oop5.overloading.php#73512


Previous Comments:


[2007-03-15 19:45:15] [EMAIL PROTECTED]

Please, if you have any other _questions_ - ask them on a support
forum.



[2007-03-15 19:44:25] [EMAIL PROTECTED]

>as Tony stated in http://bugs.php.net/bug.php?id=40823 
>(the code in his comment does not work (anymore?)).
The code in my comment works perfectly fine.

>Can't PHP internally do "$this->test = array()"?
No, it can't do your job for you. You have to do it in the __get()
method.




[2007-03-15 19:35:49] phpbugs at thequod dot de

Description:

If a member of an object is not defined and "gets initialized" by 
PHP after/during the overloading process, a notice ("Indirect 
modification of overloaded property") gets triggered when PHP has to 
initialize it as an array type.

It makes no difference, if __get() returns by reference instead (a 
ref to a null value), as Tony stated in 
http://bugs.php.net/bug.php?id=40823 (the code in his comment does 
not work (anymore?)).


Background: we have a base class "Plugin" in our project and it uses 
__get() for some properties and returns null otherwise.
Now, if some user-created plugin does
$this->foo[] = 'bar'
it will create this notice - which is quite confusing (if the 
derived plugin does not "init" $foo with "var $foo").


Can't PHP internally do "$this->test = array()"?


(This may likely be a dupe of http://bugs.php.net/bug.php?id=39337 - 
but that one got quite confusing, so this one here may become 
a "reference bogus bug" for this issue at least.)

Reproduce code:
---
test[] = 'foo';
}
}

$A = new A();

?>


Expected result:

__get() called.


Actual result:
--
__get() called.

Notice: Indirect modification of overloaded property A::$test has no 
effect in foo.php on line 12






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


#40828 [NEW]: Overloading: "Indirect modification" with "$this->foo[] = $x"

2007-03-15 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2007-03-15 (CVS)
PHP Bug Type: Arrays related
Bug description:  Overloading: "Indirect modification" with "$this->foo[] = $x"

Description:

If a member of an object is not defined and "gets initialized" by 
PHP after/during the overloading process, a notice ("Indirect 
modification of overloaded property") gets triggered when PHP has to 
initialize it as an array type.

It makes no difference, if __get() returns by reference instead (a 
ref to a null value), as Tony stated in 
http://bugs.php.net/bug.php?id=40823 (the code in his comment does 
not work (anymore?)).


Background: we have a base class "Plugin" in our project and it uses 
__get() for some properties and returns null otherwise.
Now, if some user-created plugin does
$this->foo[] = 'bar'
it will create this notice - which is quite confusing (if the 
derived plugin does not "init" $foo with "var $foo").


Can't PHP internally do "$this->test = array()"?


(This may likely be a dupe of http://bugs.php.net/bug.php?id=39337 - 
but that one got quite confusing, so this one here may become 
a "reference bogus bug" for this issue at least.)

Reproduce code:
---
test[] = 'foo';
}
}

$A = new A();

?>


Expected result:

__get() called.


Actual result:
--
__get() called.

Notice: Indirect modification of overloaded property A::$test has no 
effect in foo.php on line 12


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


#40632 [Opn]: setcookie() causes segfault or "zend_mm_heap corrupted"

2007-02-25 Thread phpbugs at thequod dot de
 ID:   40632
 User updated by:  phpbugs at thequod dot de
-Summary:  setcookie() with huge lifetime causes segfault or
   "zend_mm_heap corrupted"
 Reported By:      phpbugs at thequod dot de
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2007-02-25 (CVS)
 New Comment:

changed "Summary"


Previous Comments:


[2007-02-25 23:57:29] phpbugs at thequod dot de

This does not seem to be related to the lifetime alone 
(which is time()+10 years), but I can reproduce it with:
setcookie( 'foo', '33_9Bm6MWngjfF745MSCgoqREt3umW7ttC6', 
time() )
, too.

OTOH
setcookie( 'foo', 'bar', time() );
or
setcookie( 'foo', '33_9Bm6MWngjfF745MSCgoqREt3umW7ttC6' );
do not segfault.

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

[2007-02-25 23:46:34] phpbugs at thequod dot de

Description:

We use a quite huge cookie lifetime in our application 
(b2evolution) which causes a segmentation fault with 
current CVS.

When I rename the cookie name and value, it 
becomes "zend_mm_heap corrupted" instead.

Reproduce code:
---
# "zend_mm_heap corrupted":
setcookie( 'foo', 'bar', 1487806696, '/blogs/', '.b2cvs18.local' );

# "Segmentation fault":
setcookie( 'cookieb2evosession', '33_9Bm6MWngjfF745MSCgoqREt3umW7ttC6',
1487806696, '/blogs/', '.b2cvs18.local' );


Expected result:

Nothing.

Actual result:
--
zend_mm_heap corrupted

or

Segmentation fault





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


#40632 [Opn]: setcookie() with huge lifetime causes segfault or "zend_mm_heap corrupted"

2007-02-25 Thread phpbugs at thequod dot de
 ID:   40632
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2007-02-25 (CVS)
 New Comment:

This does not seem to be related to the lifetime alone 
(which is time()+10 years), but I can reproduce it with:
setcookie( 'foo', '33_9Bm6MWngjfF745MSCgoqREt3umW7ttC6', 
time() )
, too.

OTOH
setcookie( 'foo', 'bar', time() );
or
setcookie( 'foo', '33_9Bm6MWngjfF745MSCgoqREt3umW7ttC6' );
do not segfault.


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

[2007-02-25 23:46:34] phpbugs at thequod dot de

Description:

We use a quite huge cookie lifetime in our application 
(b2evolution) which causes a segmentation fault with 
current CVS.

When I rename the cookie name and value, it 
becomes "zend_mm_heap corrupted" instead.

Reproduce code:
---
# "zend_mm_heap corrupted":
setcookie( 'foo', 'bar', 1487806696, '/blogs/', '.b2cvs18.local' );

# "Segmentation fault":
setcookie( 'cookieb2evosession', '33_9Bm6MWngjfF745MSCgoqREt3umW7ttC6',
1487806696, '/blogs/', '.b2cvs18.local' );


Expected result:

Nothing.

Actual result:
--
zend_mm_heap corrupted

or

Segmentation fault





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


#40632 [NEW]: setcookie() with huge lifetime causes segfault or "zend_mm_heap corrupted"

2007-02-25 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2007-02-25 (CVS)
PHP Bug Type: Reproducible crash
Bug description:  setcookie() with huge lifetime causes segfault or 
"zend_mm_heap corrupted"

Description:

We use a quite huge cookie lifetime in our application 
(b2evolution) which causes a segmentation fault with 
current CVS.

When I rename the cookie name and value, it 
becomes "zend_mm_heap corrupted" instead.

Reproduce code:
---
# "zend_mm_heap corrupted":
setcookie( 'foo', 'bar', 1487806696, '/blogs/', '.b2cvs18.local' );

# "Segmentation fault":
setcookie( 'cookieb2evosession', '33_9Bm6MWngjfF745MSCgoqREt3umW7ttC6',
1487806696, '/blogs/', '.b2cvs18.local' );


Expected result:

Nothing.

Actual result:
--
zend_mm_heap corrupted

or

Segmentation fault

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


#40132 [Com]: Build error in ext/imap (U8T_CANONICAL def missing)

2007-01-19 Thread phpbugs at thequod dot de
 ID:   40132
 Comment by:   phpbugs at thequod dot de
 Reported By:  mathias dot lieber at web dot de
 Status:   Feedback
 Bug Type: *Compile Issues
 Operating System: Linux, 2.6.18, Ubuntu/Debian
 PHP Version:  5.2.0
 New Comment:

Works for me now. Thanks.


Previous Comments:


[2007-01-19 22:34:41] [EMAIL PROTECTED]

Check next snapshot @ snaps.php.net (in a couple of hours), it should
be fixed there.



[2007-01-19 21:46:18] [EMAIL PROTECTED]

/usr/include/c-client/nntp.h:64: error: syntax error before 'FILE'

What is the version of your imap package?
Where did you get it? Please put nntp.h online and paste the URL here.




[2007-01-19 21:34:28] phpbugs at thequod dot de

checking for U8T_CANONICAL... no
configure: error: utf8_mime2text() has new signature, but 
U8T_CANONICAL is missing. This should not happen. Check 
config.log for additional information.
I'll send you config.log.



[2007-01-19 17:47:46] [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





[2007-01-19 17:31:54] phpbugs at thequod dot de

I could still build PHP at Jan 14 2007 01:46:28.

Now I get the following error with current CVS:
/PHP_5_2/ext/imap/php_imap.c: In function 'zif_imap_utf8':
/PHP_5_2/ext/imap/php_imap.c:2212: error: 'U8T_CANONICAL' 
undeclared (first use in this function)

I have libc-client-dev 7:2002edebian1-13 installed on 
Ubuntu Dapper and U8T_CANONICAL is not defined 
in /usr/include/c-client/utf8.h. It's defined nowhere 
in /usr/include.



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

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


#40132 [Com]: Build error in ext/imap (U8T_CANONICAL def missing)

2007-01-19 Thread phpbugs at thequod dot de
 ID:   40132
 Comment by:   phpbugs at thequod dot de
 Reported By:  mathias dot lieber at web dot de
 Status:   Feedback
 Bug Type: *Compile Issues
 Operating System: Linux, 2.6.18, Ubuntu/Debian
 PHP Version:  5.2.0
 New Comment:

checking for U8T_CANONICAL... no
configure: error: utf8_mime2text() has new signature, but 
U8T_CANONICAL is missing. This should not happen. Check 
config.log for additional information.
I'll send you config.log.


Previous Comments:


[2007-01-19 17:47:46] [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





[2007-01-19 17:31:54] phpbugs at thequod dot de

I could still build PHP at Jan 14 2007 01:46:28.

Now I get the following error with current CVS:
/PHP_5_2/ext/imap/php_imap.c: In function 'zif_imap_utf8':
/PHP_5_2/ext/imap/php_imap.c:2212: error: 'U8T_CANONICAL' 
undeclared (first use in this function)

I have libc-client-dev 7:2002edebian1-13 installed on 
Ubuntu Dapper and U8T_CANONICAL is not defined 
in /usr/include/c-client/utf8.h. It's defined nowhere 
in /usr/include.



[2007-01-17 10:37:14] [EMAIL PROTECTED]

Make sure you've installed c-client properly and its headers define
U8T_CANONICAL constant.
Look for utf8.h in imap-2006+ it contains U8T_CANONICAL definition.




[2007-01-15 10:15:18] mathias dot lieber at web dot de

Description:

5.2.0 does not build because it's missing the definition of
"U8T_CANONICAL" in the imap extension. I tried both with
libc-client-dev package as well as with self-compiled
imapd.2006XXX.TAR.GZ.

Reproduce code:
---
./configure --with-gettext --with-imap --with-imap-ssl --with-zlib
--with-gd --with-mcrypt --with-openssl --with-xml --without-pear
--with-apxs2=/usr/local/apache2/bin/apxs --enable-memory-limit
--enable-track-vars --enable-wddx --enable-ftp --enable-gd-native-ttf
--enable-sysvmsg --enable-sysvem --enable-sysvshm --enable-transid
--disable-debug --disable-magic-quotes --with-mysql --enable-cli
--enable-cgi --with-ldap --with-kerberos
--with-mssql=/usr/local/freetds --enable-force-cgi-redirect

make



Actual result:
--
/bin/sh /usr/local/src/php-5.2.0/libtool --silent --preserve-dup-deps
--mode=compile gcc  -Iext/imap/ -I/usr/local/src/php-5.2.0/ext/imap/
-DPHP_ATOM_INC -I/usr/local/src/php-5.2.0/include
-I/usr/local/src/php-5.2.0/main -I/usr/local/src/php-5.2.0
-I/usr/include/libxml2 -I/usr/local/src/php-5.2.0/ext/date/lib
-I/usr/local/include -I/usr/local/src/php-5.2.0/ext/mbstring/oniguruma
-I/usr/local/src/php-5.2.0/ext/mbstring/libmbfl
-I/usr/local/src/php-5.2.0/ext/mbstring/libmbfl/mbfl
-I/usr/local/freetds/include -I/usr/include/mysql
-I/usr/local/src/php-5.2.0/TSRM -I/usr/local/src/php-5.2.0/Zend   
-I/usr/include -g -O2  -prefer-non-pic -c
/usr/local/src/php-5.2.0/ext/imap/php_imap.c -o ext/imap/php_imap.lo 
/usr/local/src/php-5.2.0/ext/imap/php_imap.c: In function
'zif_imap_utf8':
/usr/local/src/php-5.2.0/ext/imap/php_imap.c:2188: error:
'U8T_CANONICAL' undeclared (first use in this function)
/usr/local/src/php-5.2.0/ext/imap/php_imap.c:2188: error: (Each
undeclared identifier is reported only once
/usr/local/src/php-5.2.0/ext/imap/php_imap.c:2188: error: for each
function it appears in.)
make: *** [ext/imap/php_imap.lo] Error 1






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


#39123 [Bgs]: Default for "upload_tmp_dir" changed to "/tmp" (regression)

2007-01-19 Thread phpbugs at thequod dot de
 ID:   39123
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Bogus
 Bug Type: Safe Mode/open_basedir
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-10-11 (CVS)
 New Comment:

JFI: it seems to be the same with session.save_path.

Setting it explicitly to "/tmp/" helps here, too.


Previous Comments:


[2006-10-13 19:27:27] phpbugs at thequod dot de

And why is it so that:
 upload_tmp_dir=/tmp
 open_basedir=/tmp/
works, but
 open_basedir=/tmp/
does not?! (because of the trailing slash in the last 
example)

Additionally, I don't believe that upload_tmp_dir is set 
on most installs.



[2006-10-13 13:29:05] [EMAIL PROTECTED]

The error is that the "default" path is validated against 
open_basedir to address earlier tempnam() vulnerability 
allowing open_basedir bypass. 

The solution is either to: set upload_tmp_dir (which is the 
case on most installs) or to make sure that the default tmp 
dir is inside the open_basedir.



[2006-10-13 13:29:04] [EMAIL PROTECTED]

The error is that the "default" path is validated against 
open_basedir to address earlier tempnam() vulnerability 
allowing open_basedir bypass. 

The solution is either to: set upload_tmp_dir (which is the 
case on most installs) or to make sure that the default tmp 
dir is inside the open_basedir.

--------

[2006-10-13 11:27:26] phpbugs at thequod dot de

Yes, setting upload_tmp_dir explicitly does not cause the 
problem (anymore).

But still, because the default of upload_tmp_dir is empty, 
it should not bail out when detecting the upload_tmp_dir 
setting.

Manually setting upload_tmp_dir to "/tmp" (without 
trailing slash) allows uploading, but leaving it unset, 
errors out with:
"""
PHP Warning:  Unknown: open_basedir restriction in effect. 
File(/tmp) is not within the allowed path(s): (/X/:/tmp/) 
in Unknown on line 0
PHP Warning:  File upload error - unable to create a 
temporary file in Unknown on line 0
"""

To me it looks like the error gets triggered while 
determining the default upload_tmp_dir setting.

I consider setting "upload_tmp_dir" explicitly as a 
work-around currently, but it should not be necessary for 
upgrading to 5.2 IMHO.



[2006-10-13 02:21:22] [EMAIL PROTECTED]

Make sure your upload_tmp_dir is set and then it'll work.



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

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



#40132 [Com]: Build error in ext/imap (U8T_CANONICAL def missing)

2007-01-19 Thread phpbugs at thequod dot de
 ID:   40132
 Comment by:   phpbugs at thequod dot de
 Reported By:  mathias dot lieber at web dot de
 Status:   Feedback
 Bug Type: *Compile Issues
 Operating System: Linux, 2.6.18, Ubuntu/Debian
 PHP Version:  5.2.0
 New Comment:

I could still build PHP at Jan 14 2007 01:46:28.

Now I get the following error with current CVS:
/PHP_5_2/ext/imap/php_imap.c: In function 'zif_imap_utf8':
/PHP_5_2/ext/imap/php_imap.c:2212: error: 'U8T_CANONICAL' 
undeclared (first use in this function)

I have libc-client-dev 7:2002edebian1-13 installed on 
Ubuntu Dapper and U8T_CANONICAL is not defined 
in /usr/include/c-client/utf8.h. It's defined nowhere 
in /usr/include.


Previous Comments:


[2007-01-17 10:37:14] [EMAIL PROTECTED]

Make sure you've installed c-client properly and its headers define
U8T_CANONICAL constant.
Look for utf8.h in imap-2006+ it contains U8T_CANONICAL definition.




[2007-01-15 10:15:18] mathias dot lieber at web dot de

Description:

5.2.0 does not build because it's missing the definition of
"U8T_CANONICAL" in the imap extension. I tried both with
libc-client-dev package as well as with self-compiled
imapd.2006XXX.TAR.GZ.

Reproduce code:
---
./configure --with-gettext --with-imap --with-imap-ssl --with-zlib
--with-gd --with-mcrypt --with-openssl --with-xml --without-pear
--with-apxs2=/usr/local/apache2/bin/apxs --enable-memory-limit
--enable-track-vars --enable-wddx --enable-ftp --enable-gd-native-ttf
--enable-sysvmsg --enable-sysvem --enable-sysvshm --enable-transid
--disable-debug --disable-magic-quotes --with-mysql --enable-cli
--enable-cgi --with-ldap --with-kerberos
--with-mssql=/usr/local/freetds --enable-force-cgi-redirect

make



Actual result:
--
/bin/sh /usr/local/src/php-5.2.0/libtool --silent --preserve-dup-deps
--mode=compile gcc  -Iext/imap/ -I/usr/local/src/php-5.2.0/ext/imap/
-DPHP_ATOM_INC -I/usr/local/src/php-5.2.0/include
-I/usr/local/src/php-5.2.0/main -I/usr/local/src/php-5.2.0
-I/usr/include/libxml2 -I/usr/local/src/php-5.2.0/ext/date/lib
-I/usr/local/include -I/usr/local/src/php-5.2.0/ext/mbstring/oniguruma
-I/usr/local/src/php-5.2.0/ext/mbstring/libmbfl
-I/usr/local/src/php-5.2.0/ext/mbstring/libmbfl/mbfl
-I/usr/local/freetds/include -I/usr/include/mysql
-I/usr/local/src/php-5.2.0/TSRM -I/usr/local/src/php-5.2.0/Zend   
-I/usr/include -g -O2  -prefer-non-pic -c
/usr/local/src/php-5.2.0/ext/imap/php_imap.c -o ext/imap/php_imap.lo 
/usr/local/src/php-5.2.0/ext/imap/php_imap.c: In function
'zif_imap_utf8':
/usr/local/src/php-5.2.0/ext/imap/php_imap.c:2188: error:
'U8T_CANONICAL' undeclared (first use in this function)
/usr/local/src/php-5.2.0/ext/imap/php_imap.c:2188: error: (Each
undeclared identifier is reported only once
/usr/local/src/php-5.2.0/ext/imap/php_imap.c:2188: error: for each
function it appears in.)
make: *** [ext/imap/php_imap.lo] Error 1






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


#39337 [Bgs]: Array creation when using overloading (__get) does not work (NULL)

2007-01-17 Thread phpbugs at thequod dot de
 ID:   39337
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-01 (CVS)
 New Comment:

I cannot believe that I've not seen the Notice before, but 
now I do. Sorry.


Previous Comments:


[2007-01-17 21:02:28] [EMAIL PROTECTED]

Ilia is talking about this warning:
Notice: Indirect modification of overloaded property A::$foo has no
effect



[2007-01-14 05:26:37] phpbugs at thequod dot de

ilia, which warning are you talking about? There's no 
(PHP) warning?!

All I want to say is: overloading of arrays by 
e.g. "$Foo->bar[] = 1" does not work, if $bar is not 
defined as a member in the class definition (without a 
value, of course).



[2007-01-07 21:57:20] [EMAIL PROTECTED]

foo property is not actually created, hence the warning.



[2007-01-07 19:31:07] phpbugs at thequod dot de

iliaa, thanks for taking the time to look at this.

Unfortunately I don't understand your note. A::$foo is 
overloaded in class B and there it shows the IMHO correct 
behaviour (because in class B there's "var $foo").

The expected result in the last code example would have 
been:
A: 
array(1) {
  [0]=>
  int(1)
}
B: 
array(1) {
  [0]=>
  int(1)
}

instead of:

A: 
array(0) {
}
B: 
array(1) {
  [0]=>
  int(1)
}



[2007-01-07 04:10:47] [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

Notice: Indirect modification of overloaded property A::$foo 
has no effect.

This is why the assignment has no effect.



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

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


#39337 [Bgs->Opn]: Array creation when using overloading (__get) does not work (NULL)

2007-01-13 Thread phpbugs at thequod dot de
 ID:   39337
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: Arrays related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-01 (CVS)
 New Comment:

ilia, which warning are you talking about? There's no 
(PHP) warning?!

All I want to say is: overloading of arrays by 
e.g. "$Foo->bar[] = 1" does not work, if $bar is not 
defined as a member in the class definition (without a 
value, of course).


Previous Comments:


[2007-01-07 21:57:20] [EMAIL PROTECTED]

foo property is not actually created, hence the warning.



[2007-01-07 19:31:07] phpbugs at thequod dot de

iliaa, thanks for taking the time to look at this.

Unfortunately I don't understand your note. A::$foo is 
overloaded in class B and there it shows the IMHO correct 
behaviour (because in class B there's "var $foo").

The expected result in the last code example would have 
been:
A: 
array(1) {
  [0]=>
  int(1)
}
B: 
array(1) {
  [0]=>
  int(1)
}

instead of:

A: 
array(0) {
}
B: 
array(1) {
  [0]=>
  int(1)
}



[2007-01-07 04:10:47] [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

Notice: Indirect modification of overloaded property A::$foo 
has no effect.

This is why the assignment has no effect.

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

[2006-11-09 19:01:54] phpbugs at thequod dot de

Re: I've also said it before.. it works, if the var is set 
in the constructor. To see the diff:


vars[$v]) )
return $this->vars[$v];
return array();
}

function __set($v, $vv)
{
echo "__set: '$v'\n";
var_dump($vv);
$this->vars[$v] = $vv;
}
}

class B extends A
{
var $foo;
}


$A = new A();
$B = new B();

echo "A: \n";
$A->foo[] = 1;
var_dump( $A->foo );

echo "B: \n";
$B->foo[] = 1;
var_dump( $B->foo );
?>
---

Result:
---
A: 
array(0) {
}
B: 
array(1) {
  [0]=>
  int(1)
}

--------

[2006-11-09 18:41:22] phpbugs at thequod dot de

Ok. I've even slept over it.

Why should this not work?

-
var) )
return $this->var;
return array();
}
}


$A = new A();

$A->foo[] = 1;
var_dump( $A->foo );
?>
-

It prints:
array(0) {
}

Your comment, which I've reread carefully, does not 
explain it. The temp var from __get() is first array and 
later the $var itself.

Adding a __set() method to the class shows that this does 
not get called at all.



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

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


#39337 [Bgs->Opn]: Array creation when using overloading (__get) does not work (NULL)

2007-01-07 Thread phpbugs at thequod dot de
 ID:   39337
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: Arrays related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-01 (CVS)
 New Comment:

iliaa, thanks for taking the time to look at this.

Unfortunately I don't understand your note. A::$foo is 
overloaded in class B and there it shows the IMHO correct 
behaviour (because in class B there's "var $foo").

The expected result in the last code example would have 
been:
A: 
array(1) {
  [0]=>
  int(1)
}
B: 
array(1) {
  [0]=>
  int(1)
}

instead of:

A: 
array(0) {
}
B: 
array(1) {
  [0]=>
  int(1)
}


Previous Comments:


[2007-01-07 04:10:47] [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

Notice: Indirect modification of overloaded property A::$foo 
has no effect.

This is why the assignment has no effect.

----

[2006-11-09 19:01:54] phpbugs at thequod dot de

Re: I've also said it before.. it works, if the var is set 
in the constructor. To see the diff:


vars[$v]) )
return $this->vars[$v];
return array();
}

function __set($v, $vv)
{
echo "__set: '$v'\n";
var_dump($vv);
$this->vars[$v] = $vv;
}
}

class B extends A
{
var $foo;
}


$A = new A();
$B = new B();

echo "A: \n";
$A->foo[] = 1;
var_dump( $A->foo );

echo "B: \n";
$B->foo[] = 1;
var_dump( $B->foo );
?>
---

Result:
---
A: 
array(0) {
}
B: 
array(1) {
  [0]=>
  int(1)
}

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

[2006-11-09 18:41:22] phpbugs at thequod dot de

Ok. I've even slept over it.

Why should this not work?

-
var) )
return $this->var;
return array();
}
}


$A = new A();

$A->foo[] = 1;
var_dump( $A->foo );
?>
-

It prints:
array(0) {
}

Your comment, which I've reread carefully, does not 
explain it. The temp var from __get() is first array and 
later the $var itself.

Adding a __set() method to the class shows that this does 
not get called at all.



[2006-11-09 00:30:50] [EMAIL PROTECTED]

I've already explained everything, just read my previous comment
carefully.



[2006-11-09 00:22:16] phpbugs at thequod dot de

Sorry, to reopen it again.

The "Reproduce code" in the comment above was wrong.

I've let it return "array()" always and this changes the 
output, so that it is "array()" instead of "NULL".

But still: the array does not get changed!

I've written a comment for Bug 39426, which seems to 
suffer from something related, but cannot post it, because 
it's bogus.. :/



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

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


#35752 [Com]: PHP_AUTH_USER and PHP_AUTH_PW not available when using FastCGI

2006-11-30 Thread phpbugs at thequod dot de
 ID:   35752
 Comment by:   phpbugs at thequod dot de
 Reported By:  fcu-phpbugs at no-way dot org
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  4.4.2RC1
 Assigned To:  dmitry
 New Comment:

Even with patching PHP to use "Authorization", it does not 
work.

I've added "-pass-header Authorization" to the 
FastCgiServer (mod_fastcgi) configuration and get the 
following:
_SERVER["Authorization"] => "Basic ZGFuaWVsOmxzZDQy"

But this gets ignored (as it seems) by 
php_handle_auth_data(), because there's no user in there.

I'm wondering though, why "Authorization" gets passed by 
Apache though, because SECURITY_HOLE_PASS_AUTHORIZATION 
does not seem to be defined and therefor "Authorization" 
should not be passed on to CGIs..?!

-
"Authorization" patch for PHP:
--- sapi/cgi/cgi_main.c 15 Nov 2006 13:33:41 -  
1.267.2.15.2.18
+++ sapi/cgi/cgi_main.c 30 Nov 2006 02:18:13 -
@@ -972,7 +972,7 @@
SG(request_info).content_length = 
(content_length ? atoi(content_length) : 0);

/* The CGI RFC allows servers to pass on 
unvalidated Authorization data */
-   auth = 
sapi_cgibin_getenv("HTTP_AUTHORIZATION", 
sizeof("HTTP_AUTHORIZATION")-1 TSRMLS_CC);
+   auth = sapi_cgibin_getenv("Authorization", 
sizeof("Authorization")-1 TSRMLS_CC);
php_handle_auth_data(auth TSRMLS_CC);
}
 }
-


Previous Comments:


[2006-01-02 16:20:41] [EMAIL PROTECTED]

Also this behaviour is seen in PHP 5.1.1 run under FastCGI.



[2005-12-20 22:28:30] fcu-phpbugs at no-way dot org

Description:

When using Apache's Basic Auth together with php in FastCGI Mode, the
credentials of the User do not get passed to the PHP Script.

When I configure FastCGI to pass the Authentication Headers
(-pass-header Authorization), these get passed to the script, but they
are ignored by PHP.

This is because in cgi_main.c only the Env-Var "HTTP_AUTHORIZATION"
gets checked and not "Authorization" which seems to be the correct
Header value (at least with apache2).

All the apache Handler correctly use that header to set the
Authentication Env-Vars.

Could the cgi handler also check for that header?






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


#35752 [Com]: PHP_AUTH_USER and PHP_AUTH_PW not available when using FastCGI

2006-11-29 Thread phpbugs at thequod dot de
 ID:   35752
 Comment by:   phpbugs at thequod dot de
 Reported By:  fcu-phpbugs at no-way dot org
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  4.4.2RC1
 Assigned To:  dmitry
 New Comment:

Hmm.. I'm dumb.
1. The above contains the user and password
2. I've forgotten to replace the patched php binary

But still, I'm wondering why "Authorization" gets passed 
from Apache to the fastcgi server (but that's no PHP 
problem and actually good).

(Would someone be so kind and "starify" the above 
user/password data?)


Previous Comments:
--------

[2006-11-30 03:29:56] phpbugs at thequod dot de

Even with patching PHP to use "Authorization", it does not 
work.

I've added "-pass-header Authorization" to the 
FastCgiServer (mod_fastcgi) configuration and get the 
following:
_SERVER["Authorization"] => "Basic ZGFuaWVsOmxzZDQy"

But this gets ignored (as it seems) by 
php_handle_auth_data(), because there's no user in there.

I'm wondering though, why "Authorization" gets passed by 
Apache though, because SECURITY_HOLE_PASS_AUTHORIZATION 
does not seem to be defined and therefor "Authorization" 
should not be passed on to CGIs..?!

-
"Authorization" patch for PHP:
--- sapi/cgi/cgi_main.c 15 Nov 2006 13:33:41 -  
1.267.2.15.2.18
+++ sapi/cgi/cgi_main.c 30 Nov 2006 02:18:13 -
@@ -972,7 +972,7 @@
SG(request_info).content_length = 
(content_length ? atoi(content_length) : 0);

/* The CGI RFC allows servers to pass on 
unvalidated Authorization data */
-   auth = 
sapi_cgibin_getenv("HTTP_AUTHORIZATION", 
sizeof("HTTP_AUTHORIZATION")-1 TSRMLS_CC);
+   auth = sapi_cgibin_getenv("Authorization", 
sizeof("Authorization")-1 TSRMLS_CC);
php_handle_auth_data(auth TSRMLS_CC);
}
 }
-



[2006-01-02 16:20:41] [EMAIL PROTECTED]

Also this behaviour is seen in PHP 5.1.1 run under FastCGI.



[2005-12-20 22:28:30] fcu-phpbugs at no-way dot org

Description:

When using Apache's Basic Auth together with php in FastCGI Mode, the
credentials of the User do not get passed to the PHP Script.

When I configure FastCGI to pass the Authentication Headers
(-pass-header Authorization), these get passed to the script, but they
are ignored by PHP.

This is because in cgi_main.c only the Env-Var "HTTP_AUTHORIZATION"
gets checked and not "Authorization" which seems to be the correct
Header value (at least with apache2).

All the apache Handler correctly use that header to set the
Authentication Env-Vars.

Could the cgi handler also check for that header?






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


#39438 [Com]: Memory leak PHP Fatal error: Out of memory

2006-11-29 Thread phpbugs at thequod dot de
 ID:   39438
 Comment by:   phpbugs at thequod dot de
 Reported By:  nikolas dot hagelstein at gmail dot com
 Status:   Assigned
 Bug Type: Unknown/Other Function
 Operating System: NETBSD 3.0.1 AMD64
 PHP Version:  5.2.0
 Assigned To:  dmitry
 New Comment:

I withdraw my previous comment, the RC3-build was 
without "--enable-memory-limit". Sorry.

I've found that
---

---
uses a lot more memory. I cannot say, if this is because 
of the more accurate memory manager reporting.

I'm surprised how much memory is needed for 100.000 "a"'s 
in an array..


$ php -f test2.php
9494860
[EMAIL PROTECTED] [stp:2] { ~/bugs/php/memoryusage }
$ php5 -f test2.php
6967216



$ php -v
PHP 5.2.1-dev (cli) (built: Nov 27 2006 03:16:44)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend 
Technologies

$ php5 -v
PHP 5.1.6 (cli) (built: Nov  2 2006 12:49:10)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend 
Technologies


Previous Comments:


[2006-11-29 15:35:50] samuel at dragonboricua dot net

I started receiving this error on my WordPress blog since I upgraded to
php 5.2.0 from 5.1.6, but seems that after a refresh it goes away
(running on FastCGI on Apache). Sometimes it requires a few refreshes
for it to go away, but it is never too constant.

--------

[2006-11-27 20:11:36] phpbugs at thequod dot de

Just for info: I've experienced memory usage bumping since 
somewhere after 5.2.0RC2 and current CVS.
(phpDocumentor needs more than 256M with 5.2.1-dev, but 
not with 5.2.0RC3-dev)



[2006-11-27 19:28:08] lmiranda at lumigo dot net

I had this problem with my forum, after some time it showed:

Fatal error: Out of memory (allocated 786432) (tried to allocate
1572864 bytes)

I tried to set memory_limit from 16M to 64M, and it didn't work.

I've downgraded to 5.1.6



[2006-11-27 12:40:24] nikolas dot hagelstein at gmail dot com

No workarounds atm i had to downgrade :|



[2006-11-27 10:45:39] stig at 8620 dot dk

Are there current any work arounds for this problem?
My host has upgraded to 5.2.0, so I'm stuck with this 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/39438

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


#39640 [Fbk->Opn]: Segfault with "Allowed memory size exhausted"

2006-11-27 Thread phpbugs at thequod dot de
 ID:   39640
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-26 (CVS)
 New Comment:

No debug build.

It does not happen always, only if the memory gets 
exhausted in line 8 ("$a = new stdClass;"), not if it gets 
exhausted in a line like "$a->foo = rand(1000, );".


Here's a backtrace from CLI:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1219950928 (LWP 535)]
_zend_mm_free_int (heap=0x85ff1d8, p=) at /usr/local/src/PHP_5_2/Zend/zend_alloc.c:1332
1332if 
(ZEND_MM_IS_FREE_BLOCK(next_block)) {
(gdb) bt
#0  _zend_mm_free_int (heap=0x85ff1d8, p=) at /usr/local/src/PHP_5_2/Zend/zend_alloc.c:1332
#1  0x08325073 in zend_object_std_dtor (object=0xb2352ff0) 
at /usr/local/src/PHP_5_2/Zend/zend_objects.c:45
#2  0x083250a2 in zend_objects_free_object_storage 
(object=0xb2352ff0) 
at /usr/local/src/PHP_5_2/Zend/zend_objects.c:122
#3  0x08327e6d in zend_objects_store_free_object_storage 
(objects=0x85fedc8) 
at /usr/local/src/PHP_5_2/Zend/zend_objects_API.c:89
#4  0x083035d1 in shutdown_executor () 
at /usr/local/src/PHP_5_2/Zend/zend_execute_API.c:299
#5  0x0830e3a3 in zend_deactivate () 
at /usr/local/src/PHP_5_2/Zend/zend.c:841
#6  0x082cf36c in php_request_shutdown (dummy=0x0) 
at /usr/local/src/PHP_5_2/main/main.c:1306
#7  0x0838482d in main (argc=2, argv=0xbfd22424) 
at /usr/local/src/PHP_5_2/sapi/cli/php_cli.c:1259


$ php -v
PHP 5.2.1-dev (cli) (built: Nov 27 2006 03:16:44)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend 
Technologies


Previous Comments:


[2006-11-27 21:33:26] [EMAIL PROTECTED]

Is your PHP build with --enable-debug? If it is on out-of-
memory error PHP dies with a segv.



[2006-11-27 20:15:46] phpbugs at thequod dot de

There's only a sqlite related fix, if I do "cvs diff"?!



[2006-11-27 09:52:03] [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-11-26 18:55:47] phpbugs at thequod dot de

Description:

If the memory limit gets exhausted in a line like:
$a = new stdClass;
PHP segfaults during shutdown.


Reproduce code:
---
foo = rand(1000, );
$a->bar = rand(1000, );
$o->a[$i] = $a;
}
?>

Expected result:

No segmentation fault.

Actual result:
--
Fatal error: Allowed memory size of 16777216 bytes 
exhausted (tried to allocate 40 bytes) 
in /X/memory_usage1.php on line 8

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218541376 (LWP 549)]
_zend_mm_free_int (heap=0x8606160, p=0x860624c) 
at /PHP_5_2/Zend/zend_alloc.c:1332
1332/PHP_5_2/Zend/zend_alloc.c: No such file or 
directory.
in /PHP_5_2/Zend/zend_alloc.c
(gdb) bt
#0  _zend_mm_free_int (heap=0x8606160, p=0x860624c) 
at /PHP_5_2/Zend/zend_alloc.c:1332
#1  0x0831a5e2 in zend_object_std_dtor (object=0xb6586ff0) 
at /PHP_5_2/Zend/zend_objects.c:45
#2  0x0831a60a in zend_objects_free_object_storage 
(object=0xb6586ff0) at /PHP_5_2/Zend/zend_objects.c:122
#3  0x0831d4ef in zend_objects_store_free_object_storage 
(objects=0x8605988) at /PHP_5_2/Zend/zend_objects_API.c:89
#4  0x082f9b75 in shutdown_executor () 
at /PHP_5_2/Zend/zend_execute_API.c:299
#5  0x08304cf4 in zend_deactivate () 
at /PHP_5_2/Zend/zend.c:841
#6  0x082c9290 in php_request_shutdown (dummy=0x0) 
at /PHP_5_2/main/main.c:1306
#7  0x083882ad in main (argc=3, argv=0xbf8aef94) 
at /PHP_5_2/sapi/cgi/cgi_main.c:1792






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


#39640 [Fbk->Opn]: Segfault with "Allowed memory size exhausted"

2006-11-27 Thread phpbugs at thequod dot de
 ID:   39640
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-26 (CVS)
 New Comment:

There's only a sqlite related fix, if I do "cvs diff"?!


Previous Comments:


[2006-11-27 09:52:03] [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-11-26 18:55:47] phpbugs at thequod dot de

Description:

If the memory limit gets exhausted in a line like:
$a = new stdClass;
PHP segfaults during shutdown.


Reproduce code:
---
foo = rand(1000, );
$a->bar = rand(1000, );
$o->a[$i] = $a;
}
?>

Expected result:

No segmentation fault.

Actual result:
--
Fatal error: Allowed memory size of 16777216 bytes 
exhausted (tried to allocate 40 bytes) 
in /X/memory_usage1.php on line 8

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218541376 (LWP 549)]
_zend_mm_free_int (heap=0x8606160, p=0x860624c) 
at /PHP_5_2/Zend/zend_alloc.c:1332
1332/PHP_5_2/Zend/zend_alloc.c: No such file or 
directory.
in /PHP_5_2/Zend/zend_alloc.c
(gdb) bt
#0  _zend_mm_free_int (heap=0x8606160, p=0x860624c) 
at /PHP_5_2/Zend/zend_alloc.c:1332
#1  0x0831a5e2 in zend_object_std_dtor (object=0xb6586ff0) 
at /PHP_5_2/Zend/zend_objects.c:45
#2  0x0831a60a in zend_objects_free_object_storage 
(object=0xb6586ff0) at /PHP_5_2/Zend/zend_objects.c:122
#3  0x0831d4ef in zend_objects_store_free_object_storage 
(objects=0x8605988) at /PHP_5_2/Zend/zend_objects_API.c:89
#4  0x082f9b75 in shutdown_executor () 
at /PHP_5_2/Zend/zend_execute_API.c:299
#5  0x08304cf4 in zend_deactivate () 
at /PHP_5_2/Zend/zend.c:841
#6  0x082c9290 in php_request_shutdown (dummy=0x0) 
at /PHP_5_2/main/main.c:1306
#7  0x083882ad in main (argc=3, argv=0xbf8aef94) 
at /PHP_5_2/sapi/cgi/cgi_main.c:1792






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


#39438 [Com]: Memory leak PHP Fatal error: Out of memory

2006-11-27 Thread phpbugs at thequod dot de
 ID:   39438
 Comment by:   phpbugs at thequod dot de
 Reported By:  nikolas dot hagelstein at gmail dot com
 Status:   Assigned
 Bug Type: Unknown/Other Function
 Operating System: NETBSD 3.0.1 AMD64
 PHP Version:  5.2.0
 Assigned To:  dmitry
 New Comment:

Just for info: I've experienced memory usage bumping since 
somewhere after 5.2.0RC2 and current CVS.
(phpDocumentor needs more than 256M with 5.2.1-dev, but 
not with 5.2.0RC3-dev)


Previous Comments:


[2006-11-27 19:28:08] lmiranda at lumigo dot net

I had this problem with my forum, after some time it showed:

Fatal error: Out of memory (allocated 786432) (tried to allocate
1572864 bytes)

I tried to set memory_limit from 16M to 64M, and it didn't work.

I've downgraded to 5.1.6



[2006-11-27 12:40:24] nikolas dot hagelstein at gmail dot com

No workarounds atm i had to downgrade :|



[2006-11-27 10:45:39] stig at 8620 dot dk

Are there current any work arounds for this problem?
My host has upgraded to 5.2.0, so I'm stuck with this problem.



[2006-11-08 21:56:24] nikolas dot hagelstein at gmail dot com

Did some further testing:
the script worked on:
PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:8mb
PHP 5.1.6-5 (cli) (built: Oct 28 2006 13:49:33) Memlimit:64MB



[2006-11-08 21:40:32] nikolas dot hagelstein at gmail dot com

 array(
'downloadcounter' => 2777,
'versions' => array(
'0.1.0' => array (
'title' => 'A1 Teasermenu',
'description' => 'Displays a teaser for advanced subpages
or a selection of advanced pages',
'state' => 'stable',
'reviewstate' => 0,
'category' => 'plugin',
'downloadcounter' => 2787,
'lastuploaddate' => 1088427240,
'dependencies' => array (
  'depends' => array(
  'typo3' =>'', 
  'php' =>'', 
  'cms' => ''
   ),   
  'conflicts' => array('' =>'') 
),  
'authorname' => 'Mirko Balluff',
'authoremail' => '[EMAIL PROTECTED]',
'ownerusername' => 'amt1',
't3xfilemd5' => '3a4ec198b6ea8d0bc2d69d9b7400398f',
)
)
)
);
$test=array();
while($i<1600) {
$test[]=$test2;
$i++;
}
$out=gzcompress(serialize($test));
?>

results in :
PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted at
/usr/pkgsrc/lang/php5/work/php-5.2.0/ext/standard/var.c:541 (tried to
allocate 1041720 bytes) in /var/www/www.chaosbutze.de/htdocs/test2.php
on line 37

while it works on php 5.1.6 and 4.
Having mem limit set to 64MB.

Setting mem limit to 128MB and increasing interations to 2260 also
causes the above mentioned error.



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

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


#39640 [NEW]: Segfault with "Allowed memory size exhausted"

2006-11-26 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2006-11-26 (CVS)
PHP Bug Type: Reproducible crash
Bug description:  Segfault with "Allowed memory size exhausted"

Description:

If the memory limit gets exhausted in a line like:
$a = new stdClass;
PHP segfaults during shutdown.


Reproduce code:
---
foo = rand(1000, );
$a->bar = rand(1000, );
$o->a[$i] = $a;
}
?>

Expected result:

No segmentation fault.

Actual result:
--
Fatal error: Allowed memory size of 16777216 bytes 
exhausted (tried to allocate 40 bytes) 
in /X/memory_usage1.php on line 8

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218541376 (LWP 549)]
_zend_mm_free_int (heap=0x8606160, p=0x860624c) 
at /PHP_5_2/Zend/zend_alloc.c:1332
1332/PHP_5_2/Zend/zend_alloc.c: No such file or 
directory.
in /PHP_5_2/Zend/zend_alloc.c
(gdb) bt
#0  _zend_mm_free_int (heap=0x8606160, p=0x860624c) 
at /PHP_5_2/Zend/zend_alloc.c:1332
#1  0x0831a5e2 in zend_object_std_dtor (object=0xb6586ff0) 
at /PHP_5_2/Zend/zend_objects.c:45
#2  0x0831a60a in zend_objects_free_object_storage 
(object=0xb6586ff0) at /PHP_5_2/Zend/zend_objects.c:122
#3  0x0831d4ef in zend_objects_store_free_object_storage 
(objects=0x8605988) at /PHP_5_2/Zend/zend_objects_API.c:89
#4  0x082f9b75 in shutdown_executor () 
at /PHP_5_2/Zend/zend_execute_API.c:299
#5  0x08304cf4 in zend_deactivate () 
at /PHP_5_2/Zend/zend.c:841
#6  0x082c9290 in php_request_shutdown (dummy=0x0) 
at /PHP_5_2/main/main.c:1306
#7  0x083882ad in main (argc=3, argv=0xbf8aef94) 
at /PHP_5_2/sapi/cgi/cgi_main.c:1792


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


#39337 [Opn]: Array creation when using overloading (__get) does not work (NULL)

2006-11-09 Thread phpbugs at thequod dot de
 ID:   39337
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: Arrays related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-01 (CVS)
 New Comment:

Re: I've also said it before.. it works, if the var is set 
in the constructor. To see the diff:


vars[$v]) )
return $this->vars[$v];
return array();
}

function __set($v, $vv)
{
echo "__set: '$v'\n";
var_dump($vv);
$this->vars[$v] = $vv;
}
}

class B extends A
{
var $foo;
}


$A = new A();
$B = new B();

echo "A: \n";
$A->foo[] = 1;
var_dump( $A->foo );

echo "B: \n";
$B->foo[] = 1;
var_dump( $B->foo );
?>
---

Result:
---
A: 
array(0) {
}
B: 
array(1) {
  [0]=>
  int(1)
}


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

[2006-11-09 18:41:22] phpbugs at thequod dot de

Ok. I've even slept over it.

Why should this not work?

-
var) )
return $this->var;
return array();
}
}


$A = new A();

$A->foo[] = 1;
var_dump( $A->foo );
?>
-

It prints:
array(0) {
}

Your comment, which I've reread carefully, does not 
explain it. The temp var from __get() is first array and 
later the $var itself.

Adding a __set() method to the class shows that this does 
not get called at all.



[2006-11-09 00:30:50] [EMAIL PROTECTED]

I've already explained everything, just read my previous comment
carefully.

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

[2006-11-09 00:22:16] phpbugs at thequod dot de

Sorry, to reopen it again.

The "Reproduce code" in the comment above was wrong.

I've let it return "array()" always and this changes the 
output, so that it is "array()" instead of "NULL".

But still: the array does not get changed!

I've written a comment for Bug 39426, which seems to 
suffer from something related, but cannot post it, because 
it's bogus.. :/



[2006-11-08 23:47:42] [EMAIL PROTECTED]

Yes, I did see the comment. 
The point is that with $A->foo[] = 1; you call __get() first, which
returns NULL and you modify this temporary variable. That happens
because we need to get the array itself to be able to add an element,
but to create a variable directly (like $A->foo = 1) this is not
needed.




[2006-11-08 23:18:36] phpbugs at thequod dot de

Ok. But haven't you seen the comment in __get()?

Here's another testcase, just returning an array now 
always and with further output, when __get() gets called:


Description:

When using "array creating syntax" (like $a[] or $a[1]), 
__get() does not seem to work correctly, IF the var has 
not been defined using the "var" key for the class.

Reproduce code:
---
foo[1] = 1;
var_dump( $A->foo );

$A->foo[] = 2;
var_dump( $A->foo );

$A->foo['a'] = 3;
var_dump( $A->foo );

$A->foo = array();
var_dump( $A->foo );

$A->foo = 1;
var_dump( $A->foo );

?>

Expected result:

__get: foo
array(1) {
  1 => 1
}
array(2) {
  1 => 1,
  2 => 2
}
array(0) {
  1 => 1,
  2 => 2,
  'a' => 3
}
array(0) {
}
int(1)


Actual result:
--
__get: foo
__get: foo
array(0) {
}
__get: foo
__get: foo
array(0) {
}
__get: foo
__get: foo
array(0) {
}
array(0) {
}
int(1)



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

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


#39337 [Bgs->Opn]: Array creation when using overloading (__get) does not work (NULL)

2006-11-09 Thread phpbugs at thequod dot de
 ID:   39337
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: Arrays related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-01 (CVS)
 New Comment:

Ok. I've even slept over it.

Why should this not work?

-
var) )
return $this->var;
return array();
}
}


$A = new A();

$A->foo[] = 1;
var_dump( $A->foo );
?>
-

It prints:
array(0) {
}

Your comment, which I've reread carefully, does not 
explain it. The temp var from __get() is first array and 
later the $var itself.

Adding a __set() method to the class shows that this does 
not get called at all.


Previous Comments:


[2006-11-09 00:30:50] [EMAIL PROTECTED]

I've already explained everything, just read my previous comment
carefully.

----

[2006-11-09 00:22:16] phpbugs at thequod dot de

Sorry, to reopen it again.

The "Reproduce code" in the comment above was wrong.

I've let it return "array()" always and this changes the 
output, so that it is "array()" instead of "NULL".

But still: the array does not get changed!

I've written a comment for Bug 39426, which seems to 
suffer from something related, but cannot post it, because 
it's bogus.. :/



[2006-11-08 23:47:42] [EMAIL PROTECTED]

Yes, I did see the comment. 
The point is that with $A->foo[] = 1; you call __get() first, which
returns NULL and you modify this temporary variable. That happens
because we need to get the array itself to be able to add an element,
but to create a variable directly (like $A->foo = 1) this is not
needed.


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

[2006-11-08 23:18:36] phpbugs at thequod dot de

Ok. But haven't you seen the comment in __get()?

Here's another testcase, just returning an array now 
always and with further output, when __get() gets called:


Description:

When using "array creating syntax" (like $a[] or $a[1]), 
__get() does not seem to work correctly, IF the var has 
not been defined using the "var" key for the class.

Reproduce code:
---
foo[1] = 1;
var_dump( $A->foo );

$A->foo[] = 2;
var_dump( $A->foo );

$A->foo['a'] = 3;
var_dump( $A->foo );

$A->foo = array();
var_dump( $A->foo );

$A->foo = 1;
var_dump( $A->foo );

?>

Expected result:

__get: foo
array(1) {
  1 => 1
}
array(2) {
  1 => 1,
  2 => 2
}
array(0) {
  1 => 1,
  2 => 2,
  'a' => 3
}
array(0) {
}
int(1)


Actual result:
--
__get: foo
__get: foo
array(0) {
}
__get: foo
__get: foo
array(0) {
}
__get: foo
__get: foo
array(0) {
}
array(0) {
}
int(1)



[2006-11-08 17:40:51] [EMAIL PROTECTED]

It's not in the manual, because it's obvious - your __get() method does
nothing, so you get nothing as the result.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/39337

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


#39337 [Bgs->Opn]: Array creation when using overloading (__get) does not work (NULL)

2006-11-08 Thread phpbugs at thequod dot de
 ID:   39337
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: Arrays related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-01 (CVS)
 New Comment:

Sorry, to reopen it again.

The "Reproduce code" in the comment above was wrong.

I've let it return "array()" always and this changes the 
output, so that it is "array()" instead of "NULL".

But still: the array does not get changed!

I've written a comment for Bug 39426, which seems to 
suffer from something related, but cannot post it, because 
it's bogus.. :/


Previous Comments:


[2006-11-08 23:47:42] [EMAIL PROTECTED]

Yes, I did see the comment. 
The point is that with $A->foo[] = 1; you call __get() first, which
returns NULL and you modify this temporary variable. That happens
because we need to get the array itself to be able to add an element,
but to create a variable directly (like $A->foo = 1) this is not
needed.


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

[2006-11-08 23:18:36] phpbugs at thequod dot de

Ok. But haven't you seen the comment in __get()?

Here's another testcase, just returning an array now 
always and with further output, when __get() gets called:


Description:

When using "array creating syntax" (like $a[] or $a[1]), 
__get() does not seem to work correctly, IF the var has 
not been defined using the "var" key for the class.

Reproduce code:
---
foo[1] = 1;
var_dump( $A->foo );

$A->foo[] = 2;
var_dump( $A->foo );

$A->foo['a'] = 3;
var_dump( $A->foo );

$A->foo = array();
var_dump( $A->foo );

$A->foo = 1;
var_dump( $A->foo );

?>

Expected result:

__get: foo
array(1) {
  1 => 1
}
array(2) {
  1 => 1,
  2 => 2
}
array(0) {
  1 => 1,
  2 => 2,
  'a' => 3
}
array(0) {
}
int(1)


Actual result:
--
__get: foo
__get: foo
array(0) {
}
__get: foo
__get: foo
array(0) {
}
__get: foo
__get: foo
array(0) {
}
array(0) {
}
int(1)



[2006-11-08 17:40:51] [EMAIL PROTECTED]

It's not in the manual, because it's obvious - your __get() method does
nothing, so you get nothing as the result.



[2006-11-08 17:30:53] phpbugs at thequod dot de

Sorry, it's not in the manual..

http://de.php.net/manual/en/language.oop5.overloading.php

Please re-classify as "documentation issue" at least, if you're sure
that it really is not a bug..



[2006-11-08 14:10: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





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

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


#39337 [Bgs->Opn]: Array creation when using overloading (__get) does not work (NULL)

2006-11-08 Thread phpbugs at thequod dot de
 ID:   39337
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: Arrays related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-01 (CVS)
 New Comment:

Ok. But haven't you seen the comment in __get()?

Here's another testcase, just returning an array now 
always and with further output, when __get() gets called:


Description:

When using "array creating syntax" (like $a[] or $a[1]), 
__get() does not seem to work correctly, IF the var has 
not been defined using the "var" key for the class.

Reproduce code:
---
foo[1] = 1;
var_dump( $A->foo );

$A->foo[] = 2;
var_dump( $A->foo );

$A->foo['a'] = 3;
var_dump( $A->foo );

$A->foo = array();
var_dump( $A->foo );

$A->foo = 1;
var_dump( $A->foo );

?>

Expected result:

__get: foo
array(1) {
  1 => 1
}
array(2) {
  1 => 1,
  2 => 2
}
array(0) {
  1 => 1,
  2 => 2,
  'a' => 3
}
array(0) {
}
int(1)


Actual result:
--
__get: foo
__get: foo
array(0) {
}
__get: foo
__get: foo
array(0) {
}
__get: foo
__get: foo
array(0) {
}
array(0) {
}
int(1)


Previous Comments:


[2006-11-08 17:40:51] [EMAIL PROTECTED]

It's not in the manual, because it's obvious - your __get() method does
nothing, so you get nothing as the result.

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

[2006-11-08 17:30:53] phpbugs at thequod dot de

Sorry, it's not in the manual..

http://de.php.net/manual/en/language.oop5.overloading.php

Please re-classify as "documentation issue" at least, if you're sure
that it really is not a bug..



[2006-11-08 14:10: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-11-01 18:56:44] phpbugs at thequod dot de

A better workaround is, of course, to just define the 
member with "var" in the class header.

But it's still a bug IMHO.



[2006-11-01 18:41:14] phpbugs at thequod dot de

Description:

Creating an array through $obj->a[] or $obj->a[$index] 
does not create an array, if you use overloading through 
the "__get()" method.

This happens with PHP_5_2 and 5.1.6 from Ubuntu, which 
I've also tested.

The workaround seems to be to initialize the member 
explicitly to "array()".

Reproduce code:
---
foo[1] = 1;
var_dump( $A->foo );

$A->foo[] = 2;
var_dump( $A->foo );

$A->foo['a'] = 3;
var_dump( $A->foo );

$A->foo = array();
var_dump( $A->foo );

$A->foo = 1;
var_dump( $A->foo );

?>

Expected result:

array(1) {
  [1]=>
  int(1)
}
array(2) {
  [1]=>
  int(1)
  [2]=>
  int(2)
}
array(3) {
  [1]=>
  int(1)
  [2]=>
  int(2)
  ["a"]=>
  int(3)
}
array(0) {
}
int(1)


Actual result:
--
NULL
NULL
NULL
array(0) {
}
int(1)






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


#39337 [Bgs->Opn]: Array creation when using overloading (__get) does not work (NULL)

2006-11-08 Thread phpbugs at thequod dot de
 ID:   39337
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: Arrays related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-01 (CVS)
 New Comment:

Sorry, it's not in the manual..

http://de.php.net/manual/en/language.oop5.overloading.php

Please re-classify as "documentation issue" at least, if you're sure
that it really is not a bug..


Previous Comments:


[2006-11-08 14:10: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-11-01 18:56:44] phpbugs at thequod dot de

A better workaround is, of course, to just define the 
member with "var" in the class header.

But it's still a bug IMHO.

--------

[2006-11-01 18:41:14] phpbugs at thequod dot de

Description:

Creating an array through $obj->a[] or $obj->a[$index] 
does not create an array, if you use overloading through 
the "__get()" method.

This happens with PHP_5_2 and 5.1.6 from Ubuntu, which 
I've also tested.

The workaround seems to be to initialize the member 
explicitly to "array()".

Reproduce code:
---
foo[1] = 1;
var_dump( $A->foo );

$A->foo[] = 2;
var_dump( $A->foo );

$A->foo['a'] = 3;
var_dump( $A->foo );

$A->foo = array();
var_dump( $A->foo );

$A->foo = 1;
var_dump( $A->foo );

?>

Expected result:

array(1) {
  [1]=>
  int(1)
}
array(2) {
  [1]=>
  int(1)
  [2]=>
  int(2)
}
array(3) {
  [1]=>
  int(1)
  [2]=>
  int(2)
  ["a"]=>
  int(3)
}
array(0) {
}
int(1)


Actual result:
--
NULL
NULL
NULL
array(0) {
}
int(1)






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


#39382 [Opn->Bgs]: "Undeclared entity error" with latin1 entities

2006-11-04 Thread phpbugs at thequod dot de
 ID:   39382
 User updated by:  phpbugs at thequod dot de
-Summary:  "Undeclared entity error"
 Reported By:      phpbugs at thequod dot de
-Status:   Open
+Status:   Bogus
 Bug Type: XML related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-04 (CVS)
 New Comment:

I'm closing it myself.
http://bugs.php.net/bug.php?id=15092 explains why it does 
not work.

Would be interested in why it works with PHP4 though..


Previous Comments:


[2006-11-04 20:31:15] phpbugs at thequod dot de

Description:

Using a regular entity like "®" throws a "Undeclared 
entity warning" error with xml_parse().

If this is bogus, please give a hint about what I'm doing 
wrong.
Is this maybe a libxml problem?

btw: it also fails with other DOCTYPEs or with a full 
html-head-body construct.

Reproduce code:
---

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
®';

$parser = xml_parser_create();
if (!xml_parse($parser, $xml))
{
echo xml_error_string(xml_get_error_code($parser)) . "\n";
}
xml_parser_free($parser);
?>


Expected result:

Nothing.

(as with PHP4)

Actual result:
--
Undeclared entity warning





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


#39382 [NEW]: "Undeclared entity error"

2006-11-04 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2006-11-04 (CVS)
PHP Bug Type: XML related
Bug description:  "Undeclared entity error"

Description:

Using a regular entity like "®" throws a "Undeclared 
entity warning" error with xml_parse().

If this is bogus, please give a hint about what I'm doing 
wrong.
Is this maybe a libxml problem?

btw: it also fails with other DOCTYPEs or with a full 
html-head-body construct.

Reproduce code:
---

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
®';

$parser = xml_parser_create();
if (!xml_parse($parser, $xml))
{
echo xml_error_string(xml_get_error_code($parser)) . "\n";
}
xml_parser_free($parser);
?>


Expected result:

Nothing.

(as with PHP4)

Actual result:
--
Undeclared entity warning

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


#39350 [Opn]: Segfault with implode("\n", array(false))

2006-11-02 Thread phpbugs at thequod dot de
 ID:   39350
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-02 (CVS)
 New Comment:

The crash can be reproduced "inline", by

$b = trim($b);

after the implode().


Previous Comments:


[2006-11-02 22:17:30] phpbugs at thequod dot de

Description:

When imploding/joining an array with only "false" in it, 
PHP segfaults (on shutdown?).

I've found this in a more complex use case, where it 
segfaulted during execution, but probably because of this 
root problem.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208198976 (LWP 4071)]
0x083dd4f0 in _zval_dtor_func (zvalue=0xb7ebd8ec, 
__zend_filename=0x868524c
"/usr/local/src/PHP_5_2/Zend/zend_variables.h", 
__zend_lineno=35) 
at /usr/local/src/PHP_5_2/Zend/zend_variables.c:35
35  
CHECK_ZVAL_STRING_REL(zvalue);
(gdb) bt
#0  0x083dd4f0 in _zval_dtor_func (zvalue=0xb7ebd8ec, 
__zend_filename=0x868524c
"/usr/local/src/PHP_5_2/Zend/zend_variables.h", 
__zend_lineno=35) 
at /usr/local/src/PHP_5_2/Zend/zend_variables.c:35
#1  0x083d02f8 in _zval_dtor (zvalue=0xb7ebd8ec, 
__zend_filename=0x86851e4
"/usr/local/src/PHP_5_2/Zend/zend_execute_API.c", 
__zend_lineno=414) 
at /usr/local/src/PHP_5_2/Zend/zend_variables.h:35
#2  0x083d04ba in _zval_ptr_dtor (zval_ptr=0xb7ebd92c, 
__zend_filename=0x8686238
"/usr/local/src/PHP_5_2/Zend/zend_variables.c", 
__zend_lineno=175) 
at /usr/local/src/PHP_5_2/Zend/zend_execute_API.c:414
#3  0x083dd92c in _zval_ptr_dtor_wrapper 
(zval_ptr=0xb7ebd92c) 
at /usr/local/src/PHP_5_2/Zend/zend_variables.c:175
#4  0x083eb689 in zend_hash_apply_deleter (ht=0x86e2bb0, 
p=0xb7ebd920) 
at /usr/local/src/PHP_5_2/Zend/zend_hash.c:606
#5  0x083eb80d in zend_hash_graceful_reverse_destroy 
(ht=0x86e2bb0) 
at /usr/local/src/PHP_5_2/Zend/zend_hash.c:641
#6  0x083cff2b in shutdown_executor () 
at /usr/local/src/PHP_5_2/Zend/zend_execute_API.c:239
#7  0x083df05a in zend_deactivate () 
at /usr/local/src/PHP_5_2/Zend/zend.c:840
#8  0x0838b2fc in php_request_shutdown (dummy=0x0) 
at /usr/local/src/PHP_5_2/main/main.c:1300
#9  0x0845807b in main (argc=3, argv=0xbf81bf24) 
at /usr/local/src/PHP_5_2/sapi/cli/php_cli.c:1259


Reproduce code:
---



Expected result:

string(0) ""
bar

(PHP 5.1.6)

Actual result:
--
string(0) ""
barSegmentation fault (core dumped)

(PHP_5_2)





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


#39350 [NEW]: Segfault with implode("\n", array(false))

2006-11-02 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2006-11-02 (CVS)
PHP Bug Type: Reproducible crash
Bug description:  Segfault with implode("\n", array(false))

Description:

When imploding/joining an array with only "false" in it, 
PHP segfaults (on shutdown?).

I've found this in a more complex use case, where it 
segfaulted during execution, but probably because of this 
root problem.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208198976 (LWP 4071)]
0x083dd4f0 in _zval_dtor_func (zvalue=0xb7ebd8ec, 
__zend_filename=0x868524c "/usr/local/src/PHP_5_2/Zend/zend_variables.h",

__zend_lineno=35) 
at /usr/local/src/PHP_5_2/Zend/zend_variables.c:35
35  
CHECK_ZVAL_STRING_REL(zvalue);
(gdb) bt
#0  0x083dd4f0 in _zval_dtor_func (zvalue=0xb7ebd8ec, 
__zend_filename=0x868524c "/usr/local/src/PHP_5_2/Zend/zend_variables.h",

__zend_lineno=35) 
at /usr/local/src/PHP_5_2/Zend/zend_variables.c:35
#1  0x083d02f8 in _zval_dtor (zvalue=0xb7ebd8ec, 
__zend_filename=0x86851e4
"/usr/local/src/PHP_5_2/Zend/zend_execute_API.c", 
__zend_lineno=414) 
at /usr/local/src/PHP_5_2/Zend/zend_variables.h:35
#2  0x083d04ba in _zval_ptr_dtor (zval_ptr=0xb7ebd92c, 
__zend_filename=0x8686238 "/usr/local/src/PHP_5_2/Zend/zend_variables.c",

__zend_lineno=175) 
at /usr/local/src/PHP_5_2/Zend/zend_execute_API.c:414
#3  0x083dd92c in _zval_ptr_dtor_wrapper 
(zval_ptr=0xb7ebd92c) 
at /usr/local/src/PHP_5_2/Zend/zend_variables.c:175
#4  0x083eb689 in zend_hash_apply_deleter (ht=0x86e2bb0, 
p=0xb7ebd920) 
at /usr/local/src/PHP_5_2/Zend/zend_hash.c:606
#5  0x083eb80d in zend_hash_graceful_reverse_destroy 
(ht=0x86e2bb0) 
at /usr/local/src/PHP_5_2/Zend/zend_hash.c:641
#6  0x083cff2b in shutdown_executor () 
at /usr/local/src/PHP_5_2/Zend/zend_execute_API.c:239
#7  0x083df05a in zend_deactivate () 
at /usr/local/src/PHP_5_2/Zend/zend.c:840
#8  0x0838b2fc in php_request_shutdown (dummy=0x0) 
at /usr/local/src/PHP_5_2/main/main.c:1300
#9  0x0845807b in main (argc=3, argv=0xbf81bf24) 
at /usr/local/src/PHP_5_2/sapi/cli/php_cli.c:1259


Reproduce code:
---



Expected result:

string(0) ""
bar

(PHP 5.1.6)

Actual result:
--
string(0) ""
barSegmentation fault (core dumped)

(PHP_5_2)

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


#39342 [Com]: is_writable function

2006-11-02 Thread phpbugs at thequod dot de
 ID:   39342
 Comment by:   phpbugs at thequod dot de
 Reported By:  visit2imran at gmail dot com
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: LInux
 PHP Version:  5.1.6
 New Comment:

Have you checked permissions on the file?
Probably, PHP is running with another user.


Previous Comments:


[2006-11-02 09:57:40] visit2imran at gmail dot com

Description:

Hello, 
Iam facing a strange problem, we have shifted our site to newserver. 
Earlier our code was 

if (is_writable($file_path_csv)) 
{ 
echo "Path=$file_path_csv"; 
} 

This was working fine 
now my code is not working..rather if is use 

if (!is_writable($file_path_csv)) 
{ 
echo "Path=$file_path_csv"; 
} 

it is working.. 
what could be the Problem? 

please help. 

Regards 






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


#39337 [Opn]: Array creation when using overloading (__get) does not work (NULL)

2006-11-01 Thread phpbugs at thequod dot de
 ID:   39337
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: Arrays related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-11-01 (CVS)
 New Comment:

A better workaround is, of course, to just define the 
member with "var" in the class header.

But it's still a bug IMHO.


Previous Comments:


[2006-11-01 18:41:14] phpbugs at thequod dot de

Description:

Creating an array through $obj->a[] or $obj->a[$index] 
does not create an array, if you use overloading through 
the "__get()" method.

This happens with PHP_5_2 and 5.1.6 from Ubuntu, which 
I've also tested.

The workaround seems to be to initialize the member 
explicitly to "array()".

Reproduce code:
---
foo[1] = 1;
var_dump( $A->foo );

$A->foo[] = 2;
var_dump( $A->foo );

$A->foo['a'] = 3;
var_dump( $A->foo );

$A->foo = array();
var_dump( $A->foo );

$A->foo = 1;
var_dump( $A->foo );

?>

Expected result:

array(1) {
  [1]=>
  int(1)
}
array(2) {
  [1]=>
  int(1)
  [2]=>
  int(2)
}
array(3) {
  [1]=>
  int(1)
  [2]=>
  int(2)
  ["a"]=>
  int(3)
}
array(0) {
}
int(1)


Actual result:
--
NULL
NULL
NULL
array(0) {
}
int(1)






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


#39337 [NEW]: Array creation when using overloading (__get) does not work (NULL)

2006-11-01 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2006-11-01 (CVS)
PHP Bug Type: Arrays related
Bug description:  Array creation when using overloading (__get) does not work 
(NULL)

Description:

Creating an array through $obj->a[] or $obj->a[$index] 
does not create an array, if you use overloading through 
the "__get()" method.

This happens with PHP_5_2 and 5.1.6 from Ubuntu, which 
I've also tested.

The workaround seems to be to initialize the member 
explicitly to "array()".

Reproduce code:
---
foo[1] = 1;
var_dump( $A->foo );

$A->foo[] = 2;
var_dump( $A->foo );

$A->foo['a'] = 3;
var_dump( $A->foo );

$A->foo = array();
var_dump( $A->foo );

$A->foo = 1;
var_dump( $A->foo );

?>

Expected result:

array(1) {
  [1]=>
  int(1)
}
array(2) {
  [1]=>
  int(1)
  [2]=>
  int(2)
}
array(3) {
  [1]=>
  int(1)
  [2]=>
  int(2)
  ["a"]=>
  int(3)
}
array(0) {
}
int(1)


Actual result:
--
NULL
NULL
NULL
array(0) {
}
int(1)


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


#39296 [Com]: is_readable is raising a warning when the file or dir is outside open_basedir

2006-10-29 Thread phpbugs at thequod dot de
 ID:   39296
 Comment by:   phpbugs at thequod dot de
 Reported By:  judas dot iscariote at gmail dot com
 Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Linux
 PHP Version:  5CVS-2006-10-29 (CVS)
 New Comment:

Has this changed since 5.1 or 4.x?


Previous Comments:


[2006-10-29 09:52:52] judas dot iscariote at gmail dot com

Description:

is_readable is raising and open_basedir warrning when the file/dir is
not in open_basedir.


this is not expected  or at least is not mentioned in the
documentation.


Reproduce code:
---
php  -d display_errors=1 -dopen_basedir=`pwd` -r
'var_dump(is_readable("/tmp"));'

Expected result:

a silent 

bool(false)

as stated on the documentation.



Actual result:
--
Warning: is_readable(): open_basedir restriction in effect. File(/tmp)
is not within the allowed path(s):
bool(false)







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


#39255 [Com]: foreach only shows last item

2006-10-26 Thread phpbugs at thequod dot de
 ID:   39255
 Comment by:   phpbugs at thequod dot de
 Reported By:  PK at KoffieHosting dot com
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: ISS 6.0
 PHP Version:  5.1.6
 New Comment:

Remove the ";" at the end of the foreach() line.

You have a foreach loop that does nothing and then the 
echo uses the last elements.

This should work:

foreach ($_POST['Boxes'] as $Key => $Value)
{
echo '['.$Key.'] => '.$Value;
}


Previous Comments:


[2006-10-25 15:04:25] PK at KoffieHosting dot com

I don't have enough rights on that machine (as it is not hosted with
us) to try that.



[2006-10-25 15:02:00] [EMAIL PROTECTED]

No need to upgrade the server, just put it in some other directory and
try it.



[2006-10-25 14:53:06] PK at KoffieHosting dot com

Unfortunately I can not upgrade that server.



[2006-10-25 14:49:49] [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-25 14:47:59] PK at KoffieHosting dot com

Description:

FastCGI (PHP5) on ISS 6.0: the foreach only shows the last item.

Reproduce code:
---
foreach ($_POST['Boxes'] as $Key => $Value);
{
echo '['.$Key.'] => '.$Value;
}

Note that this does work 100%:

while (list($What, $Amount) = each($_POST['Boxes']))
{
echo '['.$Key.'] => '.$Value;
}

Expected result:

 [4] => 0 
 [2] => 0 
 [3] => 1
 [6] => 0
 [1] => 0
 [5] => 0

Actual result:
--
 [5] => 0





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


#39123 [Bgs]: Default for "upload_tmp_dir" changed to "/tmp" (regression)

2006-10-13 Thread phpbugs at thequod dot de
 ID:   39123
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Bogus
 Bug Type: Safe Mode/open_basedir
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-10-11 (CVS)
 New Comment:

And why is it so that:
 upload_tmp_dir=/tmp
 open_basedir=/tmp/
works, but
 open_basedir=/tmp/
does not?! (because of the trailing slash in the last 
example)

Additionally, I don't believe that upload_tmp_dir is set 
on most installs.


Previous Comments:


[2006-10-13 13:29:05] [EMAIL PROTECTED]

The error is that the "default" path is validated against 
open_basedir to address earlier tempnam() vulnerability 
allowing open_basedir bypass. 

The solution is either to: set upload_tmp_dir (which is the 
case on most installs) or to make sure that the default tmp 
dir is inside the open_basedir.



[2006-10-13 13:29:04] [EMAIL PROTECTED]

The error is that the "default" path is validated against 
open_basedir to address earlier tempnam() vulnerability 
allowing open_basedir bypass. 

The solution is either to: set upload_tmp_dir (which is the 
case on most installs) or to make sure that the default tmp 
dir is inside the open_basedir.

----

[2006-10-13 11:27:26] phpbugs at thequod dot de

Yes, setting upload_tmp_dir explicitly does not cause the 
problem (anymore).

But still, because the default of upload_tmp_dir is empty, 
it should not bail out when detecting the upload_tmp_dir 
setting.

Manually setting upload_tmp_dir to "/tmp" (without 
trailing slash) allows uploading, but leaving it unset, 
errors out with:
"""
PHP Warning:  Unknown: open_basedir restriction in effect. 
File(/tmp) is not within the allowed path(s): (/X/:/tmp/) 
in Unknown on line 0
PHP Warning:  File upload error - unable to create a 
temporary file in Unknown on line 0
"""

To me it looks like the error gets triggered while 
determining the default upload_tmp_dir setting.

I consider setting "upload_tmp_dir" explicitly as a 
work-around currently, but it should not be necessary for 
upgrading to 5.2 IMHO.



[2006-10-13 02:21:22] [EMAIL PROTECTED]

Make sure your upload_tmp_dir is set and then it'll work.

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

[2006-10-12 15:28:12] phpbugs at thequod dot de

While at it, please reconsider also 
http://bugs.php.net/38934 and at least document since when 
then upload_tmp_dir is needed in open_basedir.



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

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


#39123 [Bgs->Opn]: Default for "upload_tmp_dir" changed to "/tmp" (regression)

2006-10-13 Thread phpbugs at thequod dot de
 ID:   39123
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-10-11 (CVS)
 New Comment:

Yes, setting upload_tmp_dir explicitly does not cause the 
problem (anymore).

But still, because the default of upload_tmp_dir is empty, 
it should not bail out when detecting the upload_tmp_dir 
setting.

Manually setting upload_tmp_dir to "/tmp" (without 
trailing slash) allows uploading, but leaving it unset, 
errors out with:
"""
PHP Warning:  Unknown: open_basedir restriction in effect. 
File(/tmp) is not within the allowed path(s): (/X/:/tmp/) 
in Unknown on line 0
PHP Warning:  File upload error - unable to create a 
temporary file in Unknown on line 0
"""

To me it looks like the error gets triggered while 
determining the default upload_tmp_dir setting.

I consider setting "upload_tmp_dir" explicitly as a 
work-around currently, but it should not be necessary for 
upgrading to 5.2 IMHO.


Previous Comments:


[2006-10-13 02:21:22] [EMAIL PROTECTED]

Make sure your upload_tmp_dir is set and then it'll work.

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

[2006-10-12 15:28:12] phpbugs at thequod dot de

While at it, please reconsider also 
http://bugs.php.net/38934 and at least document since when 
then upload_tmp_dir is needed in open_basedir.



[2006-10-12 04:05:26] judas dot iscariote at gmail dot com

Ilia :

Can u reconsider this ? this is a BC break, and Im sure gazillions or
webserver config files will break with this change.

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

[2006-10-12 02:26:56] phpbugs at thequod dot de

I've changed the summary.
Long version:
Default for "upload_tmp_dir" has changed from "/tmp/" 
to "/tmp" and uploads now fail with open_base_dir="/tmp/"!

This is a regression!

If I use "/tmp/" in open_base_dir, I expect it to also 
handle accesses to the "/tmp" directory itself!

(all apart the fact that it's ridiculous to manually have 
to add upload_tmp_dir to open_basedir for uploads to work)



[2006-10-11 23:31:40] [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

Standard process for validating open_basedir applies here.



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

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


#38934 [Csd]: move_uploaded_file() cannot read uploaded file outside of open_basedir

2006-10-13 Thread phpbugs at thequod dot de
 ID:   38934
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Closed
 Bug Type: Safe Mode/open_basedir
 Operating System: Ubuntu Linux
 PHP Version:  5.1.6
 New Comment:

It seems to have been fixed in CVS for PHP_5_2 and HEAD 
(but not PHP_5_1).
Seems like iliaa has just used the wrong text snippet when 
closing the bug.

Thank you!


Previous Comments:


[2006-10-13 01:44:46] [EMAIL PROTECTED]

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.





[2006-10-03 11:54:20] youza at post dot cz

See this bug -  http://bugs.php.net/bug.php?id=37236
not any response from PHP :-)))



[2006-10-02 20:03:38] phpbugs at thequod dot de

Since when? As far as I understood, you have expected it 
to work like this (when trying to reproduce it).

Also, from older bug reports, it had been fixed to work 
like this again.

Additionally, from a security perspective, it would open 
up the upload_tmp_dir for all processes sharing the same 
php.ini/upload_tmp_dir and you would have to manually set 
it for every vhost where you use open_basedir for to an 
own directory.

If it's supposed to stay a documentation problem, please 
emphasize it in the NEWS/upgrade docs, because as it is 
now (e.g. failing since 5.1.6), it will break all upload 
scripts for hosts that use open_basedir.

IMHO it should work just like expected: PHP should 
internally allow the temporary uploaded file to get stored 
in upload_tmp_dir and should allow move_uploaded_file() to 
move it - PHP should know that it has to make an exception 
here to the regular open_basedir restriction (and it 
seemed to have done so before).



[2006-10-02 09:28:17] [EMAIL PROTECTED]

Reclassified as docu problem.
upload_tmp_dir must be in open_basedir() to be readable/writable.



[2006-09-30 15:25:14] phpbugs at thequod dot de

Just tried it with PHP_5_2 (CVS), resulting in:
Warning: Unknown: open_basedir restriction in effect. 
File(/tmp) is not within the allowed path(s): (/var/www) 
in Unknown on line 0
 
 Warning: File upload error - unable to create a temporary 
file in Unknown on line 0


I've configured PHP just 
with "--with-apxs2=/usr/bin/apxs2" and use this simple 
php.ini file:
open_basedir = "/var"
display_errors=on
display_startup_errors=On
error_reporting=E_ALL



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

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


#39123 [Opn]: Default for "upload_tmp_dir" changed to "/tmp" (regression)

2006-10-12 Thread phpbugs at thequod dot de
 ID:   39123
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-10-11 (CVS)
 New Comment:

While at it, please reconsider also 
http://bugs.php.net/38934 and at least document since when 
then upload_tmp_dir is needed in open_basedir.


Previous Comments:


[2006-10-12 04:05:26] judas dot iscariote at gmail dot com

Ilia :

Can u reconsider this ? this is a BC break, and Im sure gazillions or
webserver config files will break with this change.



[2006-10-12 02:26:56] phpbugs at thequod dot de

I've changed the summary.
Long version:
Default for "upload_tmp_dir" has changed from "/tmp/" 
to "/tmp" and uploads now fail with open_base_dir="/tmp/"!

This is a regression!

If I use "/tmp/" in open_base_dir, I expect it to also 
handle accesses to the "/tmp" directory itself!

(all apart the fact that it's ridiculous to manually have 
to add upload_tmp_dir to open_basedir for uploads to work)



[2006-10-11 23:31:40] [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

Standard process for validating open_basedir applies here.

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

[2006-10-11 01:44:07] phpbugs at thequod dot de

Description:

I have no upload_tmp_dir set, so it seems to use "/tmp".

I have added "/tmp/" to open_basedir (despite the fact 
that this was not necessary before - see 
http://bugs.php.net/38934).

Upload in PHP_5_2 fails with:
[11-Oct-2006 03:26:35] PHP Warning:  Unknown: open_basedir 
restriction in effect. File(/tmp) is not within the 
allowed path(s): 
(/web7/:/var/www/web7/:/tmp/:/var/www/usr/local/share/php/:/usr/local/share/php/)

in Unknown on line 0
[11-Oct-2006 03:26:35] PHP Warning:  File upload error - 
unable to create a temporary file in Unknown on line 0

This is a regression to PHP_5_1, where it works like this!

Setting upload_tmp_dir=/tmp/ (with ending slash) fixes it 
also for PHP_5_2.

Reproduce code:
---
Any upload form, there are two in the other bug refered above.

Expected result:

Upload works.

Actual result:
--
Upload does not work.





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


#39123 [Bgs->Opn]: Default for "upload_tmp_dir" changed to "/tmp" (regression)

2006-10-11 Thread phpbugs at thequod dot de
 ID:   39123
 User updated by:  phpbugs at thequod dot de
-Summary:  upload_tmp_dir with trailing slash in open_basedir
   causes uploads to fail
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-10-11 (CVS)
 New Comment:

I've changed the summary.
Long version:
Default for "upload_tmp_dir" has changed from "/tmp/" 
to "/tmp" and uploads now fail with open_base_dir="/tmp/"!

This is a regression!

If I use "/tmp/" in open_base_dir, I expect it to also 
handle accesses to the "/tmp" directory itself!

(all apart the fact that it's ridiculous to manually have 
to add upload_tmp_dir to open_basedir for uploads to work)


Previous Comments:


[2006-10-11 23:31:40] [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

Standard process for validating open_basedir applies here.

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

[2006-10-11 01:44:07] phpbugs at thequod dot de

Description:

I have no upload_tmp_dir set, so it seems to use "/tmp".

I have added "/tmp/" to open_basedir (despite the fact 
that this was not necessary before - see 
http://bugs.php.net/38934).

Upload in PHP_5_2 fails with:
[11-Oct-2006 03:26:35] PHP Warning:  Unknown: open_basedir 
restriction in effect. File(/tmp) is not within the 
allowed path(s): 
(/web7/:/var/www/web7/:/tmp/:/var/www/usr/local/share/php/:/usr/local/share/php/)

in Unknown on line 0
[11-Oct-2006 03:26:35] PHP Warning:  File upload error - 
unable to create a temporary file in Unknown on line 0

This is a regression to PHP_5_1, where it works like this!

Setting upload_tmp_dir=/tmp/ (with ending slash) fixes it 
also for PHP_5_2.

Reproduce code:
---
Any upload form, there are two in the other bug refered above.

Expected result:

Upload works.

Actual result:
--
Upload does not work.





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


#39123 [NEW]: upload_tmp_dir with trailing slash in open_basedir causes uploads to fail

2006-10-10 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2006-10-11 (CVS)
PHP Bug Type: Safe Mode/open_basedir
Bug description:  upload_tmp_dir with trailing slash in open_basedir causes 
uploads to fail

Description:

I have no upload_tmp_dir set, so it seems to use "/tmp".

I have added "/tmp/" to open_basedir (despite the fact 
that this was not necessary before - see 
http://bugs.php.net/38934).

Upload in PHP_5_2 fails with:
[11-Oct-2006 03:26:35] PHP Warning:  Unknown: open_basedir 
restriction in effect. File(/tmp) is not within the 
allowed path(s): 
(/web7/:/var/www/web7/:/tmp/:/var/www/usr/local/share/php/:/usr/local/share/php/)

in Unknown on line 0
[11-Oct-2006 03:26:35] PHP Warning:  File upload error - 
unable to create a temporary file in Unknown on line 0

This is a regression to PHP_5_1, where it works like this!

Setting upload_tmp_dir=/tmp/ (with ending slash) fixes it 
also for PHP_5_2.

Reproduce code:
---
Any upload form, there are two in the other bug refered above.

Expected result:

Upload works.

Actual result:
--
Upload does not work.

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


#39004 [Fbk->Opn]: Configure Command './configure' 'dummy' 'grep' 'ggrep' !?

2006-10-02 Thread phpbugs at thequod dot de
 ID:   39004
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: *Compile Issues
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-09-30 (CVS)
 Assigned To:  iliaa
 New Comment:

I've noticed it in php.cvs, but this as before the patch.

config.nice looks ok:
"""
#! /bin/sh
#
# Created by configure

'./configure' \
'--enable-calendar' \
'--enable-exif' \
...
"""

But in phpinfo it does not:
Configure Command 
=>  '--enable-calendar' '--enable-exif' ...
(missing the "./configure" command itself)


Previous Comments:


[2006-10-02 19:53:48] [EMAIL PROTECTED]

Please try the next snapshot, I've applied one more fix.

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

[2006-10-02 19:33:25] phpbugs at thequod dot de

Not quite. There are now single quotes again, but the 
leading "./configure" is missing.

If this is the desired behaviour (different to 5.1 at 
least), then ok.



[2006-10-02 15:35:03] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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



--------

[2006-10-01 22:48:07] phpbugs at thequod dot de

Also the initial "./configure" command is missing in the 
output after applying the patch.



[2006-10-01 22:44:07] phpbugs at thequod dot de

Better. But now all arguments are encapsulated in two 
single quotes, while they were given in one single quote 
before, e.g.:
Configure Command 
=>  ''--enable-calendar'' ''--enable-exif'' ...



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

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


#39004 [Csd->Opn]: Configure Command './configure' 'dummy' 'grep' 'ggrep' !?

2006-10-02 Thread phpbugs at thequod dot de
 ID:   39004
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Closed
+Status:   Open
 Bug Type: *General Issues
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-09-30 (CVS)
 Assigned To:  iliaa
 New Comment:

Not quite. There are now single quotes again, but the 
leading "./configure" is missing.

If this is the desired behaviour (different to 5.1 at 
least), then ok.


Previous Comments:


[2006-10-02 15:35:03] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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





[2006-10-01 22:48:07] phpbugs at thequod dot de

Also the initial "./configure" command is missing in the 
output after applying the patch.



[2006-10-01 22:44:07] phpbugs at thequod dot de

Better. But now all arguments are encapsulated in two 
single quotes, while they were given in one single quote 
before, e.g.:
Configure Command 
=>  ''--enable-calendar'' ''--enable-exif'' ...



[2006-10-01 21:51:37] [EMAIL PROTECTED]

Try this patch and let me know if that fixes the problem
http://bb.prohost.org/patch/bug39004.txt

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

[2006-10-01 20:46:35] phpbugs at thequod dot de

2.60-1 (Debian/Ubuntu)



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

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


#39004 [Asn]: Configure Command './configure' 'dummy' 'grep' 'ggrep' !?

2006-10-01 Thread phpbugs at thequod dot de
 ID:   39004
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Assigned
 Bug Type: *General Issues
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-09-30 (CVS)
 Assigned To:  iliaa
 New Comment:

Also the initial "./configure" command is missing in the 
output after applying the patch.


Previous Comments:


[2006-10-01 22:44:07] phpbugs at thequod dot de

Better. But now all arguments are encapsulated in two 
single quotes, while they were given in one single quote 
before, e.g.:
Configure Command 
=>  ''--enable-calendar'' ''--enable-exif'' ...



[2006-10-01 21:51:37] [EMAIL PROTECTED]

Try this patch and let me know if that fixes the problem
http://bb.prohost.org/patch/bug39004.txt

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

[2006-10-01 20:46:35] phpbugs at thequod dot de

2.60-1 (Debian/Ubuntu)



[2006-10-01 20:37:35] [EMAIL PROTECTED]

What version of autoconf are you using?

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

[2006-09-30 14:50:02] phpbugs at thequod dot de

Description:

I've just configured PHP_5_2 through the following script 
(wrapper for configure) and now 
get "'./configure' 'dummy' 'grep' 'ggrep'" as 
the "Configure Command" in phpinfo().

Reproduce code:
---
#!/bin/bash

./configure \
--enable-calendar \
--enable-exif \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin \
--with-apxs2=/usr/bin/apxs2

make
make install
php -i | grep "Configure Command"

Expected result:

The configure line/options.

Actual result:
--
Configure Command =>  './configure' 'dummy' 'grep' 'ggrep'





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


#39004 [Asn]: Configure Command './configure' 'dummy' 'grep' 'ggrep' !?

2006-10-01 Thread phpbugs at thequod dot de
 ID:   39004
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Assigned
 Bug Type: *General Issues
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-09-30 (CVS)
 Assigned To:  iliaa
 New Comment:

Better. But now all arguments are encapsulated in two 
single quotes, while they were given in one single quote 
before, e.g.:
Configure Command 
=>  ''--enable-calendar'' ''--enable-exif'' ...


Previous Comments:


[2006-10-01 21:51:37] [EMAIL PROTECTED]

Try this patch and let me know if that fixes the problem
http://bb.prohost.org/patch/bug39004.txt

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

[2006-10-01 20:46:35] phpbugs at thequod dot de

2.60-1 (Debian/Ubuntu)



[2006-10-01 20:37:35] [EMAIL PROTECTED]

What version of autoconf are you using?

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

[2006-09-30 14:50:02] phpbugs at thequod dot de

Description:

I've just configured PHP_5_2 through the following script 
(wrapper for configure) and now 
get "'./configure' 'dummy' 'grep' 'ggrep'" as 
the "Configure Command" in phpinfo().

Reproduce code:
---
#!/bin/bash

./configure \
--enable-calendar \
--enable-exif \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin \
--with-apxs2=/usr/bin/apxs2

make
make install
php -i | grep "Configure Command"

Expected result:

The configure line/options.

Actual result:
--
Configure Command =>  './configure' 'dummy' 'grep' 'ggrep'





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


#39006 [Com]: PHP crashes at shutdown if browscap is on

2006-10-01 Thread phpbugs at thequod dot de
 ID:   39006
 Comment by:   phpbugs at thequod dot de
 Reported By:  alt2k4 at yandex dot ru
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: windows (xp sp2)
 PHP Version:  5.2.0RC4
 New Comment:

Have you tried reproducing it with a php.ini file where 
just browscap is defined?


Previous Comments:


[2006-10-01 09:05:30] alt2k4 at yandex dot ru

Description:

PHP crashes at shutdown if browscap file is specified(even if
get_browser() not used). (tested on CGI)

Reproduce code:
---
ANYTHING, browscap enabled

Expected result:

normal shutdown.

Actual result:
--
php crash.
(I am REALLY sorry if this is not php problem, but mine installation)





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


#39004 [Fbk->Opn]: Configure Command './configure' 'dummy' 'grep' 'ggrep' !?

2006-10-01 Thread phpbugs at thequod dot de
 ID:   39004
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-09-30 (CVS)
 New Comment:

2.60-1 (Debian/Ubuntu)


Previous Comments:


[2006-10-01 20:37:35] [EMAIL PROTECTED]

What version of autoconf are you using?



[2006-09-30 14:50:02] phpbugs at thequod dot de

Description:

I've just configured PHP_5_2 through the following script 
(wrapper for configure) and now 
get "'./configure' 'dummy' 'grep' 'ggrep'" as 
the "Configure Command" in phpinfo().

Reproduce code:
---
#!/bin/bash

./configure \
--enable-calendar \
--enable-exif \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin \
--with-apxs2=/usr/bin/apxs2

make
make install
php -i | grep "Configure Command"

Expected result:

The configure line/options.

Actual result:
--
Configure Command =>  './configure' 'dummy' 'grep' 'ggrep'





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


#38934 [Fbk->Opn]: move_uploaded_file() cannot read uploaded file outside of open_basedir

2006-09-30 Thread phpbugs at thequod dot de
 ID:   38934
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Ubuntu Linux
 PHP Version:  5.1.6
 New Comment:

Just tried it with PHP_5_2 (CVS), resulting in:
Warning: Unknown: open_basedir restriction in effect. 
File(/tmp) is not within the allowed path(s): (/var/www) 
in Unknown on line 0
 
 Warning: File upload error - unable to create a temporary 
file in Unknown on line 0


I've configured PHP just 
with "--with-apxs2=/usr/bin/apxs2" and use this simple 
php.ini file:
open_basedir = "/var"
display_errors=on
display_startup_errors=On
error_reporting=E_ALL


Previous Comments:


[2006-09-29 18:29:26] moron at industrial dot org

Sorry for the flurry.  In our case it turned out that the error message
was just misleading.  A simple permissions issue on the target directory
was the cause (arrgh) but the error message explicitly stated that the
problem was the open_basedir setting of the upload_tmp directory.  So
more of an annoyance than a show stopper in our case.



[2006-09-29 18:13:11] moron at industrial dot org

Sorry, forgot to note that in our case, "upload_tmp_dir" is explicitly
set.



[2006-09-29 18:12:05] moron at industrial dot org

Exact same behaviour with 4.4.4 under FreeBSD 6.1. 

Frustrating as this bug has appeared before.



[2006-09-25 12:54:21] [EMAIL PROTECTED]

Cannot reproduce with both 5.1.6 and latest CVS.
With upload_tmp_dir not set (aka "/tmp") and open_basedir="/www", I get
this: File is valid, and was successfully uploaded.



[2006-09-25 11:19:58] Bjorn dot Wiberg at its dot uu dot se

Same result on IBM AIX 5.2 ML8, although I'm using PHP 5.1.5 (no big
difference) and have "php_admin_value upload_tmp_dir none" set (so it
defaults to /tmp).

---8<---
Warning: move_uploaded_file(): open_basedir restriction in effect.
File(/tmp/phpP5moMa) is not within the allowed path(s):
(.:/apache/php/lib/php/:/apache/htdocs/bwiberg/) in
/apache/htdocs/bwiberg/test/safemode/upload.php on line 9
--->8---

As you can see, /tmp is not within open_basedir, but I think it should
not need to be...

---8<---
';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile))
{
   echo "File is valid, and was successfully uploaded.\n";
} else {
   echo "Possible file upload attack!\n";
}

echo 'Here is some more debugging info:';
print_r($_FILES);

print "";
?> 

--->8---

Best regards,
Björn



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

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


#39004 [NEW]: Configure Command './configure' 'dummy' 'grep' 'ggrep' !?

2006-09-30 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2006-09-30 (CVS)
PHP Bug Type: *General Issues
Bug description:  Configure Command'./configure' 'dummy' 'grep' 'ggrep' !?

Description:

I've just configured PHP_5_2 through the following script 
(wrapper for configure) and now 
get "'./configure' 'dummy' 'grep' 'ggrep'" as 
the "Configure Command" in phpinfo().

Reproduce code:
---
#!/bin/bash

./configure \
--enable-calendar \
--enable-exif \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin \
--with-apxs2=/usr/bin/apxs2

make
make install
php -i | grep "Configure Command"

Expected result:

The configure line/options.

Actual result:
--
Configure Command =>  './configure' 'dummy' 'grep' 'ggrep'

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


#38934 [NEW]: move_uploaded_file() cannot read uploaded file outside of open_basedir

2006-09-23 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5.1.6
PHP Bug Type: Safe Mode/open_basedir
Bug description:  move_uploaded_file() cannot read uploaded file outside of 
open_basedir

Description:

According to the documentation PHP should be able to read 
the uploaded file, although it's outside the open_basedir 
directories:
"""
Note:  move_uploaded_file() is both safe mode and 
open_basedir aware. However, restrictions are placed only 
on the destination path as to allow the moving of uploaded 
files in which filename may conflict with such 
restrictions. move_uploaded_file() ensures the safety of 
this operation by allowing only those files uploaded 
through PHP to be moved.
"""

However, I have to add /tmp to open_basedir - which is bad 
in terms of users would be allowed to access the files 
there!

I've not explicitely set the upload_tmp_dir directive, so 
the default "/tmp" gets used.

See also these old bugs, where it seems to have been 
fixed, but now is broken again:
http://bugs.php.net/bug.php?id=21885
http://bugs.php.net/bug.php?id=27559

Reproduce code:
---
upload.php file:






Send this file: 



';
if (move_uploaded_file($_FILES['userfile']['tmp_name'],
$uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}

echo 'Here is some more debugging info:';
print_r($_FILES);

print "";
}

?>


Expected result:

File upload.

Actual result:
--
Warning: move_uploaded_file() 
[function.move-uploaded-file]: open_basedir restriction in 
effect. File(/tmp/phpoNSKDN) is not within the allowed 
path(s): (/XXX) in ...

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


#38870 [Com]: Die on INSERT command using MSSQL_Query

2006-09-18 Thread phpbugs at thequod dot de
 ID:   38870
 Comment by:   phpbugs at thequod dot de
 Reported By:  howardt at calhounisd dot org
 Status:   Open
 Bug Type: MSSQL related
 Operating System: Windows XP, Windows Server 2000
 PHP Version:  4.4.4
 New Comment:

Try
var_dump($Insert_Result);
after executing the query (and remove the "or die()" 
therefor, of course).

What does it result in?


Previous Comments:


[2006-09-18 20:40:11] howardt at calhounisd dot org

I set the display_errors and error_reporting as directed, restarted the
service (in IIS), and I could not get an error message to display. I
also tried setting track_errors=on and then referencing $php_errormsg,
but still got nothing.



[2006-09-18 17:54:51] [EMAIL PROTECTED]

Set display_errors to On, error_reporting to E_ALL and restart the
webserver.
Please post the error message you get after that.



[2006-09-18 17:36:45] howardt at calhounisd dot org

Description:

When running an INSERT command through MSSQL_Query, the transaction is
successful (the record is inserted) but the script immediately dies
("OR die(...)" is executed).  I have followed what documentation I can
find on the PHP site, but it dies every time. This does not occur on
SELECT or UPDATE commands.

Reproduce code:
---


Expected result:

"Success" should be displayed on the page.

Actual result:
--
"Could not insert record. INSERT INTO table(SchoolID, StateID)
VALUES('123456', '987654')" is displayed instead.





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


#38571 [Fbk->Opn]: Memory leak in Zend/zend_variables

2006-08-23 Thread phpbugs at thequod dot de
 ID:   38571
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-08-23 (CVS)
 New Comment:

Not possible, sorry.

This is with running PhpDocumentor on a quite huge 
project.

I thought it would be enough to have the place where it 
leaks maybe.

Please close it, if this is not enough.


Previous Comments:


[2006-08-23 16:37:14] [EMAIL PROTECTED]

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

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If 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-08-23 16:34:31] phpbugs at thequod dot de

Description:

There appears to be a memory leak in current CVS 
(PHP_5_2, cli):

[Wed Aug 23 18:30:37 2006]  
Script:  '/X/PhpDocumentor/phpdoc' /X/PHP_5_2/Zend/zend_variables.h(45)
:  
Freeing 0x9482C650 (1 bytes), 
script=/X/PhpDocumentor/phpdoc
/X/PHP_5_2/Zend/zend_variables.c(120) : Actual location 
(location was relayed)
Last leak repeated 365 times
=== Total 366 memory leaks detected ===







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


#38571 [NEW]: Memory leak in Zend/zend_variables

2006-08-23 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2006-08-23 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description:  Memory leak in Zend/zend_variables

Description:

There appears to be a memory leak in current CVS 
(PHP_5_2, cli):

[Wed Aug 23 18:30:37 2006]  
Script:  '/X/PhpDocumentor/phpdoc' /X/PHP_5_2/Zend/zend_variables.h(45) : 

Freeing 0x9482C650 (1 bytes), 
script=/X/PhpDocumentor/phpdoc
/X/PHP_5_2/Zend/zend_variables.c(120) : Actual location 
(location was relayed)
Last leak repeated 365 times
=== Total 366 memory leaks detected ===



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


#38527 [NEW]: Allow using superglobals as variable-variables

2006-08-20 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2006-08-20 (CVS)
PHP Bug Type: Feature/Change Request
Bug description:  Allow using superglobals as variable-variables

Description:

The superglobals cannot get used as "variable-variables" 
in a function.

This is documented here: 
http://www.php.net/manual/en/language.variables.variable.php

Therefor this is a feature request, to change this.

Reproduce code:
---
$g = '_GET';
var_dump( $$g );

function f() {
  $g = "_GET";
  var_dump($$g);
}

f();


Expected result:

array(0) {
}
array(0) {
}


Actual result:
--
array(0) {
}

Notice: Undefined variable: _GET in X
NULL


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


#37481 [Csd->Opn]: "Memory exhausted" errors cause internal server error rather than E_ERROR

2006-08-03 Thread phpbugs at thequod dot de
 ID:   37481
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Closed
+Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-05-17 (CVS)
 Assigned To:  dmitry
 New Comment:

Re-opened, because it's too verbose - there should be no 
reference to Zend/zend_operators.c:1183.

Just re-tested with PHP_5_2


Previous Comments:


[2006-07-20 11:06:55] phpbugs at thequod dot de

Should I open another bug because the (now working) error message is
too verbose??



[2006-07-20 06:29:03] [EMAIL PROTECTED]

Fixed -> closed.



[2006-07-19 22:11:18] phpbugs at thequod dot de

It works!

Though it's now a bit too verbose (reference to source 
code/zend_operators).


VirtualHost log:

[Thu Jul 20 00:00:04 2006] [error] [client X] FastCGI: 
server "/X/php5-fcgi-starter" stderr: PHP Fatal error:  
Allowed memory size of 1048576 bytes exhausted 
at /X/cvs/php/PHP_5_2/Zend/zend_operators.c:1183 (tried to 
allocate 786358 bytes) in /X/public_html/bug_37481.php on 
line 6


Main server error log:
/X/public_html/bug_37481.php(6) : Fatal error - Allowed 
memory size of 1048576 bytes exhausted 
at /X/cvs/php/PHP_5_2/Zend/zend_operators.c:1183 (tried to 
allocate 786358 bytes)



[2006-07-19 14:29:39] [EMAIL PROTECTED]

Could you retest it with current PHP_5_2. New memory manager may fix
this problem.



[2006-05-24 17:21:18] phpbugs at thequod dot de

I have
log_errors=On (rather than E_ALL)
error_reporting=E_ALL
and
error_log not set.

IF I set error_log to some file, the fatal error gets 
logged there:
[24-May-2006 19:11:49] PHP Fatal error:  Allowed memory 
size of 1048576 bytes exhausted (tried to allocate 6 
bytes) in /XXX/web/test/memory.php on line 10

In the Apache main error.log I then get:
Allowed memory size of 1048576 bytes exhausted (tried to 
allocate 44 bytes)
[Wed May 24 19:14:24 2006] [warn] FastCGI: 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" (pid 
2637) terminated by calling exit with status '1'
[Wed May 24 19:14:24 2006] [warn] FastCGI: 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" (uid 
1001, gid 1001) restarted (pid 2767)

and in the VHOST's error log:
[Wed May 24 19:14:24 2006] [error] [client X] 
(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
read failed
[Wed May 24 19:14:24 2006] [error] [client X] FastCGI: 
incomplete headers (0 bytes) received from 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter"

IMHO, with error_log set it's even more bad: the 
fcgi-starter script exits, although I'm using 
PHP_FCGI_CHILDREN=4!

report_zend_debug does not seem to make a difference, and 
is "On" by default (not in my php.ini?!)

I've just tested it with current CVS PHP_5_1.



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

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


#37481 [Csd]: "Memory exhausted" errors cause internal server error rather than E_ERROR

2006-07-20 Thread phpbugs at thequod dot de
 ID:   37481
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Closed
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-05-17 (CVS)
 Assigned To:  dmitry
 New Comment:

Should I open another bug because the (now working) error message is
too verbose??


Previous Comments:


[2006-07-20 06:29:03] [EMAIL PROTECTED]

Fixed -> closed.



[2006-07-19 22:11:18] phpbugs at thequod dot de

It works!

Though it's now a bit too verbose (reference to source 
code/zend_operators).


VirtualHost log:

[Thu Jul 20 00:00:04 2006] [error] [client X] FastCGI: 
server "/X/php5-fcgi-starter" stderr: PHP Fatal error:  
Allowed memory size of 1048576 bytes exhausted 
at /X/cvs/php/PHP_5_2/Zend/zend_operators.c:1183 (tried to 
allocate 786358 bytes) in /X/public_html/bug_37481.php on 
line 6


Main server error log:
/X/public_html/bug_37481.php(6) : Fatal error - Allowed 
memory size of 1048576 bytes exhausted 
at /X/cvs/php/PHP_5_2/Zend/zend_operators.c:1183 (tried to 
allocate 786358 bytes)



[2006-07-19 14:29:39] [EMAIL PROTECTED]

Could you retest it with current PHP_5_2. New memory manager may fix
this problem.



[2006-05-24 17:21:18] phpbugs at thequod dot de

I have
log_errors=On (rather than E_ALL)
error_reporting=E_ALL
and
error_log not set.

IF I set error_log to some file, the fatal error gets 
logged there:
[24-May-2006 19:11:49] PHP Fatal error:  Allowed memory 
size of 1048576 bytes exhausted (tried to allocate 6 
bytes) in /XXX/web/test/memory.php on line 10

In the Apache main error.log I then get:
Allowed memory size of 1048576 bytes exhausted (tried to 
allocate 44 bytes)
[Wed May 24 19:14:24 2006] [warn] FastCGI: 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" (pid 
2637) terminated by calling exit with status '1'
[Wed May 24 19:14:24 2006] [warn] FastCGI: 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" (uid 
1001, gid 1001) restarted (pid 2767)

and in the VHOST's error log:
[Wed May 24 19:14:24 2006] [error] [client X] 
(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
read failed
[Wed May 24 19:14:24 2006] [error] [client X] FastCGI: 
incomplete headers (0 bytes) received from 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter"

IMHO, with error_log set it's even more bad: the 
fcgi-starter script exits, although I'm using 
PHP_FCGI_CHILDREN=4!

report_zend_debug does not seem to make a difference, and 
is "On" by default (not in my php.ini?!)

I've just tested it with current CVS PHP_5_1.



[2006-05-24 11:06:49] [EMAIL PROTECTED]

Probably this is configuration problem. Try the following directives in
your php.ini

log_errors=E_ALL
report_zend_debug=0

They may satisfy your expectation (work for me).

I cannot reproduce server interanl error and "Connection reset by peer"
and "incomplete headers" messages. Please confirm that you still have
the problem or close the 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/37481

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


#37481 [Fbk->Opn]: "Memory exhausted" errors cause internal server error rather than E_ERROR

2006-07-19 Thread phpbugs at thequod dot de
 ID:   37481
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-05-17 (CVS)
 Assigned To:  dmitry
 New Comment:

It works!

Though it's now a bit too verbose (reference to source 
code/zend_operators).


VirtualHost log:

[Thu Jul 20 00:00:04 2006] [error] [client X] FastCGI: 
server "/X/php5-fcgi-starter" stderr: PHP Fatal error:  
Allowed memory size of 1048576 bytes exhausted 
at /X/cvs/php/PHP_5_2/Zend/zend_operators.c:1183 (tried to 
allocate 786358 bytes) in /X/public_html/bug_37481.php on 
line 6


Main server error log:
/X/public_html/bug_37481.php(6) : Fatal error - Allowed 
memory size of 1048576 bytes exhausted 
at /X/cvs/php/PHP_5_2/Zend/zend_operators.c:1183 (tried to 
allocate 786358 bytes)


Previous Comments:


[2006-07-19 14:29:39] [EMAIL PROTECTED]

Could you retest it with current PHP_5_2. New memory manager may fix
this problem.



[2006-05-24 17:21:18] phpbugs at thequod dot de

I have
log_errors=On (rather than E_ALL)
error_reporting=E_ALL
and
error_log not set.

IF I set error_log to some file, the fatal error gets 
logged there:
[24-May-2006 19:11:49] PHP Fatal error:  Allowed memory 
size of 1048576 bytes exhausted (tried to allocate 6 
bytes) in /XXX/web/test/memory.php on line 10

In the Apache main error.log I then get:
Allowed memory size of 1048576 bytes exhausted (tried to 
allocate 44 bytes)
[Wed May 24 19:14:24 2006] [warn] FastCGI: 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" (pid 
2637) terminated by calling exit with status '1'
[Wed May 24 19:14:24 2006] [warn] FastCGI: 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" (uid 
1001, gid 1001) restarted (pid 2767)

and in the VHOST's error log:
[Wed May 24 19:14:24 2006] [error] [client X] 
(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
read failed
[Wed May 24 19:14:24 2006] [error] [client X] FastCGI: 
incomplete headers (0 bytes) received from 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter"

IMHO, with error_log set it's even more bad: the 
fcgi-starter script exits, although I'm using 
PHP_FCGI_CHILDREN=4!

report_zend_debug does not seem to make a difference, and 
is "On" by default (not in my php.ini?!)

I've just tested it with current CVS PHP_5_1.



[2006-05-24 11:06:49] [EMAIL PROTECTED]

Probably this is configuration problem. Try the following directives in
your php.ini

log_errors=E_ALL
report_zend_debug=0

They may satisfy your expectation (work for me).

I cannot reproduce server interanl error and "Connection reset by peer"
and "incomplete headers" messages. Please confirm that you still have
the problem or close the bug.


--------

[2006-05-17 20:12:31] phpbugs at thequod dot de

Apache does not attach the "in FILE on LINE" to the error 
PHP creates!

Re: "mod_fastcgi logs FastCGI application error (stderr) 
output to the server log associated with the request. 
Errors reported by the FastCGI process manager, fcgi-pm, 
are reported to the main server log (typically, 
logs/error_log). Data written to stdout or stderr before 
entering the FastCGI accept loop or via a mechanism that 
is not FastCGI protocol aware will also be directed to the 
main server log." 
(http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html)
it seems that the "memory exhausted" error is "Data 
written to stdout or stderr before entering the FastCGI 
accept loop or via a mechanism that is not FastCGI 
protocol aware".

I also don't see any reason why mod_php would 
display/deliver the page that has been processed/created 
before this error, but the php-fastcgi returns an invalid 
response.



[2006-05-17 19:45:56] [EMAIL PROTECTED]

PHP has nothing to do with your web server logging utilities.



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

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


#37240 [NoF->Csd]: doc_root causes CGI to fail with "No input file specified." error

2006-06-30 Thread phpbugs at thequod dot de
 ID:   37240
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   No Feedback
+Status:   Closed
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  4CVS-2006-04-29 (CVS)
 New Comment:

Probably I've misunderstood the doc_root setting: I've 
thought it would specify where files may get accessed 
from, but instead it's the prefix for the requested 
URI/path.

Sorry.


Previous Comments:


[2006-06-28 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".



[2006-06-20 14:55:28] [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-04-29 01:34:37] phpbugs at thequod dot de

Correction: it also fails with PHP5.1.3-CVS, BUT only if 
the doc_root option is set to somewhere below Apache's 
DocumentRoot!

It does not fail for
doc_root = /var/www/host/public_html/
but
doc_root = /var/www/host/

----

[2006-04-29 00:52:31] phpbugs at thequod dot de

Description:

If doc_root gets enabled with PHP 4.4.3-dev (cgi) (built: 
Apr 29 2006 02:13:25) it causes an "No input file 
specified." error.

I've tried it with "--enable-discard-path", after first 
experiencing this error, but the result was the same as 
without this configure option.

It fails on URLs like 
http://demo.b2evolution.net/HEAD.4/blogs/index.php?blog=2 
(I've removed the doc_root option, so it won't fail there 
anymore), but strangely not on 
http://demo.b2evolution.net/phpinfo.4 !

The last (working) URL gets rewritten to /content.php4 
internally (.htaccess):
RewriteRule ^phpinfo(?:\.(4))?/?$ /content.php$2/$1 [L]

The first (non-working) URL gets not rewritten, but is 
a "plain" existing file.

NOTE: I'm using a chroot (with Apache's mod_chroot) and 
therefor also have a recursive symlink "/XXX" in the 
chroot "/XXX" itself - _maybe_ that could cause this.

The problem does not appear with 5.1.3-cvs.

Reproduce code:
---
doc_root set in php.ini to the same as DocumentRoot in Apache 2.

My configure:

./configure \
--prefix=/XXX/make/php4 \
--with-config-file-path=/etc/php4 \
--with-pear=/XXX/lib/php4 \
--enable-calendar \
--enable-exif \
--enable-fastcgi \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-jpeg-6b \
--with-jpeg-dir \
--with-ldap \
--with-ldap-sasl \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--without-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin


I've also tried --enable-discard-path (which is not recommened for
fastcgi (in README.FastCGI), because of some hint in a "bogus" bug
report, with the same result.


The problem is probably in "sapi/cgi/cgi_main.c". 
I'd like to help debug this, but would need a hint, where to start.


Expected result:

Page gets parsed by PHP.

Actual result:
--
"No input file specified." error gets thrown.





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


#37422 [Opn]: FastCGI: comm with server .. aborted: idle timeout

2006-05-29 Thread phpbugs at thequod dot de
 ID:   37422
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5.1.5CVS
 Assigned To:  dmitry
 New Comment:

Here is a backtrace of a process running without 
PHP_FCGI_CHILDREN and PHP_FCGI_MAX_REQUESTS being set (so 
there's only one instance):

#0  0xb7802d2c in recv () from /lib/tls/libc.so.6
#1  0x0837cf99 in fcgi_finish_request (req=0xbff29d94) 
at /home/XXX/cvs/php/php51dev/sapi/cgi/fastcgi.c:620
#2  0x0837d760 in fcgi_accept_request (req=0xbff29d94) 
at /home/XXX/cvs/php/php51dev/sapi/cgi/fastcgi.c:633
#3  0x0837ee7c in main (argc=1, argv=0xbff2c464) 
at /home/XXX/cvs/php/php51dev/sapi/cgi/cgi_main.c:1333

It seems to hang there around for a while and all requests 
that arrive get an idle timeout error.

This is PHP 5.1.5-dev (cgi-fcgi) (built: May 29 2006 
01:33:02) (DEBUG).

It appears to be just a overload on the server/number of 
simulatneous requests, as I can reproduce it with
ab2 -n PHP_FCGI_CHILDREN+1 -c PHP_FCGI_CHILDREN+1 
www.site/
and a script that does "sleep( timeout + 1 );".

But I've never seen those errors before 5.1.3-dev and 
therefor cannot really believe that this is the only 
cause.


Previous Comments:


[2006-05-17 18:56:34] phpbugs at thequod dot de

Sidenote: The cause for the "read failed" error was due to 
the exhausted memory_limit, see 
http://bugs.php.net/?id=37481

Still, there's the "idle timeout" error (when using 
PHP_FCGI_CHILDREN=4 and MAX_REQUEST=100).

It does not seem related to the "read failed"/memory_limit 
(e.g. memory leak because of it), at least I think so 
after triggering "memory exhausted" errors.

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

[2006-05-17 17:00:39] phpbugs at thequod dot de

I see at least three bugs here:
 - documentation is wrong (default values)
 - reproducable crash
 - occassional errors like:
[Wed May 17 18:34:35 2006] [error] [client 88.247.169.170] 
(104)Connection reset by peer: FastCGI: comm with 
server "/var/www/XXX/php5-fcgi-starter" aborted: read 
failed
[Wed May 17 18:34:35 2006] [error] [client 88.247.169.170] 
FastCGI: incomplete headers (0 bytes) received from 
server "/var/www/XXX/php5-fcgi-starter"

and

[Wed May 17 18:34:20 2006] [error] [client 72.30.111.157] 
FastCGI: comm with server "/var/www/XXX/php5-fcgi-starter" 
aborted: idle timeout (60 sec)
[Wed May 17 18:34:20 2006] [error] [client 72.30.111.157] 
FastCGI: incomplete headers (0 bytes) received from 
server "/var/www/XXX/php5-fcgi-starter"

after the server has been running some time..

I cannot reproduce it, though and don't know how I should 
debug it.

What's strange about all those timeout errors: 
max_execution_time is set to 30.

Since I've tested the 5.1.3 RCs, php-fastcgi is not usable 
anymore in production for me! I think I'll have to go back 
to 5.1.2 for now.

5.2-dev does not seem to have this problem (around them 
time the snapshot has been posted here), but I don't think 
it's a good idea to use it in production.



[2006-05-17 14:04:10] [EMAIL PROTECTED]

No Bug? Bogus. Thanks.



[2006-05-16 06:26:48] phpbugs at thequod dot de

The described problem, where PHP_FCGI_CHILDREN is set, seems rather to
be a PHP application problem:
I was using fsockopen on URLs, without having set a transfer timeout
through stream_set_timeout(). Therefor the FCGI process timed out on
requests to URLs, which did not respond in a given time. I've setup the
fastcgi-Server with a timeout of 60 seconds.
It seems to cause no more problems with current CVS (PHP 5.2.0-dev
(cgi-fcgi) (built: May 15 2006 22:28:11)) and probably also not with
5.1.4, which I'll re-try now.

Having "crashes" with unset PHP_FCGI_CHILDREN is bad IMHO,
nevertheless. Can it be fixed?

Can you see in my backtraces what the missing stream_set_timeout() in
my script "triggered"? I find the message "buf=0xfffc , 
count=4294967292" quite "unusal".

btw: please update sapi/cgi/README.FastCGI accordingly, because it
still says that by default 8 childs get used!



[2006-05-15 19:56:33] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/37422

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


#37481 [Fbk->Opn]: "Memory exhausted" errors cause internal server error rather than E_ERROR

2006-05-24 Thread phpbugs at thequod dot de
 ID:   37481
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-05-17 (CVS)
 Assigned To:  dmitry
 New Comment:

I have
log_errors=On (rather than E_ALL)
error_reporting=E_ALL
and
error_log not set.

IF I set error_log to some file, the fatal error gets 
logged there:
[24-May-2006 19:11:49] PHP Fatal error:  Allowed memory 
size of 1048576 bytes exhausted (tried to allocate 6 
bytes) in /XXX/web/test/memory.php on line 10

In the Apache main error.log I then get:
Allowed memory size of 1048576 bytes exhausted (tried to 
allocate 44 bytes)
[Wed May 24 19:14:24 2006] [warn] FastCGI: 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" (pid 
2637) terminated by calling exit with status '1'
[Wed May 24 19:14:24 2006] [warn] FastCGI: 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" (uid 
1001, gid 1001) restarted (pid 2767)

and in the VHOST's error log:
[Wed May 24 19:14:24 2006] [error] [client X] 
(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
read failed
[Wed May 24 19:14:24 2006] [error] [client X] FastCGI: 
incomplete headers (0 bytes) received from 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter"

IMHO, with error_log set it's even more bad: the 
fcgi-starter script exits, although I'm using 
PHP_FCGI_CHILDREN=4!

report_zend_debug does not seem to make a difference, and 
is "On" by default (not in my php.ini?!)

I've just tested it with current CVS PHP_5_1.


Previous Comments:


[2006-05-24 11:06:49] [EMAIL PROTECTED]

Probably this is configuration problem. Try the following directives in
your php.ini

log_errors=E_ALL
report_zend_debug=0

They may satisfy your expectation (work for me).

I cannot reproduce server interanl error and "Connection reset by peer"
and "incomplete headers" messages. Please confirm that you still have
the problem or close the bug.


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

[2006-05-17 20:12:31] phpbugs at thequod dot de

Apache does not attach the "in FILE on LINE" to the error 
PHP creates!

Re: "mod_fastcgi logs FastCGI application error (stderr) 
output to the server log associated with the request. 
Errors reported by the FastCGI process manager, fcgi-pm, 
are reported to the main server log (typically, 
logs/error_log). Data written to stdout or stderr before 
entering the FastCGI accept loop or via a mechanism that 
is not FastCGI protocol aware will also be directed to the 
main server log." 
(http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html)
it seems that the "memory exhausted" error is "Data 
written to stdout or stderr before entering the FastCGI 
accept loop or via a mechanism that is not FastCGI 
protocol aware".

I also don't see any reason why mod_php would 
display/deliver the page that has been processed/created 
before this error, but the php-fastcgi returns an invalid 
response.



[2006-05-17 19:45:56] [EMAIL PROTECTED]

PHP has nothing to do with your web server logging utilities.



[2006-05-17 19:00:59] phpbugs at thequod dot de

I don't see why.

Additionally, as far as I remember, the behaviour is 
different with mod_php: the error gets displayed in the 
browser (with display_errors "on") and therefor probably 
also get logged into the virtual host's error log.

IMHO it's very confusing to just have the error, without 
any time, file or vhost information in the main error.log!



[2006-05-17 18:48:16] [EMAIL PROTECTED]

This is the way it works and this is expected.



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

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


#37341 [Opn]: $_SERVER in included file is shortened to two entries, if $_ENV gets used

2006-05-18 Thread phpbugs at thequod dot de
 ID:   37341
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
-Bug Type: Scripting Engine problem
+Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-05-06 (CVS)
 New Comment:

Changed category. Also happens with 5.2-CVS btw.


Previous Comments:


[2006-05-18 16:58:20] phpbugs at thequod dot de

I just wanted to write a .phpt test case for it and 
recognized, that it only happens when using

FastCgiServer /XXX/php5-fcgi-starter -user XXX -group 
XXX -pass-header HTTP_AUTHORIZATION -flush -idle-timeout 
60

It does NOT happen, if the fcgi binary is running 
in "dynamic mode"..



[2006-05-10 22:18:21] phpbugs at thequod dot de

changed summary.. sorry.



[2006-05-10 22:17:14] phpbugs at thequod dot de

PHP 5.1.5-dev (cgi-fcgi) (built: May  6 2006 22:18:37)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend 
Technologies



[2006-05-10 22:16:28] phpbugs at thequod dot de

To reproduce:
--- SERVER.php ---



--- SERVER.inc.php ---




[2006-05-06 21:27:49] [EMAIL PROTECTED]

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

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

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/37341

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


#37341 [Opn]: $_SERVER in included file is shortened to two entries, if $_ENV gets used

2006-05-18 Thread phpbugs at thequod dot de
 ID:   37341
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-05-06 (CVS)
 New Comment:

I just wanted to write a .phpt test case for it and 
recognized, that it only happens when using

FastCgiServer /XXX/php5-fcgi-starter -user XXX -group 
XXX -pass-header HTTP_AUTHORIZATION -flush -idle-timeout 
60

It does NOT happen, if the fcgi binary is running 
in "dynamic mode"..


Previous Comments:


[2006-05-10 22:18:21] phpbugs at thequod dot de

changed summary.. sorry.



[2006-05-10 22:17:14] phpbugs at thequod dot de

PHP 5.1.5-dev (cgi-fcgi) (built: May  6 2006 22:18:37)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend 
Technologies



[2006-05-10 22:16:28] phpbugs at thequod dot de

To reproduce:
--- SERVER.php ---



--- SERVER.inc.php ---




[2006-05-06 21:27:49] [EMAIL PROTECTED]

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

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

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2006-05-06 20:38:49] phpbugs at thequod dot de

Description:

I've just discovered a nasty bug: in phpMyAdmin's 
index.php gets a file required:
require_once('./libraries/common.lib.php');

Inside this file then, $_SERVER is shortened to just two 
entries: PHP_SELF and REQUEST_TIME (I've added a 
var_dump() at the beginning).

However, var_dump($_SERVER) in index.php before the 
include outputs the whole array.

And additionally, now it is correctly filled in the 
include's var_dump(): Just accessing $_SERVER (through 
var_dump() or $a = $_SERVER) before the include corrects 
it inside the include.

Reproduce code:
---
I could not reproduce it with a small test script, but with phpMyAdmin
2.8.0.3.

I'm using Apache2 and PHP as FastCGI.






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


#37481 [Bgs->Opn]: "Memory exhausted" errors cause internal server error rather than E_ERROR

2006-05-17 Thread phpbugs at thequod dot de
 ID:   37481
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-05-17 (CVS)
 New Comment:

Apache does not attach the "in FILE on LINE" to the error 
PHP creates!

Re: "mod_fastcgi logs FastCGI application error (stderr) 
output to the server log associated with the request. 
Errors reported by the FastCGI process manager, fcgi-pm, 
are reported to the main server log (typically, 
logs/error_log). Data written to stdout or stderr before 
entering the FastCGI accept loop or via a mechanism that 
is not FastCGI protocol aware will also be directed to the 
main server log." 
(http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html)
it seems that the "memory exhausted" error is "Data 
written to stdout or stderr before entering the FastCGI 
accept loop or via a mechanism that is not FastCGI 
protocol aware".

I also don't see any reason why mod_php would 
display/deliver the page that has been processed/created 
before this error, but the php-fastcgi returns an invalid 
response.


Previous Comments:


[2006-05-17 19:45:56] [EMAIL PROTECTED]

PHP has nothing to do with your web server logging utilities.

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

[2006-05-17 19:00:59] phpbugs at thequod dot de

I don't see why.

Additionally, as far as I remember, the behaviour is 
different with mod_php: the error gets displayed in the 
browser (with display_errors "on") and therefor probably 
also get logged into the virtual host's error log.

IMHO it's very confusing to just have the error, without 
any time, file or vhost information in the main error.log!



[2006-05-17 18:48:16] [EMAIL PROTECTED]

This is the way it works and this is expected.

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

[2006-05-17 18:34:50] phpbugs at thequod dot de

Description:

If memory_limit gets reached, I get "Allowed memory size 
of XXX bytes exhausted (tried to allocate XXX bytes)" 
written to the server's main error log and 

[Wed May 17 20:22:26 2006] [error] [client XXX] 
(104)Connection reset by peer: FastCGI: comm with 
server "/var/www/XXX/php5-fcgi-starter" aborted: read 
failed
[Wed May 17 20:22:26 2006] [error] [client XXX] FastCGI: 
incomplete headers (0 bytes) received from 
server "/var/www/XXX/php5-fcgi-starter"

into the virtual host's error log.

Reproduce code:
---



Expected result:

[Wed May 17 20:23:49 2006] [error] [client XXX] FastCGI: 
server "/var/www/XXX/php5-fcgi-starter" stderr: PHP Fatal 
error: Allowed memory size of XXX bytes exhausted (tried 
to allocate XXX bytes) in /var/www/XXX/web/index.php on 
line XXX


Actual result:
--
No entry about the exhausted memory in the virtual host's 
error log, but only in the main error log, _without_ any 
source file or line mentioned (which is the case with 
mod_php AFAIK)





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


#37481 [Bgs->Opn]: "Memory exhausted" errors cause internal server error rather than E_ERROR

2006-05-17 Thread phpbugs at thequod dot de
 ID:   37481
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-05-17 (CVS)
 New Comment:

I don't see why.

Additionally, as far as I remember, the behaviour is 
different with mod_php: the error gets displayed in the 
browser (with display_errors "on") and therefor probably 
also get logged into the virtual host's error log.

IMHO it's very confusing to just have the error, without 
any time, file or vhost information in the main error.log!


Previous Comments:


[2006-05-17 18:48:16] [EMAIL PROTECTED]

This is the way it works and this is expected.

----

[2006-05-17 18:34:50] phpbugs at thequod dot de

Description:

If memory_limit gets reached, I get "Allowed memory size 
of XXX bytes exhausted (tried to allocate XXX bytes)" 
written to the server's main error log and 

[Wed May 17 20:22:26 2006] [error] [client XXX] 
(104)Connection reset by peer: FastCGI: comm with 
server "/var/www/XXX/php5-fcgi-starter" aborted: read 
failed
[Wed May 17 20:22:26 2006] [error] [client XXX] FastCGI: 
incomplete headers (0 bytes) received from 
server "/var/www/XXX/php5-fcgi-starter"

into the virtual host's error log.

Reproduce code:
---



Expected result:

[Wed May 17 20:23:49 2006] [error] [client XXX] FastCGI: 
server "/var/www/XXX/php5-fcgi-starter" stderr: PHP Fatal 
error: Allowed memory size of XXX bytes exhausted (tried 
to allocate XXX bytes) in /var/www/XXX/web/index.php on 
line XXX


Actual result:
--
No entry about the exhausted memory in the virtual host's 
error log, but only in the main error log, _without_ any 
source file or line mentioned (which is the case with 
mod_php AFAIK)





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


#37422 [Opn]: FastCGI: comm with server .. aborted: idle timeout

2006-05-17 Thread phpbugs at thequod dot de
 ID:   37422
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5.1.5CVS
 Assigned To:  dmitry
 New Comment:

Sidenote: The cause for the "read failed" error was due to 
the exhausted memory_limit, see 
http://bugs.php.net/?id=37481

Still, there's the "idle timeout" error (when using 
PHP_FCGI_CHILDREN=4 and MAX_REQUEST=100).

It does not seem related to the "read failed"/memory_limit 
(e.g. memory leak because of it), at least I think so 
after triggering "memory exhausted" errors.


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

[2006-05-17 17:00:39] phpbugs at thequod dot de

I see at least three bugs here:
 - documentation is wrong (default values)
 - reproducable crash
 - occassional errors like:
[Wed May 17 18:34:35 2006] [error] [client 88.247.169.170] 
(104)Connection reset by peer: FastCGI: comm with 
server "/var/www/XXX/php5-fcgi-starter" aborted: read 
failed
[Wed May 17 18:34:35 2006] [error] [client 88.247.169.170] 
FastCGI: incomplete headers (0 bytes) received from 
server "/var/www/XXX/php5-fcgi-starter"

and

[Wed May 17 18:34:20 2006] [error] [client 72.30.111.157] 
FastCGI: comm with server "/var/www/XXX/php5-fcgi-starter" 
aborted: idle timeout (60 sec)
[Wed May 17 18:34:20 2006] [error] [client 72.30.111.157] 
FastCGI: incomplete headers (0 bytes) received from 
server "/var/www/XXX/php5-fcgi-starter"

after the server has been running some time..

I cannot reproduce it, though and don't know how I should 
debug it.

What's strange about all those timeout errors: 
max_execution_time is set to 30.

Since I've tested the 5.1.3 RCs, php-fastcgi is not usable 
anymore in production for me! I think I'll have to go back 
to 5.1.2 for now.

5.2-dev does not seem to have this problem (around them 
time the snapshot has been posted here), but I don't think 
it's a good idea to use it in production.



[2006-05-17 14:04:10] [EMAIL PROTECTED]

No Bug? Bogus. Thanks.

--------

[2006-05-16 06:26:48] phpbugs at thequod dot de

The described problem, where PHP_FCGI_CHILDREN is set, seems rather to
be a PHP application problem:
I was using fsockopen on URLs, without having set a transfer timeout
through stream_set_timeout(). Therefor the FCGI process timed out on
requests to URLs, which did not respond in a given time. I've setup the
fastcgi-Server with a timeout of 60 seconds.
It seems to cause no more problems with current CVS (PHP 5.2.0-dev
(cgi-fcgi) (built: May 15 2006 22:28:11)) and probably also not with
5.1.4, which I'll re-try now.

Having "crashes" with unset PHP_FCGI_CHILDREN is bad IMHO,
nevertheless. Can it be fixed?

Can you see in my backtraces what the missing stream_set_timeout() in
my script "triggered"? I find the message "buf=0xfffc , 
count=4294967292" quite "unusal".

btw: please update sapi/cgi/README.FastCGI accordingly, because it
still says that by default 8 childs get used!



[2006-05-15 19:56:33] [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-05-15 19:15:38] phpbugs at thequod dot de

I've tried debugging the problem a bit more (with gdb):

The main process (which was started at first) has this 
backtrace:
#0  0xb7890968 in wait () from /lib/tls/libc.so.6
#1  0x083203bb in main (argc=1, argv=0xbfdf8be4) 
at /home/XXX/cvs/php/php51dev/sapi/cgi/cgi_main.c:1285

("ps aux" says:
XXX21201  0.0  0.7  15372  3976 ?Ss   May14   
0:00 /bin/php5-fcgi)

Line 1285 is the while loop here:
if (parent) {
#ifdef DEBUG_FASTCGI
fprintf(stderr, "Wait for kids, pid %d\n", 
getpid());
#endif
while (wait(&status) < 0) {
}
running--;
}


And here are backtraces, of two php5-fcgi childs (4 
total):
(gdb) bt
#0  0xb78c4678 in poll () from /lib/tls/libc.so.6
#1  0x0827b266 in php_sockop_read (stream=0x866546c, 
buf=0xfffc , 
count=4294967292)
at php_network.h:164
#2  0x08099b5e in php_openssl_sockop_read 
(stream=0x866546c, buf=0x866557c "etting
t��\222�", 
count=8192)
at /home/XXX/cvs/php/php51dev/ext/openssl/xp_ssl.c:229
#3  0x08271d20 in php_stream_fill_read_buffer 
(stream=0x866546c, size=1) 
at /home/XXX/cvs/php/php51dev/main/streams/streams.c:541
#4  0x

#37481 [NEW]: "Memory exhausted" errors cause internal server error rather than E_ERROR

2006-05-17 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2006-05-17 (CVS)
PHP Bug Type: CGI related
Bug description:  "Memory exhausted" errors cause internal server error rather 
than E_ERROR

Description:

If memory_limit gets reached, I get "Allowed memory size 
of XXX bytes exhausted (tried to allocate XXX bytes)" 
written to the server's main error log and 

[Wed May 17 20:22:26 2006] [error] [client XXX] 
(104)Connection reset by peer: FastCGI: comm with 
server "/var/www/XXX/php5-fcgi-starter" aborted: read 
failed
[Wed May 17 20:22:26 2006] [error] [client XXX] FastCGI: 
incomplete headers (0 bytes) received from 
server "/var/www/XXX/php5-fcgi-starter"

into the virtual host's error log.

Reproduce code:
---



Expected result:

[Wed May 17 20:23:49 2006] [error] [client XXX] FastCGI: 
server "/var/www/XXX/php5-fcgi-starter" stderr: PHP Fatal 
error: Allowed memory size of XXX bytes exhausted (tried 
to allocate XXX bytes) in /var/www/XXX/web/index.php on 
line XXX


Actual result:
--
No entry about the exhausted memory in the virtual host's 
error log, but only in the main error log, _without_ any 
source file or line mentioned (which is the case with 
mod_php AFAIK)

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


#37422 [Bgs->Opn]: FastCGI: comm with server .. aborted: idle timeout

2006-05-17 Thread phpbugs at thequod dot de
 ID:   37422
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Bogus
+Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5.1.5CVS
 Assigned To:  dmitry
 New Comment:

I see at least three bugs here:
 - documentation is wrong (default values)
 - reproducable crash
 - occassional errors like:
[Wed May 17 18:34:35 2006] [error] [client 88.247.169.170] 
(104)Connection reset by peer: FastCGI: comm with 
server "/var/www/XXX/php5-fcgi-starter" aborted: read 
failed
[Wed May 17 18:34:35 2006] [error] [client 88.247.169.170] 
FastCGI: incomplete headers (0 bytes) received from 
server "/var/www/XXX/php5-fcgi-starter"

and

[Wed May 17 18:34:20 2006] [error] [client 72.30.111.157] 
FastCGI: comm with server "/var/www/XXX/php5-fcgi-starter" 
aborted: idle timeout (60 sec)
[Wed May 17 18:34:20 2006] [error] [client 72.30.111.157] 
FastCGI: incomplete headers (0 bytes) received from 
server "/var/www/XXX/php5-fcgi-starter"

after the server has been running some time..

I cannot reproduce it, though and don't know how I should 
debug it.

What's strange about all those timeout errors: 
max_execution_time is set to 30.

Since I've tested the 5.1.3 RCs, php-fastcgi is not usable 
anymore in production for me! I think I'll have to go back 
to 5.1.2 for now.

5.2-dev does not seem to have this problem (around them 
time the snapshot has been posted here), but I don't think 
it's a good idea to use it in production.


Previous Comments:


[2006-05-17 14:04:10] [EMAIL PROTECTED]

No Bug? Bogus. Thanks.

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

[2006-05-16 06:26:48] phpbugs at thequod dot de

The described problem, where PHP_FCGI_CHILDREN is set, seems rather to
be a PHP application problem:
I was using fsockopen on URLs, without having set a transfer timeout
through stream_set_timeout(). Therefor the FCGI process timed out on
requests to URLs, which did not respond in a given time. I've setup the
fastcgi-Server with a timeout of 60 seconds.
It seems to cause no more problems with current CVS (PHP 5.2.0-dev
(cgi-fcgi) (built: May 15 2006 22:28:11)) and probably also not with
5.1.4, which I'll re-try now.

Having "crashes" with unset PHP_FCGI_CHILDREN is bad IMHO,
nevertheless. Can it be fixed?

Can you see in my backtraces what the missing stream_set_timeout() in
my script "triggered"? I find the message "buf=0xfffc , 
count=4294967292" quite "unusal".

btw: please update sapi/cgi/README.FastCGI accordingly, because it
still says that by default 8 childs get used!



[2006-05-15 19:56:33] [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-05-15 19:15:38] phpbugs at thequod dot de

I've tried debugging the problem a bit more (with gdb):

The main process (which was started at first) has this 
backtrace:
#0  0xb7890968 in wait () from /lib/tls/libc.so.6
#1  0x083203bb in main (argc=1, argv=0xbfdf8be4) 
at /home/XXX/cvs/php/php51dev/sapi/cgi/cgi_main.c:1285

("ps aux" says:
XXX21201  0.0  0.7  15372  3976 ?Ss   May14   
0:00 /bin/php5-fcgi)

Line 1285 is the while loop here:
if (parent) {
#ifdef DEBUG_FASTCGI
fprintf(stderr, "Wait for kids, pid %d\n", 
getpid());
#endif
while (wait(&status) < 0) {
}
running--;
}


And here are backtraces, of two php5-fcgi childs (4 
total):
(gdb) bt
#0  0xb78c4678 in poll () from /lib/tls/libc.so.6
#1  0x0827b266 in php_sockop_read (stream=0x866546c, 
buf=0xfffc , 
count=4294967292)
at php_network.h:164
#2  0x08099b5e in php_openssl_sockop_read 
(stream=0x866546c, buf=0x866557c "etting
t��\222�", 
count=8192)
at /home/XXX/cvs/php/php51dev/ext/openssl/xp_ssl.c:229
#3  0x08271d20 in php_stream_fill_read_buffer 
(stream=0x866546c, size=1) 
at /home/XXX/cvs/php/php51dev/main/streams/streams.c:541
#4  0x08271dd2 in _php_stream_read (stream=0x866546c, 
buf=0xbfdf2187 "\b�!߿�\204
\blTf\bkqI\b", size=1)

at /home/XXX/cvs/php/php51dev/main/streams/streams.c:584
#5  0x08271fa3 in _php_stream_getc (stream=0xfffc) 
at /home/XXX/cvs/php/php51dev/main/streams/streams.c:649
#6  0x082084c5 in zif_fgetc (ht=1, return_value=0x869180c, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/XXX/cvs/php/php51dev/ext/standard/file.c:1076
#7  0x082b503b in zend_do_fcall_common_helper_SPEC 
(execute_data=0

#37422 [Fbk->Opn]: FastCGI: comm with server .. aborted: idle timeout

2006-05-15 Thread phpbugs at thequod dot de
 ID:   37422
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5.1.5CVS
 Assigned To:  dmitry
 New Comment:

The described problem, where PHP_FCGI_CHILDREN is set, seems rather to
be a PHP application problem:
I was using fsockopen on URLs, without having set a transfer timeout
through stream_set_timeout(). Therefor the FCGI process timed out on
requests to URLs, which did not respond in a given time. I've setup the
fastcgi-Server with a timeout of 60 seconds.
It seems to cause no more problems with current CVS (PHP 5.2.0-dev
(cgi-fcgi) (built: May 15 2006 22:28:11)) and probably also not with
5.1.4, which I'll re-try now.

Having "crashes" with unset PHP_FCGI_CHILDREN is bad IMHO,
nevertheless. Can it be fixed?

Can you see in my backtraces what the missing stream_set_timeout() in
my script "triggered"? I find the message "buf=0xfffc , 
count=4294967292" quite "unusal".

btw: please update sapi/cgi/README.FastCGI accordingly, because it
still says that by default 8 childs get used!


Previous Comments:


[2006-05-15 19:56:33] [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-05-15 19:15:38] phpbugs at thequod dot de

I've tried debugging the problem a bit more (with gdb):

The main process (which was started at first) has this 
backtrace:
#0  0xb7890968 in wait () from /lib/tls/libc.so.6
#1  0x083203bb in main (argc=1, argv=0xbfdf8be4) 
at /home/XXX/cvs/php/php51dev/sapi/cgi/cgi_main.c:1285

("ps aux" says:
XXX21201  0.0  0.7  15372  3976 ?Ss   May14   
0:00 /bin/php5-fcgi)

Line 1285 is the while loop here:
if (parent) {
#ifdef DEBUG_FASTCGI
fprintf(stderr, "Wait for kids, pid %d\n", 
getpid());
#endif
while (wait(&status) < 0) {
}
running--;
}


And here are backtraces, of two php5-fcgi childs (4 
total):
(gdb) bt
#0  0xb78c4678 in poll () from /lib/tls/libc.so.6
#1  0x0827b266 in php_sockop_read (stream=0x866546c, 
buf=0xfffc , 
count=4294967292)
at php_network.h:164
#2  0x08099b5e in php_openssl_sockop_read 
(stream=0x866546c, buf=0x866557c "etting
t��\222�", 
count=8192)
at /home/XXX/cvs/php/php51dev/ext/openssl/xp_ssl.c:229
#3  0x08271d20 in php_stream_fill_read_buffer 
(stream=0x866546c, size=1) 
at /home/XXX/cvs/php/php51dev/main/streams/streams.c:541
#4  0x08271dd2 in _php_stream_read (stream=0x866546c, 
buf=0xbfdf2187 "\b�!߿�\204
\blTf\bkqI\b", size=1)

at /home/XXX/cvs/php/php51dev/main/streams/streams.c:584
#5  0x08271fa3 in _php_stream_getc (stream=0xfffc) 
at /home/XXX/cvs/php/php51dev/main/streams/streams.c:649
#6  0x082084c5 in zif_fgetc (ht=1, return_value=0x869180c, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/XXX/cvs/php/php51dev/ext/standard/file.c:1076
#7  0x082b503b in zend_do_fcall_common_helper_SPEC 
(execute_data=0xbfdf4410) at zend_vm_execute.h:200
#8  0x082b472b in execute (op_array=0x8681814) at 
zend_vm_execute.h:92
#9  0x0829c694 in zend_execute_scripts (type=8, 
retval=Variable "retval" is not available.
) at /home/XXX/cvs/php/php51dev/Zend/zend.c:1109
#10 0x08263044 in php_execute_script 
(primary_file=0xbfdf8acc) 
at /home/XXX/cvs/php/php51dev/main/main.c:1732
#11 0x08320831 in main (argc=1, argv=0xbfdf8be4) 
at /home/XXX/cvs/php/php51dev/sapi/cgi/cgi_main.c:1608


#0  0xb78c4678 in poll () from /lib/tls/libc.so.6
#1  0x0827b266 in php_sockop_read (stream=0x8668804, 
buf=0xfffc , 
count=4294967292)
at php_network.h:164
#2  0x08099b5e in php_openssl_sockop_read 
(stream=0x8668804, buf=0x865e50c "", count=8192)
at /home/XXX/cvs/php/php51dev/ext/openssl/xp_ssl.c:229
#3  0x08271d20 in php_stream_fill_read_buffer 
(stream=0x8668804, size=8192)

at /home/XXX/cvs/php/php51dev/main/streams/streams.c:541
#4  0x08272183 in _php_stream_get_line (stream=0x8668804, 
buf=0x0, maxlen=0, returned_len=0xbfdf21b0)

at /home/XXX/cvs/php/php51dev/main/streams/streams.c:820
#5  0x0820b4ad in zif_fgets (ht=1, return_value=0x8696bf4, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/XXX/cvs/php/php51dev/ext/standard/file.c:1021
#6  0x082b503b in zend_do_fcall_common_helper_SPEC 
(execute_data=0xbfdf4410) at zend_vm_execute.h:200
#7  0x082b472b in execute (op_array=0x865228c) at 
zend_vm_execute.h:92
#8  0x0829c694 in zend_execute_scripts (type=8, 
retval=Variable "retval" is not available.
) at /home/XXX/cvs/php/php51

#37422 [Fbk->Opn]: FastCGI: comm with server .. aborted: idle timeout

2006-05-15 Thread phpbugs at thequod dot de
 ID:   37422
 User updated by:  phpbugs at thequod dot de
-Summary:  FastCGI: comm with server .. aborted
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5.1.5CVS
 Assigned To:  dmitry
 New Comment:

I've tried debugging the problem a bit more (with gdb):

The main process (which was started at first) has this 
backtrace:
#0  0xb7890968 in wait () from /lib/tls/libc.so.6
#1  0x083203bb in main (argc=1, argv=0xbfdf8be4) 
at /home/XXX/cvs/php/php51dev/sapi/cgi/cgi_main.c:1285

("ps aux" says:
XXX21201  0.0  0.7  15372  3976 ?Ss   May14   
0:00 /bin/php5-fcgi)

Line 1285 is the while loop here:
if (parent) {
#ifdef DEBUG_FASTCGI
fprintf(stderr, "Wait for kids, pid %d\n", 
getpid());
#endif
while (wait(&status) < 0) {
}
running--;
}


And here are backtraces, of two php5-fcgi childs (4 
total):
(gdb) bt
#0  0xb78c4678 in poll () from /lib/tls/libc.so.6
#1  0x0827b266 in php_sockop_read (stream=0x866546c, 
buf=0xfffc , 
count=4294967292)
at php_network.h:164
#2  0x08099b5e in php_openssl_sockop_read 
(stream=0x866546c, buf=0x866557c "etting
t��\222�", 
count=8192)
at /home/XXX/cvs/php/php51dev/ext/openssl/xp_ssl.c:229
#3  0x08271d20 in php_stream_fill_read_buffer 
(stream=0x866546c, size=1) 
at /home/XXX/cvs/php/php51dev/main/streams/streams.c:541
#4  0x08271dd2 in _php_stream_read (stream=0x866546c, 
buf=0xbfdf2187 "\b�!߿�\204
\blTf\bkqI\b", size=1)

at /home/XXX/cvs/php/php51dev/main/streams/streams.c:584
#5  0x08271fa3 in _php_stream_getc (stream=0xfffc) 
at /home/XXX/cvs/php/php51dev/main/streams/streams.c:649
#6  0x082084c5 in zif_fgetc (ht=1, return_value=0x869180c, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/XXX/cvs/php/php51dev/ext/standard/file.c:1076
#7  0x082b503b in zend_do_fcall_common_helper_SPEC 
(execute_data=0xbfdf4410) at zend_vm_execute.h:200
#8  0x082b472b in execute (op_array=0x8681814) at 
zend_vm_execute.h:92
#9  0x0829c694 in zend_execute_scripts (type=8, 
retval=Variable "retval" is not available.
) at /home/XXX/cvs/php/php51dev/Zend/zend.c:1109
#10 0x08263044 in php_execute_script 
(primary_file=0xbfdf8acc) 
at /home/XXX/cvs/php/php51dev/main/main.c:1732
#11 0x08320831 in main (argc=1, argv=0xbfdf8be4) 
at /home/XXX/cvs/php/php51dev/sapi/cgi/cgi_main.c:1608


#0  0xb78c4678 in poll () from /lib/tls/libc.so.6
#1  0x0827b266 in php_sockop_read (stream=0x8668804, 
buf=0xfffc , 
count=4294967292)
at php_network.h:164
#2  0x08099b5e in php_openssl_sockop_read 
(stream=0x8668804, buf=0x865e50c "", count=8192)
at /home/XXX/cvs/php/php51dev/ext/openssl/xp_ssl.c:229
#3  0x08271d20 in php_stream_fill_read_buffer 
(stream=0x8668804, size=8192)

at /home/XXX/cvs/php/php51dev/main/streams/streams.c:541
#4  0x08272183 in _php_stream_get_line (stream=0x8668804, 
buf=0x0, maxlen=0, returned_len=0xbfdf21b0)

at /home/XXX/cvs/php/php51dev/main/streams/streams.c:820
#5  0x0820b4ad in zif_fgets (ht=1, return_value=0x8696bf4, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/XXX/cvs/php/php51dev/ext/standard/file.c:1021
#6  0x082b503b in zend_do_fcall_common_helper_SPEC 
(execute_data=0xbfdf4410) at zend_vm_execute.h:200
#7  0x082b472b in execute (op_array=0x865228c) at 
zend_vm_execute.h:92
#8  0x0829c694 in zend_execute_scripts (type=8, 
retval=Variable "retval" is not available.
) at /home/XXX/cvs/php/php51dev/Zend/zend.c:1109
#9  0x08263044 in php_execute_script 
(primary_file=0xbfdf8acc) 
at /home/XXX/cvs/php/php51dev/main/main.c:1732
#10 0x08320831 in main (argc=1, argv=0xbfdf8be4) 
at /home/XXX/cvs/php/php51dev/sapi/cgi/cgi_main.c:1608

PHP_FCGI_CHILDREN=4
PHP_FCGI_MAX_REQUESTS=100


Previous Comments:


[2006-05-15 11:03:41] [EMAIL PROTECTED]

the behavior of PHP_FCGI_CHILDREN was changed about year ago. If it is
not set then main PHP process doesn't fork worker processes but serve
FastCGI requests by itself.

I cannot reproduce the problem with PHP_FCGI_CHILDREN is set, but it
well reproducable without PHP_FCGI_CHILDREN.

BTW I can reproduce the same problem with mod_fastcgi and PHP-5.0, and
cannot reproduce with PHP-5.1.4 and zend_enabler. So I assume this is
mod_fastcgi bug, that cannot restart PHP properly.




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

[2006-05-12 19:37:53] phpbugs at thequod dot de

The test script is just .

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

[2006-05-12 19:34:38] phpbugs at thequod dot de

Description:

I'm running Apache2/mod_fastcgi/PHP5.1.5-dev (built: May 
12 2006 19:46:11).

T

#37422 [Opn]: FastCGI: comm with server .. aborted

2006-05-12 Thread phpbugs at thequod dot de
 ID:   37422
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5.1.5CVS
 New Comment:

The test script is just .


Previous Comments:


[2006-05-12 19:34:38] phpbugs at thequod dot de

Description:

I'm running Apache2/mod_fastcgi/PHP5.1.5-dev (built: May 
12 2006 19:46:11).

The problem is, that without setting PHP_FCGI_CHILDREN 
children, PHP does not default to the documented value of 
8 (no source, but often read): it does not create any 
children.

This might be just a documentation issue/bug, but without 
using any children, I can reproduce crashing PHP (somehow 
after PHP_FCGI_MAX_REQUESTS), but also experience with 
PHP_FCGI_CHILDREN set to 4!

This "bogus" report seems to be related: 
http://bugs.php.net/bug.php?id=27802

Reproduce code:
---
In fastcgi.conf:FastCgiServer
/XXX/fcgi-scripts/XXX/php5-fcgi-starter -user phptest_codeprobe -group
phptest_codeprobe -pass-header HTTP_AUTHORIZATION -flush -idle-timeout
60

php5-fcgi-starter script:
#!/bin/sh
PHPRC="/vhosts/phptest_codeprobe/conf/php5"
export PHPRC
PHP_FCGI_MAX_REQUESTS=100
export PHP_FCGI_MAX_REQUESTS
exec /bin/php5-fcgi


1. Restart Apache
2. A php5-fcgi process gets started (without any childs)
3. ab2 -n 101 url/
4. A new php5-fcgi process gets "re-spawned"
5. ab2 -n 201 url/
6. The longest request takes 4s(!), instead of 0.004.
7. ab2 -n 301 url/
8. The php5-fcgi process disappears forever!

This only seems to be an indication, because I have one server setup
with PHP_FCGI_MAX_REQUESTS=100 and PHP_FCGI_CHILDREN=4 and it also dies
away like this (with the same entries in the server's error log).

This is since PHP 5.1.3/5.1.4..

Expected result:

Do not crash.

Actual result:
--
Apache error log:
FastCGI: comm with 
server "/var/www/fcgi-scripts/phptest_codeprobe/php5-fcgi-starter" 
aborted: idle timeout (60 sec)
FastCGI: incomplete headers (0 bytes) received from 
server "/var/www/fcgi-scripts/phptest_codeprobe/php5-fcgi-starter"






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


#37422 [NEW]: FastCGI: comm with server .. aborted

2006-05-12 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5.1.5CVS
PHP Bug Type: CGI related
Bug description:  FastCGI: comm with server .. aborted

Description:

I'm running Apache2/mod_fastcgi/PHP5.1.5-dev (built: May 
12 2006 19:46:11).

The problem is, that without setting PHP_FCGI_CHILDREN 
children, PHP does not default to the documented value of 
8 (no source, but often read): it does not create any 
children.

This might be just a documentation issue/bug, but without 
using any children, I can reproduce crashing PHP (somehow 
after PHP_FCGI_MAX_REQUESTS), but also experience with 
PHP_FCGI_CHILDREN set to 4!

This "bogus" report seems to be related: 
http://bugs.php.net/bug.php?id=27802

Reproduce code:
---
In fastcgi.conf:FastCgiServer
/XXX/fcgi-scripts/XXX/php5-fcgi-starter -user phptest_codeprobe -group
phptest_codeprobe -pass-header HTTP_AUTHORIZATION -flush -idle-timeout 60

php5-fcgi-starter script:
#!/bin/sh
PHPRC="/vhosts/phptest_codeprobe/conf/php5"
export PHPRC
PHP_FCGI_MAX_REQUESTS=100
export PHP_FCGI_MAX_REQUESTS
exec /bin/php5-fcgi


1. Restart Apache
2. A php5-fcgi process gets started (without any childs)
3. ab2 -n 101 url/
4. A new php5-fcgi process gets "re-spawned"
5. ab2 -n 201 url/
6. The longest request takes 4s(!), instead of 0.004.
7. ab2 -n 301 url/
8. The php5-fcgi process disappears forever!

This only seems to be an indication, because I have one server setup with
PHP_FCGI_MAX_REQUESTS=100 and PHP_FCGI_CHILDREN=4 and it also dies away
like this (with the same entries in the server's error log).

This is since PHP 5.1.3/5.1.4..

Expected result:

Do not crash.

Actual result:
--
Apache error log:
FastCGI: comm with 
server "/var/www/fcgi-scripts/phptest_codeprobe/php5-fcgi-starter" 
aborted: idle timeout (60 sec)
FastCGI: incomplete headers (0 bytes) received from 
server "/var/www/fcgi-scripts/phptest_codeprobe/php5-fcgi-starter"


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


#37341 [Opn]: $_SERVER in included file is shortened to two entries, if $_ENV gets used

2006-05-10 Thread phpbugs at thequod dot de
 ID:   37341
 User updated by:  phpbugs at thequod dot de
-Summary:  $_SERVER in included file is shortened to two entries
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-05-06 (CVS)
 New Comment:

changed summary.. sorry.


Previous Comments:


[2006-05-10 22:17:14] phpbugs at thequod dot de

PHP 5.1.5-dev (cgi-fcgi) (built: May  6 2006 22:18:37)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend 
Technologies



[2006-05-10 22:16:28] phpbugs at thequod dot de

To reproduce:
--- SERVER.php ---



--- SERVER.inc.php ---




[2006-05-06 21:27:49] [EMAIL PROTECTED]

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

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

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2006-05-06 20:38:49] phpbugs at thequod dot de

Description:

I've just discovered a nasty bug: in phpMyAdmin's 
index.php gets a file required:
require_once('./libraries/common.lib.php');

Inside this file then, $_SERVER is shortened to just two 
entries: PHP_SELF and REQUEST_TIME (I've added a 
var_dump() at the beginning).

However, var_dump($_SERVER) in index.php before the 
include outputs the whole array.

And additionally, now it is correctly filled in the 
include's var_dump(): Just accessing $_SERVER (through 
var_dump() or $a = $_SERVER) before the include corrects 
it inside the include.

Reproduce code:
---
I could not reproduce it with a small test script, but with phpMyAdmin
2.8.0.3.

I'm using Apache2 and PHP as FastCGI.






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


#37341 [Opn]: $_SERVER in included file is shortened to two entries

2006-05-10 Thread phpbugs at thequod dot de
 ID:   37341
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-05-06 (CVS)
 New Comment:

PHP 5.1.5-dev (cgi-fcgi) (built: May  6 2006 22:18:37)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend 
Technologies


Previous Comments:


[2006-05-10 22:16:28] phpbugs at thequod dot de

To reproduce:
--- SERVER.php ---



--- SERVER.inc.php ---




[2006-05-06 21:27:49] [EMAIL PROTECTED]

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

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

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2006-05-06 20:38:49] phpbugs at thequod dot de

Description:

I've just discovered a nasty bug: in phpMyAdmin's 
index.php gets a file required:
require_once('./libraries/common.lib.php');

Inside this file then, $_SERVER is shortened to just two 
entries: PHP_SELF and REQUEST_TIME (I've added a 
var_dump() at the beginning).

However, var_dump($_SERVER) in index.php before the 
include outputs the whole array.

And additionally, now it is correctly filled in the 
include's var_dump(): Just accessing $_SERVER (through 
var_dump() or $a = $_SERVER) before the include corrects 
it inside the include.

Reproduce code:
---
I could not reproduce it with a small test script, but with phpMyAdmin
2.8.0.3.

I'm using Apache2 and PHP as FastCGI.






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


#37341 [Fbk->Opn]: $_SERVER in included file is shortened to two entries

2006-05-10 Thread phpbugs at thequod dot de
 ID:   37341
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-05-06 (CVS)
 New Comment:

To reproduce:
--- SERVER.php ---



--- SERVER.inc.php ---



Previous Comments:


[2006-05-06 21:27:49] [EMAIL PROTECTED]

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

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

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2006-05-06 20:38:49] phpbugs at thequod dot de

Description:

I've just discovered a nasty bug: in phpMyAdmin's 
index.php gets a file required:
require_once('./libraries/common.lib.php');

Inside this file then, $_SERVER is shortened to just two 
entries: PHP_SELF and REQUEST_TIME (I've added a 
var_dump() at the beginning).

However, var_dump($_SERVER) in index.php before the 
include outputs the whole array.

And additionally, now it is correctly filled in the 
include's var_dump(): Just accessing $_SERVER (through 
var_dump() or $a = $_SERVER) before the include corrects 
it inside the include.

Reproduce code:
---
I could not reproduce it with a small test script, but with phpMyAdmin
2.8.0.3.

I'm using Apache2 and PHP as FastCGI.






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


#37341 [NEW]: $_SERVER in included file is shortened to two entries

2006-05-06 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2006-05-06 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description:  $_SERVER in included file is shortened to two entries

Description:

I've just discovered a nasty bug: in phpMyAdmin's 
index.php gets a file required:
require_once('./libraries/common.lib.php');

Inside this file then, $_SERVER is shortened to just two 
entries: PHP_SELF and REQUEST_TIME (I've added a 
var_dump() at the beginning).

However, var_dump($_SERVER) in index.php before the 
include outputs the whole array.

And additionally, now it is correctly filled in the 
include's var_dump(): Just accessing $_SERVER (through 
var_dump() or $a = $_SERVER) before the include corrects 
it inside the include.

Reproduce code:
---
I could not reproduce it with a small test script, but with phpMyAdmin
2.8.0.3.

I'm using Apache2 and PHP as FastCGI.


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


#37205 [Fbk->Csd]: Serving binary content/images fails with "comm with server aborted" FastCGI err

2006-05-04 Thread phpbugs at thequod dot de
 ID:   37205
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Closed
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-04-29 (CVS)
 Assigned To:  dmitry
 New Comment:

Sorry, thought I've done this. Thank you!


Previous Comments:


[2006-05-04 07:11:07] [EMAIL PROTECTED]

So close the bug, if it works.



[2006-05-04 04:02:59] phpbugs at thequod dot de

I've just tried current PHP_5_1 CVS again, and it works.

I must have messed up the last time, without using my 
usual configure options.

Thank you.



[2006-05-03 17:42:11] phpbugs at thequod dot de

I've just tried current CVS again, which includes some 
fixes for FastCGI, but now the simple php script mentioned 
above just times out!

Error log:

FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
idle timeout (60 sec)
FastCGI: incomplete headers (0 bytes) received from 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter"

--------

[2006-05-02 17:57:16] phpbugs at thequod dot de

The problem only appears with a minimum of content in the 
page.

Therefor I've added "displaying 1 numbers" to the test 
script, without this, it does not happen.

Also the point of failure goes more backward (displays 
more numbers), if you add additional whitespace (\n) 
between them.

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

[2006-05-01 17:43:03] phpbugs at thequod dot de

There's no difference. In fact, no relevant file seems to 
have changed in the snapshot.

I've tried it though:
You can test it yourself on 
http://codeprobe.de/test/POST.php, where I've put the 
reproduce-script from above.



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

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


#37205 [Opn]: Serving binary content/images fails with "comm with server aborted" FastCGI err

2006-05-03 Thread phpbugs at thequod dot de
 ID:   37205
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-04-29 (CVS)
 Assigned To:  dmitry
 New Comment:

I've just tried current PHP_5_1 CVS again, and it works.

I must have messed up the last time, without using my 
usual configure options.

Thank you.


Previous Comments:


[2006-05-03 17:42:11] phpbugs at thequod dot de

I've just tried current CVS again, which includes some 
fixes for FastCGI, but now the simple php script mentioned 
above just times out!

Error log:

FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
idle timeout (60 sec)
FastCGI: incomplete headers (0 bytes) received from 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter"

----

[2006-05-02 17:57:16] phpbugs at thequod dot de

The problem only appears with a minimum of content in the 
page.

Therefor I've added "displaying 1 numbers" to the test 
script, without this, it does not happen.

Also the point of failure goes more backward (displays 
more numbers), if you add additional whitespace (\n) 
between them.

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

[2006-05-01 17:43:03] phpbugs at thequod dot de

There's no difference. In fact, no relevant file seems to 
have changed in the snapshot.

I've tried it though:
You can test it yourself on 
http://codeprobe.de/test/POST.php, where I've put the 
reproduce-script from above.



[2006-05-01 15:07:15] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



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

[2006-04-29 17:40:33] phpbugs at thequod dot de

The current error in the Apache error log is:

(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
read failed, referer: http://XXX

Sorry, I probably should have created a new bug for it.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/37205

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


#37205 [Opn]: Serving binary content/images fails with "comm with server aborted" FastCGI err

2006-05-03 Thread phpbugs at thequod dot de
 ID:   37205
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-04-29 (CVS)
 Assigned To:  dmitry
 New Comment:

I've just tried current CVS again, which includes some 
fixes for FastCGI, but now the simple php script mentioned 
above just times out!

Error log:

FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
idle timeout (60 sec)
FastCGI: incomplete headers (0 bytes) received from 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter"


Previous Comments:
----

[2006-05-02 17:57:16] phpbugs at thequod dot de

The problem only appears with a minimum of content in the 
page.

Therefor I've added "displaying 1 numbers" to the test 
script, without this, it does not happen.

Also the point of failure goes more backward (displays 
more numbers), if you add additional whitespace (\n) 
between them.

--------

[2006-05-01 17:43:03] phpbugs at thequod dot de

There's no difference. In fact, no relevant file seems to 
have changed in the snapshot.

I've tried it though:
You can test it yourself on 
http://codeprobe.de/test/POST.php, where I've put the 
reproduce-script from above.



[2006-05-01 15:07:15] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



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

[2006-04-29 17:40:33] phpbugs at thequod dot de

The current error in the Apache error log is:

(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
read failed, referer: http://XXX

Sorry, I probably should have created a new bug for it.

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

[2006-04-29 16:15:12] phpbugs at thequod dot de

Thank you. It's fixed indeed for those cases, but I just 
experienced a similar problem, when POSTing to any page 
I've found.

It outputs the following at the end of the generated HTML:

Erlaube 
angepasste CSS Datei fr Blogs:


200 OK

OK
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
 [EMAIL PROTECTED] and inform them of the time the 
error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.

Apache/2.0.54 (Ubuntu) mod_chroot/0.5 DAV/2 
mod_fastcgi/2.4.2 mod_jk2/2.0.4 mod_ssl/2.0.54 
OpenSSL/0.9.7g Server at www.hahler.de Port 443



It can be reproduced here with this script:
---








---

I'm using the latest CVS tag here (with your "real fix").



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

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


#37205 [Opn]: Serving binary content/images fails with "comm with server aborted" FastCGI err

2006-05-02 Thread phpbugs at thequod dot de
 ID:   37205
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-04-29 (CVS)
 Assigned To:  dmitry
 New Comment:

The problem only appears with a minimum of content in the 
page.

Therefor I've added "displaying 1 numbers" to the test 
script, without this, it does not happen.

Also the point of failure goes more backward (displays 
more numbers), if you add additional whitespace (\n) 
between them.


Previous Comments:


[2006-05-01 17:43:03] phpbugs at thequod dot de

There's no difference. In fact, no relevant file seems to 
have changed in the snapshot.

I've tried it though:
You can test it yourself on 
http://codeprobe.de/test/POST.php, where I've put the 
reproduce-script from above.



[2006-05-01 15:07:15] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



----

[2006-04-29 17:40:33] phpbugs at thequod dot de

The current error in the Apache error log is:

(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
read failed, referer: http://XXX

Sorry, I probably should have created a new bug for it.

--------

[2006-04-29 16:15:12] phpbugs at thequod dot de

Thank you. It's fixed indeed for those cases, but I just 
experienced a similar problem, when POSTing to any page 
I've found.

It outputs the following at the end of the generated HTML:

Erlaube 
angepasste CSS Datei fr Blogs:


200 OK

OK
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
 [EMAIL PROTECTED] and inform them of the time the 
error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.

Apache/2.0.54 (Ubuntu) mod_chroot/0.5 DAV/2 
mod_fastcgi/2.4.2 mod_jk2/2.0.4 mod_ssl/2.0.54 
OpenSSL/0.9.7g Server at www.hahler.de Port 443



It can be reproduced here with this script:
---








---

I'm using the latest CVS tag here (with your "real fix").



[2006-04-26 11:09:26] [EMAIL PROTECTED]

Fixed in CVS HEAD and PHP_5_1.



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

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


#37205 [Fbk->Opn]: Serving binary content/images fails with "comm with server aborted" FastCGI err

2006-05-01 Thread phpbugs at thequod dot de
 ID:   37205
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-04-29 (CVS)
 Assigned To:  dmitry
 New Comment:

There's no difference. In fact, no relevant file seems to 
have changed in the snapshot.

I've tried it though:
You can test it yourself on 
http://codeprobe.de/test/POST.php, where I've put the 
reproduce-script from above.


Previous Comments:


[2006-05-01 15:07:15] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-04-29 17:40:33] phpbugs at thequod dot de

The current error in the Apache error log is:

(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
read failed, referer: http://XXX

Sorry, I probably should have created a new bug for it.

----

[2006-04-29 16:15:12] phpbugs at thequod dot de

Thank you. It's fixed indeed for those cases, but I just 
experienced a similar problem, when POSTing to any page 
I've found.

It outputs the following at the end of the generated HTML:

Erlaube 
angepasste CSS Datei fr Blogs:


200 OK

OK
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
 [EMAIL PROTECTED] and inform them of the time the 
error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.

Apache/2.0.54 (Ubuntu) mod_chroot/0.5 DAV/2 
mod_fastcgi/2.4.2 mod_jk2/2.0.4 mod_ssl/2.0.54 
OpenSSL/0.9.7g Server at www.hahler.de Port 443



It can be reproduced here with this script:
---








---

I'm using the latest CVS tag here (with your "real fix").



[2006-04-26 11:09:26] [EMAIL PROTECTED]

Fixed in CVS HEAD and PHP_5_1.

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

[2006-04-26 01:39:28] phpbugs at thequod dot de

fixed summary



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

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


#37205 [Csd->Opn]: Serving binary content/images fails with "comm with server aborted" FastCGI err

2006-04-29 Thread phpbugs at thequod dot de
 ID:   37205
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Closed
+Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
-PHP Version:  5CVS-2006-04-26 (CVS)
+PHP Version:  5CVS-2006-04-29 (CVS)
 Assigned To:  dmitry
 New Comment:

The current error in the Apache error log is:

(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/XXX/php5-fcgi-starter" aborted: 
read failed, referer: http://XXX

Sorry, I probably should have created a new bug for it.


Previous Comments:


[2006-04-29 16:15:12] phpbugs at thequod dot de

Thank you. It's fixed indeed for those cases, but I just 
experienced a similar problem, when POSTing to any page 
I've found.

It outputs the following at the end of the generated HTML:

Erlaube 
angepasste CSS Datei fr Blogs:


200 OK

OK
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
 [EMAIL PROTECTED] and inform them of the time the 
error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.

Apache/2.0.54 (Ubuntu) mod_chroot/0.5 DAV/2 
mod_fastcgi/2.4.2 mod_jk2/2.0.4 mod_ssl/2.0.54 
OpenSSL/0.9.7g Server at www.hahler.de Port 443



It can be reproduced here with this script:
---








---

I'm using the latest CVS tag here (with your "real fix").



[2006-04-26 11:09:26] [EMAIL PROTECTED]

Fixed in CVS HEAD and PHP_5_1.

--------

[2006-04-26 01:39:28] phpbugs at thequod dot de

fixed summary

--------

[2006-04-26 01:37:18] phpbugs at thequod dot de

Description:

I've just tested PHP 5.1.3RC4-dev (cgi-fcgi) (built: Apr 
26 2006 01:25:05).

The problem I've found seems to be related to:
 - Reimplemented FastCGI interface. (Dmitry)

If I serve a binary file (image) through PHP, the 
communication with the fastcgi server gets broken.



Reproduce code:
---
http://www.salonmarcharris.com/images/newburyhome.gif' );
?>

or

http://www.hahler.de/skins/blueyed/img/hahler/powl.jpg' );
?>


This is my fastcgi startup script:
#!/bin/sh
PHPRC="/XXX/webXXX/conf/php5"
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
exec /bin/php51_CVS-fcgi


This is how the server gets configured in
/etc/apache2/mods-enabled/fastcgi.conf:
FastCgiServer /XXX/fcgi-scripts/webXXX/php5-fcgi-starter -user webXXX
-group webXXX -pass-header HTTP_AUTHORIZATION -flush -idle-timeout 60

I've installed libapache2-mod-fastcgi 2.4.2-6 (Ubuntu Breezy).

Expected result:

Only the binary (image) data, without the "attached" "The 
server encountered an internal error or misconfiguration 
and was unable to complete your request." error message.

Actual result:
--
Binary data from the image and then the internal server 
error.

These are errors from the error log:
[Wed Apr 26 03:16:46 2006] [error] [client 83.135.205.222] 
FastCGI: comm with 
server "/XXX/fcgi-scripts/webXXX/php5-fcgi-starter" 
aborted: protocol error: invalid version: 152 != 
FCGI_VERSION(1)
(with the first URL provided above)
or

[Wed Apr 26 03:21:15 2006] [error] [client 83.135.205.222] 
(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/webXXX/php5-fcgi-starter" 
aborted: read failed
(with the second URL provided above)


-
My .configure:
./configure \
--prefix=/home/XXX/make/php5 \
--with-config-file-path=/etc/php5 \
--with-pear=/XXX/lib/php5 \
--enable-calendar \
--enable-exif \
--enable-fastcgi \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin






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


#37205 [Csd]: Serving binary content/images fails with "comm with server aborted" FastCGI err

2006-04-29 Thread phpbugs at thequod dot de
 ID:   37205
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Closed
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-04-26 (CVS)
 Assigned To:  dmitry
 New Comment:

Thank you. It's fixed indeed for those cases, but I just 
experienced a similar problem, when POSTing to any page 
I've found.

It outputs the following at the end of the generated HTML:

Erlaube 
angepasste CSS Datei fr Blogs:


200 OK

OK
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
 [EMAIL PROTECTED] and inform them of the time the 
error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.

Apache/2.0.54 (Ubuntu) mod_chroot/0.5 DAV/2 
mod_fastcgi/2.4.2 mod_jk2/2.0.4 mod_ssl/2.0.54 
OpenSSL/0.9.7g Server at www.hahler.de Port 443



It can be reproduced here with this script:
---








---

I'm using the latest CVS tag here (with your "real fix").


Previous Comments:


[2006-04-26 11:09:26] [EMAIL PROTECTED]

Fixed in CVS HEAD and PHP_5_1.

----

[2006-04-26 01:39:28] phpbugs at thequod dot de

fixed summary

----

[2006-04-26 01:37:18] phpbugs at thequod dot de

Description:

I've just tested PHP 5.1.3RC4-dev (cgi-fcgi) (built: Apr 
26 2006 01:25:05).

The problem I've found seems to be related to:
 - Reimplemented FastCGI interface. (Dmitry)

If I serve a binary file (image) through PHP, the 
communication with the fastcgi server gets broken.



Reproduce code:
---
http://www.salonmarcharris.com/images/newburyhome.gif' );
?>

or

http://www.hahler.de/skins/blueyed/img/hahler/powl.jpg' );
?>


This is my fastcgi startup script:
#!/bin/sh
PHPRC="/XXX/webXXX/conf/php5"
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
exec /bin/php51_CVS-fcgi


This is how the server gets configured in
/etc/apache2/mods-enabled/fastcgi.conf:
FastCgiServer /XXX/fcgi-scripts/webXXX/php5-fcgi-starter -user webXXX
-group webXXX -pass-header HTTP_AUTHORIZATION -flush -idle-timeout 60

I've installed libapache2-mod-fastcgi 2.4.2-6 (Ubuntu Breezy).

Expected result:

Only the binary (image) data, without the "attached" "The 
server encountered an internal error or misconfiguration 
and was unable to complete your request." error message.

Actual result:
--
Binary data from the image and then the internal server 
error.

These are errors from the error log:
[Wed Apr 26 03:16:46 2006] [error] [client 83.135.205.222] 
FastCGI: comm with 
server "/XXX/fcgi-scripts/webXXX/php5-fcgi-starter" 
aborted: protocol error: invalid version: 152 != 
FCGI_VERSION(1)
(with the first URL provided above)
or

[Wed Apr 26 03:21:15 2006] [error] [client 83.135.205.222] 
(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/webXXX/php5-fcgi-starter" 
aborted: read failed
(with the second URL provided above)


-
My .configure:
./configure \
--prefix=/home/XXX/make/php5 \
--with-config-file-path=/etc/php5 \
--with-pear=/XXX/lib/php5 \
--enable-calendar \
--enable-exif \
--enable-fastcgi \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin






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


#37240 [Opn]: doc_root causes CGI to fail with "No input file specified." error

2006-04-28 Thread phpbugs at thequod dot de
 ID:   37240
 User updated by:  phpbugs at thequod dot de
-Summary:  doc_root causes FastCGI to fail with "No input file
   specified." error
 Reported By:      phpbugs at thequod dot de
 Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  4CVS-2006-04-29 (CVS)
 New Comment:

Correction: it also fails with PHP5.1.3-CVS, BUT only if 
the doc_root option is set to somewhere below Apache's 
DocumentRoot!

It does not fail for
doc_root = /var/www/host/public_html/
but
doc_root = /var/www/host/


Previous Comments:


[2006-04-29 00:52:31] phpbugs at thequod dot de

Description:

If doc_root gets enabled with PHP 4.4.3-dev (cgi) (built: 
Apr 29 2006 02:13:25) it causes an "No input file 
specified." error.

I've tried it with "--enable-discard-path", after first 
experiencing this error, but the result was the same as 
without this configure option.

It fails on URLs like 
http://demo.b2evolution.net/HEAD.4/blogs/index.php?blog=2 
(I've removed the doc_root option, so it won't fail there 
anymore), but strangely not on 
http://demo.b2evolution.net/phpinfo.4 !

The last (working) URL gets rewritten to /content.php4 
internally (.htaccess):
RewriteRule ^phpinfo(?:\.(4))?/?$ /content.php$2/$1 [L]

The first (non-working) URL gets not rewritten, but is 
a "plain" existing file.

NOTE: I'm using a chroot (with Apache's mod_chroot) and 
therefor also have a recursive symlink "/XXX" in the 
chroot "/XXX" itself - _maybe_ that could cause this.

The problem does not appear with 5.1.3-cvs.

Reproduce code:
---
doc_root set in php.ini to the same as DocumentRoot in Apache 2.

My configure:

./configure \
--prefix=/XXX/make/php4 \
--with-config-file-path=/etc/php4 \
--with-pear=/XXX/lib/php4 \
--enable-calendar \
--enable-exif \
--enable-fastcgi \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-jpeg-6b \
--with-jpeg-dir \
--with-ldap \
--with-ldap-sasl \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--without-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin


I've also tried --enable-discard-path (which is not recommened for
fastcgi (in README.FastCGI), because of some hint in a "bogus" bug
report, with the same result.


The problem is probably in "sapi/cgi/cgi_main.c". 
I'd like to help debug this, but would need a hint, where to start.


Expected result:

Page gets parsed by PHP.

Actual result:
--
"No input file specified." error gets thrown.





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


#37240 [NEW]: doc_root causes FastCGI to fail with "No input file specified." error

2006-04-28 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  4CVS-2006-04-29 (CVS)
PHP Bug Type: CGI related
Bug description:  doc_root causes FastCGI to fail with "No input file 
specified." error

Description:

If doc_root gets enabled with PHP 4.4.3-dev (cgi) (built: 
Apr 29 2006 02:13:25) it causes an "No input file 
specified." error.

I've tried it with "--enable-discard-path", after first 
experiencing this error, but the result was the same as 
without this configure option.

It fails on URLs like 
http://demo.b2evolution.net/HEAD.4/blogs/index.php?blog=2 
(I've removed the doc_root option, so it won't fail there 
anymore), but strangely not on 
http://demo.b2evolution.net/phpinfo.4 !

The last (working) URL gets rewritten to /content.php4 
internally (.htaccess):
RewriteRule ^phpinfo(?:\.(4))?/?$ /content.php$2/$1 [L]

The first (non-working) URL gets not rewritten, but is 
a "plain" existing file.

NOTE: I'm using a chroot (with Apache's mod_chroot) and 
therefor also have a recursive symlink "/XXX" in the 
chroot "/XXX" itself - _maybe_ that could cause this.

The problem does not appear with 5.1.3-cvs.

Reproduce code:
---
doc_root set in php.ini to the same as DocumentRoot in Apache 2.

My configure:

./configure \
--prefix=/XXX/make/php4 \
--with-config-file-path=/etc/php4 \
--with-pear=/XXX/lib/php4 \
--enable-calendar \
--enable-exif \
--enable-fastcgi \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-jpeg-6b \
--with-jpeg-dir \
--with-ldap \
--with-ldap-sasl \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--without-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin


I've also tried --enable-discard-path (which is not recommened for fastcgi
(in README.FastCGI), because of some hint in a "bogus" bug report, with the
same result.


The problem is probably in "sapi/cgi/cgi_main.c". 
I'd like to help debug this, but would need a hint, where to start.


Expected result:

Page gets parsed by PHP.

Actual result:
--
"No input file specified." error gets thrown.

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


#37205 [Opn]: Serving binary content/images fails with "comm with server aborted" FastCGI err

2006-04-25 Thread phpbugs at thequod dot de
 ID:   37205
 User updated by:  phpbugs at thequod dot de
-Summary:  Serving binary content (images) fails to "comm with
   server aborted" FastCGI err
 Reported By:      phpbugs at thequod dot de
 Status:   Open
 Bug Type: CGI related
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-04-26 (CVS)
 New Comment:

fixed summary


Previous Comments:


[2006-04-26 01:37:18] phpbugs at thequod dot de

Description:

I've just tested PHP 5.1.3RC4-dev (cgi-fcgi) (built: Apr 
26 2006 01:25:05).

The problem I've found seems to be related to:
 - Reimplemented FastCGI interface. (Dmitry)

If I serve a binary file (image) through PHP, the 
communication with the fastcgi server gets broken.



Reproduce code:
---
http://www.salonmarcharris.com/images/newburyhome.gif' );
?>

or

http://www.hahler.de/skins/blueyed/img/hahler/powl.jpg' );
?>


This is my fastcgi startup script:
#!/bin/sh
PHPRC="/XXX/webXXX/conf/php5"
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
exec /bin/php51_CVS-fcgi


This is how the server gets configured in
/etc/apache2/mods-enabled/fastcgi.conf:
FastCgiServer /XXX/fcgi-scripts/webXXX/php5-fcgi-starter -user webXXX
-group webXXX -pass-header HTTP_AUTHORIZATION -flush -idle-timeout 60

I've installed libapache2-mod-fastcgi 2.4.2-6 (Ubuntu Breezy).

Expected result:

Only the binary (image) data, without the "attached" "The 
server encountered an internal error or misconfiguration 
and was unable to complete your request." error message.

Actual result:
--
Binary data from the image and then the internal server 
error.

These are errors from the error log:
[Wed Apr 26 03:16:46 2006] [error] [client 83.135.205.222] 
FastCGI: comm with 
server "/XXX/fcgi-scripts/webXXX/php5-fcgi-starter" 
aborted: protocol error: invalid version: 152 != 
FCGI_VERSION(1)
(with the first URL provided above)
or

[Wed Apr 26 03:21:15 2006] [error] [client 83.135.205.222] 
(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/webXXX/php5-fcgi-starter" 
aborted: read failed
(with the second URL provided above)


-
My .configure:
./configure \
--prefix=/home/XXX/make/php5 \
--with-config-file-path=/etc/php5 \
--with-pear=/XXX/lib/php5 \
--enable-calendar \
--enable-exif \
--enable-fastcgi \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin






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


#37205 [NEW]: Serving binary content (images) fails to "comm with server aborted" FastCGI err

2006-04-25 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:  5CVS-2006-04-26 (CVS)
PHP Bug Type: CGI related
Bug description:  Serving binary content (images) fails to "comm with server 
aborted" FastCGI err

Description:

I've just tested PHP 5.1.3RC4-dev (cgi-fcgi) (built: Apr 
26 2006 01:25:05).

The problem I've found seems to be related to:
 - Reimplemented FastCGI interface. (Dmitry)

If I serve a binary file (image) through PHP, the 
communication with the fastcgi server gets broken.



Reproduce code:
---
http://www.salonmarcharris.com/images/newburyhome.gif' );
?>

or

http://www.hahler.de/skins/blueyed/img/hahler/powl.jpg' );
?>


This is my fastcgi startup script:
#!/bin/sh
PHPRC="/XXX/webXXX/conf/php5"
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
exec /bin/php51_CVS-fcgi


This is how the server gets configured in
/etc/apache2/mods-enabled/fastcgi.conf:
FastCgiServer /XXX/fcgi-scripts/webXXX/php5-fcgi-starter -user webXXX
-group webXXX -pass-header HTTP_AUTHORIZATION -flush -idle-timeout 60

I've installed libapache2-mod-fastcgi 2.4.2-6 (Ubuntu Breezy).

Expected result:

Only the binary (image) data, without the "attached" "The 
server encountered an internal error or misconfiguration 
and was unable to complete your request." error message.

Actual result:
--
Binary data from the image and then the internal server 
error.

These are errors from the error log:
[Wed Apr 26 03:16:46 2006] [error] [client 83.135.205.222] 
FastCGI: comm with 
server "/XXX/fcgi-scripts/webXXX/php5-fcgi-starter" 
aborted: protocol error: invalid version: 152 != 
FCGI_VERSION(1)
(with the first URL provided above)
or

[Wed Apr 26 03:21:15 2006] [error] [client 83.135.205.222] 
(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/webXXX/php5-fcgi-starter" 
aborted: read failed
(with the second URL provided above)


-
My .configure:
./configure \
--prefix=/home/XXX/make/php5 \
--with-config-file-path=/etc/php5 \
--with-pear=/XXX/lib/php5 \
--enable-calendar \
--enable-exif \
--enable-fastcgi \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin


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


#33728 [Opn]: Allow to include files in php.ini

2006-01-04 Thread phpbugs at thequod dot de
 ID:  33728
 User updated by: phpbugs at thequod dot de
 Reported By: phpbugs at thequod dot de
 Status:  Open
 Bug Type:Feature/Change Request
 PHP Version: 5.0.4
 New Comment:

I don't see what it would help in the situation where you  
want to have a common main php.ini for all vhosts or  
subgroups thereof and just override some values on a  
per-host basis..  
 
--with-config-file-scan-dir would be a static path, 
wouldn't it? 
 
The only solution I could imagine to use 
--with-config-file-scan-dir=\$CONF_PHP so that $CONF_DIR 
could be set in the fastcgi starter/wrapper script. But I 
don't think that it's supposed to work like that. 
 
As it seems, what I'll have to do is write a script that 
scans for files like php_override.ini in the vhost 
directories and merges them into a single php.ini file.


Previous Comments:


[2006-01-04 02:46:52] [EMAIL PROTECTED]

There's already this which can be used to accomplish pretty much same
thing:

  --with-config-file-scan-dir=PATH
  Set the path where to scan for   

   
  configuration files


----

[2005-07-16 20:35:35] phpbugs at thequod dot de

Description:

It would be very helpful in a CGI (or FastCGI) setup to have an include
directive for php.ini that includes a file where the directive occurs.

This way you could have a central php.ini for all virtual hosts and
include this in each virtual host's php.ini.

I know that with mod_php you can put most of the directives into
Apache's VirtualHost directives, but with mod_fastcgi/mod_cgi this is
not possible.






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


#21487 [Com]: gethostbyname can resolve not existing hosts under Windows

2005-12-09 Thread phpbugs at thequod dot de
 ID:   21487
 Comment by:   phpbugs at thequod dot de
 Reported By:  corinl at gmx dot de
 Status:   No Feedback
 Bug Type: Network related
 Operating System: Windows
 PHP Version:  4.3.0
 New Comment:

Using nslookup on the host.. 
 
Is this a DNS issue then? Or should PHP catch this as 
"non-existing"? 
 
I've executed 
 
and it outputs: 
Name:150.250.35.66.list.dsbl.org.happilyhosted.com 
Address:  216.82.79.97


Previous Comments:


[2005-12-09 22:15:43] phpbugs at thequod dot de

 
 
returns: 
 
PHP 4.3.10 
IP: 66.35.250.150 
Domain: slashdot.org 
totallyfake456jh47r.com 
127.0.0.2 
216.82.79.97 
216.82.79.97 
 
All looks fine, exept the last two lines! It returns the 
server's IP address (216.82.79.97) when an entry is not 
listed in dsbl.org.



[2005-12-09 22:09:45] phpbugs at thequod dot de

I've just seen the same problem on PHP 4.3.10/win32: 
 
 
 
returns 
 
string(14) "213.165.64.215" 
string(12) "216.82.79.97" 
string(12) "216.82.79.97" 
 
I'm not the server admin, just troubleshooting it 
remotely.



[2003-01-27 22:33:18] [EMAIL PROTECTED]

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





[2003-01-07 09:48:43] [EMAIL PROTECTED]

It's possible that your DNS is setup with a search domain that has a
wildcard.  I'd like you to try two things:

1) gethostbyname("gms.de5.");  <--- does that return an IP address as
well? (Note the trailing dot)

2) Check your TCP/IP Properties | Advanced Settings | DNS Tab |
describe every single piece of information on this property sheet, give
detail.

Interrestingly there doesn't seem to be a revese lookup for
62.75.134.200...



[2003-01-07 06:56:17] [EMAIL PROTECTED]

With the following script:



Edin can't reproduce the problem under windows.

Can you please try that script? You're saying that host gmx.de5 on the
server reports an error but you're under windows and windows doesn't
have 'host'... Are you sure your DNS is working fine? I'm getting
213.165.65.100 from gmx.de and not 62.75.134.200...

gethostbyname() is also supposed to return the hostname on failure. At
least thats what we (Edin and me) are getting under Windows and
Linux/Unix.

Thank you for your report.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21487

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



#21487 [Com]: gethostbyname can resolve not existing hosts under Windows

2005-12-09 Thread phpbugs at thequod dot de
 ID:   21487
 Comment by:   phpbugs at thequod dot de
 Reported By:  corinl at gmx dot de
 Status:   No Feedback
 Bug Type: Network related
 Operating System: Windows
 PHP Version:  4.3.0
 New Comment:

 
 
returns: 
 
PHP 4.3.10 
IP: 66.35.250.150 
Domain: slashdot.org 
totallyfake456jh47r.com 
127.0.0.2 
216.82.79.97 
216.82.79.97 
 
All looks fine, exept the last two lines! It returns the 
server's IP address (216.82.79.97) when an entry is not 
listed in dsbl.org.


Previous Comments:


[2005-12-09 22:09:45] phpbugs at thequod dot de

I've just seen the same problem on PHP 4.3.10/win32: 
 
 
 
returns 
 
string(14) "213.165.64.215" 
string(12) "216.82.79.97" 
string(12) "216.82.79.97" 
 
I'm not the server admin, just troubleshooting it 
remotely.



[2003-01-27 22:33:18] [EMAIL PROTECTED]

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





[2003-01-07 09:48:43] [EMAIL PROTECTED]

It's possible that your DNS is setup with a search domain that has a
wildcard.  I'd like you to try two things:

1) gethostbyname("gms.de5.");  <--- does that return an IP address as
well? (Note the trailing dot)

2) Check your TCP/IP Properties | Advanced Settings | DNS Tab |
describe every single piece of information on this property sheet, give
detail.

Interrestingly there doesn't seem to be a revese lookup for
62.75.134.200...



[2003-01-07 06:56:17] [EMAIL PROTECTED]

With the following script:



Edin can't reproduce the problem under windows.

Can you please try that script? You're saying that host gmx.de5 on the
server reports an error but you're under windows and windows doesn't
have 'host'... Are you sure your DNS is working fine? I'm getting
213.165.65.100 from gmx.de and not 62.75.134.200...

gethostbyname() is also supposed to return the hostname on failure. At
least thats what we (Edin and me) are getting under Windows and
Linux/Unix.

Thank you for your report.




[2003-01-07 06:51:57] [EMAIL PROTECTED]

Just a note, I can not reproduce the problem under Linux/Unix.



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

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


#21487 [Com]: gethostbyname can resolve not existing hosts under Windows

2005-12-09 Thread phpbugs at thequod dot de
 ID:   21487
 Comment by:   phpbugs at thequod dot de
 Reported By:  corinl at gmx dot de
 Status:   No Feedback
 Bug Type: Network related
 Operating System: Windows
 PHP Version:  4.3.0
 New Comment:

I've just seen the same problem on PHP 4.3.10/win32: 
 
 
 
returns 
 
string(14) "213.165.64.215" 
string(12) "216.82.79.97" 
string(12) "216.82.79.97" 
 
I'm not the server admin, just troubleshooting it 
remotely.


Previous Comments:


[2003-01-27 22:33:18] [EMAIL PROTECTED]

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





[2003-01-07 09:48:43] [EMAIL PROTECTED]

It's possible that your DNS is setup with a search domain that has a
wildcard.  I'd like you to try two things:

1) gethostbyname("gms.de5.");  <--- does that return an IP address as
well? (Note the trailing dot)

2) Check your TCP/IP Properties | Advanced Settings | DNS Tab |
describe every single piece of information on this property sheet, give
detail.

Interrestingly there doesn't seem to be a revese lookup for
62.75.134.200...



[2003-01-07 06:56:17] [EMAIL PROTECTED]

With the following script:



Edin can't reproduce the problem under windows.

Can you please try that script? You're saying that host gmx.de5 on the
server reports an error but you're under windows and windows doesn't
have 'host'... Are you sure your DNS is working fine? I'm getting
213.165.65.100 from gmx.de and not 62.75.134.200...

gethostbyname() is also supposed to return the hostname on failure. At
least thats what we (Edin and me) are getting under Windows and
Linux/Unix.

Thank you for your report.




[2003-01-07 06:51:57] [EMAIL PROTECTED]

Just a note, I can not reproduce the problem under Linux/Unix.



[2003-01-07 06:32:02] corinl at gmx dot de

Hi,

try this:
echo(gethostbyname("gmx.de5"))
output is: 62.75.134.200

in fact, this domain doesn't exist, only gmx.de exists. 
('host gmx.de5' on the server reports an error)
this behavior is bad when for example using getbyhostname to validate
an email address, because an email send to [EMAIL PROTECTED] would surely
not arrive...




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


#33728 [NEW]: Allow to include files in php.ini

2005-07-16 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: 
PHP version:  5.0.4
PHP Bug Type: Feature/Change Request
Bug description:  Allow to include files in php.ini

Description:

It would be very helpful in a CGI (or FastCGI) setup to have an include
directive for php.ini that includes a file where the directive occurs.

This way you could have a central php.ini for all virtual hosts and
include this in each virtual host's php.ini.

I know that with mod_php you can put most of the directives into Apache's
VirtualHost directives, but with mod_fastcgi/mod_cgi this is not possible.


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


#33225 [NEW]: PHP sends multiple Status headers

2005-06-02 Thread phpbugs at thequod dot de
From: phpbugs at thequod dot de
Operating system: 
PHP version:  5.0.4
PHP Bug Type: CGI related
Bug description:  PHP sends multiple Status headers

Description:

Multiple "Status" lines get send when
using "header('Location: url')", which produces an  
additional 302 (REDIRECT) status code.  

This causes FastCGI (at least) to produce a 500 Internal
Server Error:
FastCGI: comm with server "/path/to/fcgi-starter" aborted:
error parsing headers: duplicate header 'status'
  

Documentation
(http://us2.php.net/manual/en/function.header.php) says:
Note:  The HTTP status header line will always be the
first sent to the client [[NOT TRUE! - reproduce: echo  
"" | php5/bin/php-fcgi]],  
regardless of the
actual header() call being the first or not. The status
may be overridden by calling header() with a new status
line at any time unless the HTTP headers have already been
sent [[NOT TRUE! - this bug]].

---
configure (both PHP5 and PHP4):
./configure --enable-memory-limit
--enable-force-cgi-redirect  \
--enable-track-vars --with-pcre-regex --with-mysql
--without-sqlite \
--with-zlib --with-bz2 --enable-mbstring --with-openssl
--enable-exif \
--with-dom=shared --with-ttf=shared --with-gd=shared
--enable-calendar \
--with-iconv --enable-inline-optimization
--enable-gd-native-ttf \
--with-ldap --with-ldap-sasl \
--with-gettext \
--without-mm --enable-fastcgi --prefix=/home/daniel/php5


Reproduce code:
---
$ cat << "?>" | php5/bin/php-fcgi 
http://www.example.org' ); 
?> 


Expected result:

Status: 301  
Content-type: text/html  
X-Powered-By: PHP/5.0.4  
Location: http://www.example.org  
  

Actual result:
--
Status: 302 
Content-type: text/html 
X-Powered-By: PHP/5.0.4 
Status: 301 
Location: http://www.example.org 
 

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