#19292 [Com]: random error: open_basedir restriction in effect. File is in wrong directory

2003-01-09 Thread michal
 ID:   19292
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Critical
 Bug Type: Apache related
 Operating System: linux
 PHP Version:  4.3.0-dev,4.2.3
 New Comment:

If a have one virt. host with safe_mode turned on and the other one
with safe_mode off, the SECOND one (with safe_mode off from default ini
setting) sometimes seems to have safe_mode turned on, until next
reload. When I tried to replace safe_mode with open_basedir
restrictions, this problem was the same one, which is described above.


Previous Comments:


[2003-01-09 04:36:33] [EMAIL PROTECTED]

I wrote regression tests for safe mode recently which trigger this bug
reliably when upgrading to 4.3.0 from 4.2.2 on Apache 2.0.40. In the
Apache config I use: (erring on the side of verbosity)


   php_admin_value safe_mode 1
   php_admin_value safe_mode_exec_dir /bin
   php_admin_value open_basedir /
   php_admin_value display_errors 0
   php_admin_value log_errors 1
   php_admin_value safe_mode_allowed_env_vars FOO_
   php_admin_value safe_mode_protected_env_vars FOO_FEE


Then:
/local/qa/perl-framework/t/htdocs/php/safemode/readfile.php contains:


The server error log gets this output for the script:

PHP Warning:  Unknown(): open_basedir restriction in effect.
File(/local/qa/perl-framework/t/htdocs/php/safemode/readfile.php) is
not within the allowed path(s): (/) in Unknown on line 0
PHP Warning: 
Unknown(/local/qa/perl-framework/t/htdocs/php/safemode/readfile.php):
failed to create stream: Operation not permitted in Unknown on line 0
PHP Warning:  Unknown(): Failed opening
'/local/qa/perl-framework/t/htdocs/php/safemode/readfile.php' for
inclusion (include_path='.:/usr/share/pear') in Unknown on line 0



[2003-01-06 11:29:06] [EMAIL PROTECTED]

Getting totally wrong dir in the output of the error mess

open_basedir restriction in effect. File(index.php) is not within the
allowed path(s): (/home/userB)

Getting this error when surfing to userA which has open_basedir set to
/home/userA in apache virthost, one gets that access to userB home
isn't granted.

This might not be a fault in the open_basedir code, but for some reason
it get's the wrong open_basedir dir from the calling function.

If someone could take a deeper look at this it would be nice, hard to
explain to all customers that this problem is out of our hands to fix.



[2003-01-06 10:33:12] [EMAIL PROTECTED]

Bug confirmed on FreeBSD 4.6 with php 4.3.0. Totally random it  seems.



[2003-01-01 10:11:49] [EMAIL PROTECTED]

i have the same problem after i upgrade from 4.2.2 to 4.3.0(release
version)
pls update bug version No.
it's _NOT_ fixed in php-4.3.0

it seems php may not re-initize correctly
cause there's an un-relative bug: http://bugs.php.net/?id=21306
but i'm just guessing



[2002-11-12 16:06:18] [EMAIL PROTECTED]

Same problem here on FreeBSD 4.7-STABLE + Apache and it's 
really a showstoppper. 
 
PHP is today's 4.3.0-dev snapshot, but a 4.2.3 release had 
the same behavior. 
 
Sometimes the error message reports the open_basedir of 
another unrelated virtualhost. 
 
The problem _never_ showed up on OpenBSD 3.1/3.2 + Zeus + 
PHP 4.2.3 with FastCGI on a very similar setup. 
 
There's definitely an off-by-one or some kind of memory 
corruption somewhere.



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

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




#19292 [Com]: random error: open_basedir restriction in effect. File is in wrong directory

2003-01-09 Thread michal
 ID:   19292
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Critical
 Bug Type: Apache related
 Operating System: linux
 PHP Version:  4.3.0-dev,4.2.3
 New Comment:

I have just tried to EXPLICITLY set "php_admin_flag safe_mode off" to
ALL virtual hosts, which should not be restricted with safe mode and it
seems to help. So the problem is here only when I rely on the default
setting in php.ini file (where I have safe mode off by default) and
when there is AT LEAST one virtual host with safe_mode enabled.


Previous Comments:


[2003-01-09 12:36:48] [EMAIL PROTECTED]

If a have one virt. host with safe_mode turned on and the other one
with safe_mode off, the SECOND one (with safe_mode off from default ini
setting) sometimes seems to have safe_mode turned on, until next
reload. When I tried to replace safe_mode with open_basedir
restrictions, this problem was the same one, which is described above.



[2003-01-09 04:36:33] [EMAIL PROTECTED]

I wrote regression tests for safe mode recently which trigger this bug
reliably when upgrading to 4.3.0 from 4.2.2 on Apache 2.0.40. In the
Apache config I use: (erring on the side of verbosity)


   php_admin_value safe_mode 1
   php_admin_value safe_mode_exec_dir /bin
   php_admin_value open_basedir /
   php_admin_value display_errors 0
   php_admin_value log_errors 1
   php_admin_value safe_mode_allowed_env_vars FOO_
   php_admin_value safe_mode_protected_env_vars FOO_FEE


Then:
/local/qa/perl-framework/t/htdocs/php/safemode/readfile.php contains:


The server error log gets this output for the script:

PHP Warning:  Unknown(): open_basedir restriction in effect.
File(/local/qa/perl-framework/t/htdocs/php/safemode/readfile.php) is
not within the allowed path(s): (/) in Unknown on line 0
PHP Warning: 
Unknown(/local/qa/perl-framework/t/htdocs/php/safemode/readfile.php):
failed to create stream: Operation not permitted in Unknown on line 0
PHP Warning:  Unknown(): Failed opening
'/local/qa/perl-framework/t/htdocs/php/safemode/readfile.php' for
inclusion (include_path='.:/usr/share/pear') in Unknown on line 0



[2003-01-06 11:29:06] [EMAIL PROTECTED]

Getting totally wrong dir in the output of the error mess

open_basedir restriction in effect. File(index.php) is not within the
allowed path(s): (/home/userB)

Getting this error when surfing to userA which has open_basedir set to
/home/userA in apache virthost, one gets that access to userB home
isn't granted.

This might not be a fault in the open_basedir code, but for some reason
it get's the wrong open_basedir dir from the calling function.

If someone could take a deeper look at this it would be nice, hard to
explain to all customers that this problem is out of our hands to fix.



[2003-01-06 10:33:12] [EMAIL PROTECTED]

Bug confirmed on FreeBSD 4.6 with php 4.3.0. Totally random it  seems.



[2003-01-01 10:11:49] [EMAIL PROTECTED]

i have the same problem after i upgrade from 4.2.2 to 4.3.0(release
version)
pls update bug version No.
it's _NOT_ fixed in php-4.3.0

it seems php may not re-initize correctly
cause there's an un-relative bug: http://bugs.php.net/?id=21306
but i'm just guessing



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

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




#20238 [NEW]: file_exists, is_readable

2002-11-04 Thread michal
From: [EMAIL PROTECTED]
Operating system: Redhat 7.3
PHP version:  4.2.3
PHP Bug Type: Apache2 related
Bug description:  file_exists, is_readable

Hello.

I have upgraded from Apache 1.3.26 to Apache 2.0.40 and PHP from 4.1.2 to
PHP 4.2.3

I Have problem with functions is_readable(), file_exists ...

Can you tell me where the problem is?

That functions returning: '' (null)

Thank you for your answer.

Michal Vrabel.
-- 
Edit bug report at http://bugs.php.net/?id=20238&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20238&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=20238&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=20238&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20238&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=20238&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=20238&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=20238&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=20238&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=20238&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=20238&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20238&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=20238&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=20238&r=isapi




#20241 [NEW]: cron php

2002-11-04 Thread michal
 -
mysql_fetch_assoc in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fetch_object in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_data_seek in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fetch_lengths in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fetch_field in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_seek in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_free_result in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_name in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_table in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_len in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_type in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_field_flags in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_escape_string in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_real_escape_string in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_stat
in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_thread_id in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_client_encoding in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_ping
in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_get_client_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_get_host_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_get_proto_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_get_server_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_info
in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql in
Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fieldname in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fieldtable in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fieldlen in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fieldtype in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_fieldflags in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_selectdb in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_createdb in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_dropdb
in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_freeresult in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_numfields in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_numrows in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_listdbs in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_listtables in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_listfields in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_db_name in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_dbname
in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_tablename in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mysql_table_name in Unknown on line 0
PHP Warning:  mysql:  Unable to register functions, unable to load in
Unknown on line 0


This lines was wrote throught the make install process.

Can you tell me, why that errors are occurred?

Thanky you very much for your help!

Bye. Michal Vrabel.
-- 
Edit bug report at http://bugs.php.net/?id=20241&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20241&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=20241&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=20241&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20241&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=20241&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=20241&r=support
Expe

#20275 [NEW]: Zlib problem

2002-11-06 Thread michal
From: [EMAIL PROTECTED]
Operating system: Redhat 7.3
PHP version:  4CVS-2002-11-06
PHP Bug Type: Zlib Related
Bug description:  Zlib problem

Hello.

I have installed newest STABLE PHP4 and Apache 2.0.40.

I have this problem with Zlib version 1.0.3 which is included in PHP4
STABLE.

I am using IE 5.5 at Win2k Prof.

When i am try open some gzipped page (.php script) i get unreadable code
(packed code). But only at some pages. Not at all pages. I am reinstall
system and everything is the same. I am not behind the proxy. Can you tell
me, if Zlib 1.0.3 have some bug?
When i have Apache 1.2.26 and PHP 4.1.2 everything was good.
I am dont using global compress. I am active compress in php script by
this lines:

if (strstr($HTTP_USER_AGENT,'compatible') ) {
 if (extension_loaded('zlib') ) {
   ob_start('ob_gzhandler');
 }
}

Thank you.

Michal Vrabel.
-- 
Edit bug report at http://bugs.php.net/?id=20275&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20275&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=20275&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=20275&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20275&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=20275&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=20275&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=20275&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=20275&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=20275&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=20275&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20275&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=20275&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=20275&r=isapi




#20275 [Com]: Zlib problem

2002-11-06 Thread michal
 ID:   20275
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: Zlib Related
 Operating System: Redhat 7.3
 PHP Version:  4CVS-2002-11-06
 New Comment:

Hi.

Sorry. I wrote bad version. I means zlib 1.1.3 which still do that
problem. How can i install zlib 1.1.4. When i compile zlib source
distribution, zlib.so was not compiled. only zlib.a


Thank you.


Previous Comments:


[2002-11-06 08:29:35] [EMAIL PROTECTED]

zlib 1.0.3 is fairly old, considering that the current version is
1.1.4. Upgrade will definately solve @least 1 security vunreability in
zlib and very well may resolve the problem with page compression you
are seeing with PHP.



[2002-11-06 03:15:17] [EMAIL PROTECTED]

Hello.

I have installed newest STABLE PHP4 and Apache 2.0.40.

I have this problem with Zlib version 1.0.3 which is included in PHP4
STABLE.

I am using IE 5.5 at Win2k Prof.

When i am try open some gzipped page (.php script) i get unreadable
code (packed code). But only at some pages. Not at all pages. I am
reinstall system and everything is the same. I am not behind the proxy.
Can you tell me, if Zlib 1.0.3 have some bug?
When i have Apache 1.2.26 and PHP 4.1.2 everything was good.
I am dont using global compress. I am active compress in php script by
this lines:

if (strstr($HTTP_USER_AGENT,'compatible') ) {
 if (extension_loaded('zlib') ) {
   ob_start('ob_gzhandler');
 }
}

Thank you.

Michal Vrabel.




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




#20275 [Com]: Zlib problem

2002-11-06 Thread michal
 ID:   20275
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: Zlib Related
 Operating System: Redhat 7.3
 PHP Version:  4CVS-2002-11-06
 New Comment:

Hello.

I tryed this:

Reinstal PC with Windows 2000 Prof, which includes IE 5.0. In IE 5.0
was the same problem. Then i install SP3 for W2K, IE 5.5 and the
problem was still. My friend with IE 5.x(??) try it too, but he have
the same problem with page, which i cannot open too.
I try open that pages at Netscape 7.0 and everything was ok... But when
i had Apache 1.2.x and PHP 4.1.2 i have no problem. Problem is now,
when i uses Apache 2 and PHP 4.3.0-dev.

Thankx.


Previous Comments:


[2002-11-06 12:55:50] [EMAIL PROTECTED]

You can make libz.so (shared zlib library) by adding -shared flag to
the compile line. However, 1.1.3 is fairly recent, so it should be ok
to use (that's what I have). Have you tried to verify this bug in other
browsers such as Mozilla, IE 6.0, Opera? It may be that you've come
across a quirck in your installation of IE 5.5



[2002-11-06 12:48:24] [EMAIL PROTECTED]

Hi.

Sorry. I wrote bad version. I means zlib 1.1.3 which still do that
problem. How can i install zlib 1.1.4. When i compile zlib source
distribution, zlib.so was not compiled. only zlib.a


Thank you.



[2002-11-06 08:29:35] [EMAIL PROTECTED]

zlib 1.0.3 is fairly old, considering that the current version is
1.1.4. Upgrade will definately solve @least 1 security vunreability in
zlib and very well may resolve the problem with page compression you
are seeing with PHP.



[2002-11-06 03:15:17] [EMAIL PROTECTED]

Hello.

I have installed newest STABLE PHP4 and Apache 2.0.40.

I have this problem with Zlib version 1.0.3 which is included in PHP4
STABLE.

I am using IE 5.5 at Win2k Prof.

When i am try open some gzipped page (.php script) i get unreadable
code (packed code). But only at some pages. Not at all pages. I am
reinstall system and everything is the same. I am not behind the proxy.
Can you tell me, if Zlib 1.0.3 have some bug?
When i have Apache 1.2.26 and PHP 4.1.2 everything was good.
I am dont using global compress. I am active compress in php script by
this lines:

if (strstr($HTTP_USER_AGENT,'compatible') ) {
 if (extension_loaded('zlib') ) {
   ob_start('ob_gzhandler');
 }
}

Thank you.

Michal Vrabel.




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




#20275 [Com]: Zlib problem

2002-11-06 Thread michal
 ID:   20275
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: Zlib Related
 Operating System: Redhat 7.3
 PHP Version:  4CVS-2002-11-06
 New Comment:

Now I compile zlib 1.1.4 and PHP latest STABLE and phpinfo() says that
i have Compiled version 1.1.4 and linked version 1.1.3.

In ./configure of php i wrote . --with-zlib --with-zlib-dir=/usr

zlib i compile ./configure --prefix=/usr -shared

Zlib.so has been compiled but i dont know why PHP writes that linked
version is 1.1.3. What i have to do to have Linked version 1.1.4? 

Thankx.

Michal Vrabel.


Previous Comments:


[2002-11-06 13:03:29] [EMAIL PROTECTED]

Hello.

I tryed this:

Reinstal PC with Windows 2000 Prof, which includes IE 5.0. In IE 5.0
was the same problem. Then i install SP3 for W2K, IE 5.5 and the
problem was still. My friend with IE 5.x(??) try it too, but he have
the same problem with page, which i cannot open too.
I try open that pages at Netscape 7.0 and everything was ok... But when
i had Apache 1.2.x and PHP 4.1.2 i have no problem. Problem is now,
when i uses Apache 2 and PHP 4.3.0-dev.

Thankx.



[2002-11-06 12:55:50] [EMAIL PROTECTED]

You can make libz.so (shared zlib library) by adding -shared flag to
the compile line. However, 1.1.3 is fairly recent, so it should be ok
to use (that's what I have). Have you tried to verify this bug in other
browsers such as Mozilla, IE 6.0, Opera? It may be that you've come
across a quirck in your installation of IE 5.5



[2002-11-06 12:48:24] [EMAIL PROTECTED]

Hi.

Sorry. I wrote bad version. I means zlib 1.1.3 which still do that
problem. How can i install zlib 1.1.4. When i compile zlib source
distribution, zlib.so was not compiled. only zlib.a


Thank you.



[2002-11-06 08:29:35] [EMAIL PROTECTED]

zlib 1.0.3 is fairly old, considering that the current version is
1.1.4. Upgrade will definately solve @least 1 security vunreability in
zlib and very well may resolve the problem with page compression you
are seeing with PHP.



[2002-11-06 03:15:17] [EMAIL PROTECTED]

Hello.

I have installed newest STABLE PHP4 and Apache 2.0.40.

I have this problem with Zlib version 1.0.3 which is included in PHP4
STABLE.

I am using IE 5.5 at Win2k Prof.

When i am try open some gzipped page (.php script) i get unreadable
code (packed code). But only at some pages. Not at all pages. I am
reinstall system and everything is the same. I am not behind the proxy.
Can you tell me, if Zlib 1.0.3 have some bug?
When i have Apache 1.2.26 and PHP 4.1.2 everything was good.
I am dont using global compress. I am active compress in php script by
this lines:

if (strstr($HTTP_USER_AGENT,'compatible') ) {
 if (extension_loaded('zlib') ) {
   ob_start('ob_gzhandler');
 }
}

Thank you.

Michal Vrabel.




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




#20360 [NEW]: On Apache2 file_exists & co are looking in wrong directory

2002-11-11 Thread michal
From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.2.3
PHP Bug Type: Filesystem function related
Bug description:  On Apache2 file_exists & co are looking in wrong directory

PHP functions which map to access() libc function are looking in wrong
directory under Apache2. Simple example:
$FILE = "test.php";
file_exists($FILE);
is_readable($FILE);
fopen($FILE, "r");

produces such output from strace:
access("test.php", F_OK)= -1 ENOENT (No such file or
directory)
access("test.php", R_OK)= -1 ENOENT (No such file or
directory)
open("/home/httpd/html.michal.waw.pl",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 22

Also note that:
[root@woland html.michal.waw.pl]# l /proc/16627/cwd
lrwxrwxrwx1 root root0 11-11 13:57 /proc/16627/cwd ->
/
[root@woland html.michal.waw.pl]#
where 16627 is a PID of httpd process which was traced earlier.
-- 
Edit bug report at http://bugs.php.net/?id=20360&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20360&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=20360&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=20360&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20360&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=20360&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=20360&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=20360&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=20360&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=20360&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=20360&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20360&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=20360&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=20360&r=isapi




#10197 [Com]: magic_quotes_runtime and other magic quotes sometimes are switching on or off.

2003-02-10 Thread michal . grezl
 ID:   10197
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  4.0.4pl1
 New Comment:

PHP Version 4.1.2
magic_quotes_runtime if off in php.ini, 
but function get_magic_quotes_runtime returns 1 or 0 randomly.


Previous Comments:


[2002-01-02 13:53:27] [EMAIL PROTECTED]

No feedback. Closing.



[2001-12-12 04:23:39] [EMAIL PROTECTED]

Type = Scripting Engine Problem
Does this happen with 4.1.0?




[2001-04-06 05:33:38] [EMAIL PROTECTED]

magic_quotes_runtime and other magic quotes sometimes are switching on
or off without any reason. First noticed in 4.0.3pl.
After moving to 4.0.4pl1 seemed to be working ok for 2 weeks.
Now found several situations where magic quotes are unstable in MySQL
Output. 
eg $row->string is "\"test\"" can be output'ed with printf as "test" or
\"test\" with magic_quotes_runtime set to on.

PHP's PHPINFO() is available at http://slackl.emd.ru/~slackl/test.php




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




#22185 [NEW]: problem with creating images

2003-02-12 Thread michal . mikes
From: [EMAIL PROTECTED]
Operating system: WINNT4.0
PHP version:  4.3.0
PHP Bug Type: *Graphics related
Bug description:  problem with creating images

I have a simple script that create image. Everything works right since I
put "session_start()" into the script. Then result isn't short PNG image,
but large BMP image.

MM


-- 
Edit bug report at http://bugs.php.net/?id=22185&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22185&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22185&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22185&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22185&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22185&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22185&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22185&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22185&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22185&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22185&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22185&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22185&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22185&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22185&r=gnused




Bug #15385 Updated: Nested Objects in session crash Both Apache and IIS

2002-02-15 Thread michal . matula

 ID:   15385
 Updated by:   [EMAIL PROTECTED]
-Reported By:  [EMAIL PROTECTED]
+Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Session related
 Operating System: Linux & Win2K
 PHP Version:  4.1.1
 New Comment:

Hi, 

don't know whether it is related but he have a similar problem. We
inicialize a lot of objects with other nested objects in them. After
some number of objects inicialized is reached, the apache child process
crashes with Apache(Linux): child pid x exit signal Segmentation
fault.

It has definitely something to do with objects, their creation or
cleanup as unsetting the object does not help, but not creating the
nested objects does.


Previous Comments:


[2002-02-05 06:59:15] [EMAIL PROTECTED]

Operating Systems: - Linux (with Apache)
   - Win2k (with both Apache and IIS)

I have a script with two object, one that has the reference to the
other. Once the objects are initialized I put them in session before
the parent and then the child.

If I reload the page, accessing the child object and modifying a
property, after 2-3 times I receive a server error on php module.

On IIS:   ACCESS VIOLATION XX
On Apache(Linux): child pid x exit signal Segmentation fault

If I invert the two session_register (registering before the child
object and then the parent), it all works perfectly.

nephew = &$n;
}

function toString() {
if($this->nephew) {
echo "The nephews are " . $this->nephew->name."";
}
else {
echo "No nephews";
}
}
}

session_start();

if(!isset($family)) {
$family = new Family();
$nephew = new Nephew();
$family->setNephew(&$nephew);

session_register('family');
session_register('nephew');
}

$nephew->name .= " - ";
?>




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




Bug #15303 Updated: Error compiling

2002-03-04 Thread michal . grezl

 ID:   15303
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: GD related
 Operating System: rocklinux 1.4
 PHP Version:  4.1.1
 New Comment:

same thing with php version 4.1.2 and gd 1.8.4


Previous Comments:


[2002-02-03 07:09:34] [EMAIL PROTECTED]

that was the wrong message.



[2002-02-03 07:08:53] [EMAIL PROTECTED]

The version of PHP that this bug was reported in is too old. Please
try to reproduce this bug in the latest version of PHP (available
from http://www.php.net/downloads.php

If you are still able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".



[2002-01-30 16:31:10] [EMAIL PROTECTED]

Hello

Dont know if this is a gd or php issus. I downloaded gd to have it to
work
with gd cause i wanted to generate alpha blending images on the fly.
therefore i  choosed the 2.0.1 beta build. When i compile gd everything
is
allright but when i try to compile php i get this error message

gcc -I. -I/usr/src/php-4.1.1/ext/gd -I/usr/src/php-4.1.1/main
-I/usr/src/php
-4.1.1 -I/usr/src/php-4.1.1/Zend
-I/usr/src/php-4.1.1/ext/mysql/libmysql -I/
usr/src/php-4.1.1/ext/xml/expat  -I/usr/src/php-4.1.1/TSRM -g -O2  -c
gd.c
&& touch gd.lo
In file included from /usr/include/gd.h:25,
 from php_gd.h:33,
 from gd.c:36:
/usr/include/gd_io.h:21: undefined or invalid # directive
In file included from gd.c:36:
php_gd.h:69: warning: static declaration for `gdImageColorResolve'
follows
non-static
gd.c:92: conflicting types for `gdIOCtx'
/usr/include/gd_io.h:18: previous declaration of `gdIOCtx'
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/src/php-4.1.1/ext/gd'

The only option i have supplied is ./configure --with-gd
Im using rocklinux 1.4 and have tried to download and install zlib
libpng libjpeg
freetype several times. Whats wrong? Should i send a bugreport to php
or is
this a gd issue?

Thanx for a good software

/Alexander





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




[PHP-BUG] Bug #65445 [NEW]: filesize() fails for files with high inode number

2013-08-13 Thread michal at michal dot waw dot pl
From: michal at michal dot waw dot pl
Operating system: Linux
PHP version:  5.5.1
Package:  Filesystem function related
Bug Type: Bug
Bug description:filesize() fails for files with high inode number

Description:

I have a file for which filesize() can't return value. "stat" result for
this file:

Original file:
  File: 'DSC_5196_fx-1553725666.JPG'
  Size: 1907383 Blocks: 3728   IO Block: 4096   regular file
Device: 803h/2051d  Inode: 5905591363  Links: 1
Access: (0644/-rw-r--r--)  Uid: (   51/http)   Gid: (   51/http)
Access: 2013-08-13 00:47:28.107477918 +0200
Modify: 2013-08-12 21:38:27.219913208 +0200
Change: 2013-08-13 00:47:08.931478654 +0200
 Birth: -

I've made an exact copy, in same dir, same permissions:

Copy:
  File: 'DSC_5196_fx-1553725666_X.JPG'
  Size: 1907383 Blocks: 3728   IO Block: 4096   regular file
Device: 803h/2051d  Inode: 144 Links: 1
Access: (0644/-rw-r--r--)  Uid: (   51/http)   Gid: (   51/http)
Access: 2013-08-13 00:45:48.0 +0200
Modify: 2013-08-12 21:38:27.0 +0200
Change: 2013-08-13 00:47:28.199477914 +0200
 Birth: -

filesize() works for this new file.

I can't find any other difference between these two files.

I checked that filesize() works for files with inode number less or equal
to 4126207367and doesn't work for files with inode number equal or greater
than 4358705632. I didn't find files with inode number in between but I'm
still looking.

To me it seems that filesize() has problem with inode number higher than
2^32.

Test script:
---








Expected result:

I expected to see sizes of both files.

Actual result:
--
Warning: filesize(): stat failed for
/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666.JPG
in /home/services/httpd/html.galeria.michal.waw.pl/gallery3-3.0.x/test.php
on line 13
/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666.JPG:

/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666_X.JPG:
1907383

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



Bug #65445 [Fbk->Opn]: filesize() fails for files with high inode number

2013-08-13 Thread michal at michal dot waw dot pl
Edit report at https://bugs.php.net/bug.php?id=65445&edit=1

 ID: 65445
 User updated by:michal at michal dot waw dot pl
 Reported by:michal at michal dot waw dot pl
 Summary:filesize() fails for files with high inode number
-Status: Feedback
+Status: Open
 Type:   Bug
 Package:Filesystem function related
 Operating System:   Linux
 PHP Version:5.5.1
 Block user comment: N
 Private report: N

 New Comment:

This is 32bit system.

Here is the output:
stat64("DSC_5196_fx-1553725666.JPG", {st_mode=S_IFREG|0644, st_size=1907383, 
...}) = 0
write(1, "\nWarning: filesize(): stat faile"..., 96) = 96

Please tell me if I can help in any way.


Previous Comments:

[2013-08-13 21:02:02] johan...@php.net

Are you using a 32 or 64 it system?
Could you please run the following on command line to see whether the syscall 
for stat succeeds or fails so we can narrow the search:

$ strace php -nr 'filesize("DSC_5196_fx-1553725666.JPG");'

The relevant output is towards the end something like

stat("DSC_5196_fx-1553725666.JPG", 0x7fff38d27f80) = -1 ENOENT (No such file or 
directory)
write(1, "\nWarning: filesize(): stat faile"..., 96

or

stat("DSC_5196_fx-1553725666.JPG", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0

thanks.

--------
[2013-08-13 20:27:21] michal at michal dot waw dot pl

Description:

I have a file for which filesize() can't return value. "stat" result for this 
file:

Original file:
  File: 'DSC_5196_fx-1553725666.JPG'
  Size: 1907383 Blocks: 3728   IO Block: 4096   regular file
Device: 803h/2051d  Inode: 5905591363  Links: 1
Access: (0644/-rw-r--r--)  Uid: (   51/http)   Gid: (   51/http)
Access: 2013-08-13 00:47:28.107477918 +0200
Modify: 2013-08-12 21:38:27.219913208 +0200
Change: 2013-08-13 00:47:08.931478654 +0200
 Birth: -

I've made an exact copy, in same dir, same permissions:

Copy:
  File: 'DSC_5196_fx-1553725666_X.JPG'
  Size: 1907383 Blocks: 3728   IO Block: 4096   regular file
Device: 803h/2051d  Inode: 144 Links: 1
Access: (0644/-rw-r--r--)  Uid: (   51/http)   Gid: (   51/http)
Access: 2013-08-13 00:45:48.0 +0200
Modify: 2013-08-12 21:38:27.0 +0200
Change: 2013-08-13 00:47:28.199477914 +0200
 Birth: -

filesize() works for this new file.

I can't find any other difference between these two files.

I checked that filesize() works for files with inode number less or equal to 
4126207367and doesn't work for files with inode number equal or greater than 
4358705632. I didn't find files with inode number in between but I'm still 
looking.

To me it seems that filesize() has problem with inode number higher than 2^32.

Test script:
---








Expected result:

I expected to see sizes of both files.

Actual result:
--
Warning: filesize(): stat failed for 
/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666.JPG
 in /home/services/httpd/html.galeria.michal.waw.pl/gallery3-3.0.x/test.php on 
line 13
/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666.JPG:
 
/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666_X.JPG:
 1907383






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


Bug #65445 [Com]: filesize() fails for files with high inode number

2013-08-16 Thread michal at michal dot waw dot pl
Edit report at https://bugs.php.net/bug.php?id=65445&edit=1

 ID: 65445
 Comment by: michal at michal dot waw dot pl
 Reported by:michal at michal dot waw dot pl
 Summary:filesize() fails for files with high inode number
 Status: Open
 Type:   Bug
 Package:Filesystem function related
 Operating System:   Linux
 PHP Version:5.5.1
 Block user comment: N
 Private report: N

 New Comment:

It is a problem with stat(2) C function. For files with inode >= 2^32 it 
returns error:

errno: 75 (Value too large for defined data type)


Previous Comments:

[2013-08-13 21:33:24] michal at michal dot waw dot pl

This is 32bit system.

Here is the output:
stat64("DSC_5196_fx-1553725666.JPG", {st_mode=S_IFREG|0644, st_size=1907383, 
...}) = 0
write(1, "\nWarning: filesize(): stat faile"..., 96) = 96

Please tell me if I can help in any way.


[2013-08-13 21:02:02] johan...@php.net

Are you using a 32 or 64 it system?
Could you please run the following on command line to see whether the syscall 
for stat succeeds or fails so we can narrow the search:

$ strace php -nr 'filesize("DSC_5196_fx-1553725666.JPG");'

The relevant output is towards the end something like

stat("DSC_5196_fx-1553725666.JPG", 0x7fff38d27f80) = -1 ENOENT (No such file or 
directory)
write(1, "\nWarning: filesize(): stat faile"..., 96

or

stat("DSC_5196_fx-1553725666.JPG", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0

thanks.

--------
[2013-08-13 20:27:21] michal at michal dot waw dot pl

Description:

I have a file for which filesize() can't return value. "stat" result for this 
file:

Original file:
  File: 'DSC_5196_fx-1553725666.JPG'
  Size: 1907383 Blocks: 3728   IO Block: 4096   regular file
Device: 803h/2051d  Inode: 5905591363  Links: 1
Access: (0644/-rw-r--r--)  Uid: (   51/http)   Gid: (   51/http)
Access: 2013-08-13 00:47:28.107477918 +0200
Modify: 2013-08-12 21:38:27.219913208 +0200
Change: 2013-08-13 00:47:08.931478654 +0200
 Birth: -

I've made an exact copy, in same dir, same permissions:

Copy:
  File: 'DSC_5196_fx-1553725666_X.JPG'
  Size: 1907383 Blocks: 3728   IO Block: 4096   regular file
Device: 803h/2051d  Inode: 144 Links: 1
Access: (0644/-rw-r--r--)  Uid: (   51/http)   Gid: (   51/http)
Access: 2013-08-13 00:45:48.0 +0200
Modify: 2013-08-12 21:38:27.0 +0200
Change: 2013-08-13 00:47:28.199477914 +0200
 Birth: -

filesize() works for this new file.

I can't find any other difference between these two files.

I checked that filesize() works for files with inode number less or equal to 
4126207367and doesn't work for files with inode number equal or greater than 
4358705632. I didn't find files with inode number in between but I'm still 
looking.

To me it seems that filesize() has problem with inode number higher than 2^32.

Test script:
---








Expected result:

I expected to see sizes of both files.

Actual result:
--
Warning: filesize(): stat failed for 
/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666.JPG
 in /home/services/httpd/html.galeria.michal.waw.pl/gallery3-3.0.x/test.php on 
line 13
/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666.JPG:
 
/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666_X.JPG:
 1907383






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


Bug #65445 [Com]: filesize() fails for files with high inode number

2013-08-16 Thread michal at michal dot waw dot pl
Edit report at https://bugs.php.net/bug.php?id=65445&edit=1

 ID: 65445
 Comment by: michal at michal dot waw dot pl
 Reported by:michal at michal dot waw dot pl
 Summary:filesize() fails for files with high inode number
 Status: Open
 Type:   Bug
 Package:Filesystem function related
 Operating System:   Linux
 PHP Version:5.5.1
 Block user comment: N
 Private report: N

 New Comment:

Source of the problem lies in lack of support for files larger than 2GB.

>From what I read in different places enabling LFS in PHP is not possible, as 
>it requires doing so in Apache and many libraries.

The easiest solution for me is to force XFS to not use inode numbers greater 
than 2^32 ("inode32" mount option).

Still I hope one day PHP will have LFS enabled.


Previous Comments:

[2013-08-16 10:52:04] michal at michal dot waw dot pl

It is a problem with stat(2) C function. For files with inode >= 2^32 it 
returns error:

errno: 75 (Value too large for defined data type)


[2013-08-13 21:33:24] michal at michal dot waw dot pl

This is 32bit system.

Here is the output:
stat64("DSC_5196_fx-1553725666.JPG", {st_mode=S_IFREG|0644, st_size=1907383, 
...}) = 0
write(1, "\nWarning: filesize(): stat faile"..., 96) = 96

Please tell me if I can help in any way.


[2013-08-13 21:02:02] johan...@php.net

Are you using a 32 or 64 it system?
Could you please run the following on command line to see whether the syscall 
for stat succeeds or fails so we can narrow the search:

$ strace php -nr 'filesize("DSC_5196_fx-1553725666.JPG");'

The relevant output is towards the end something like

stat("DSC_5196_fx-1553725666.JPG", 0x7fff38d27f80) = -1 ENOENT (No such file or 
directory)
write(1, "\nWarning: filesize(): stat faile"..., 96

or

stat("DSC_5196_fx-1553725666.JPG", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0

thanks.

--------
[2013-08-13 20:27:21] michal at michal dot waw dot pl

Description:

I have a file for which filesize() can't return value. "stat" result for this 
file:

Original file:
  File: 'DSC_5196_fx-1553725666.JPG'
  Size: 1907383 Blocks: 3728   IO Block: 4096   regular file
Device: 803h/2051d  Inode: 5905591363  Links: 1
Access: (0644/-rw-r--r--)  Uid: (   51/http)   Gid: (   51/http)
Access: 2013-08-13 00:47:28.107477918 +0200
Modify: 2013-08-12 21:38:27.219913208 +0200
Change: 2013-08-13 00:47:08.931478654 +0200
 Birth: -

I've made an exact copy, in same dir, same permissions:

Copy:
  File: 'DSC_5196_fx-1553725666_X.JPG'
  Size: 1907383 Blocks: 3728   IO Block: 4096   regular file
Device: 803h/2051d  Inode: 144 Links: 1
Access: (0644/-rw-r--r--)  Uid: (   51/http)   Gid: (   51/http)
Access: 2013-08-13 00:45:48.0 +0200
Modify: 2013-08-12 21:38:27.0 +0200
Change: 2013-08-13 00:47:28.199477914 +0200
 Birth: -

filesize() works for this new file.

I can't find any other difference between these two files.

I checked that filesize() works for files with inode number less or equal to 
4126207367and doesn't work for files with inode number equal or greater than 
4358705632. I didn't find files with inode number in between but I'm still 
looking.

To me it seems that filesize() has problem with inode number higher than 2^32.

Test script:
---








Expected result:

I expected to see sizes of both files.

Actual result:
--
Warning: filesize(): stat failed for 
/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666.JPG
 in /home/services/httpd/html.galeria.michal.waw.pl/gallery3-3.0.x/test.php on 
line 13
/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666.JPG:
 
/home/services/httpd/html.galeria.XXX/gallery/var/albums/988_Rok-2013/333_Rydzewo-04-06.08.2013/Sobota/DSC_5196_fx-1553725666_X.JPG:
 1907383






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


#33637 [NEW]: include fails on parse error

2005-07-10 Thread michal at cihar dot com
From: michal at cihar dot com
Operating system: Linux
PHP version:  4.3.10
PHP Bug Type: Scripting Engine problem
Bug description:  include fails on parse error

Description:

While including file which has a parse error, php stops further
processing. As I understand documentation, this should happen only for
required files. This is also way it worked in previous php versions.

We use such code in phpMyAdmin for including config file, what allows us
to display friendly message when there is some error, however in latest
PHP version user gets just empty page.

Reproduce code:
---
file1.php:


file2.php:


Expected result:

Test

Actual result:
--
empty

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


#33637 [Bgs->Opn]: include fails on parse error

2005-07-10 Thread michal at cihar dot com
 ID:   33637
 User updated by:  michal at cihar dot com
 Reported By:  michal at cihar dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  4.3.10
 New Comment:

I've read the documentation! There is:

"Be warned that parse error in required file doesn't cause processing
halting in PHP versions prior to PHP 4.3.5."

It's about required and not about included files. Please either make
the documentation clear that the same applies to included file or make
interpreter not to fail on this.


Previous Comments:


[2005-07-10 23:49:07] [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

.

----

[2005-07-10 23:39:28] michal at cihar dot com

Description:

While including file which has a parse error, php stops further
processing. As I understand documentation, this should happen only for
required files. This is also way it worked in previous php versions.

We use such code in phpMyAdmin for including config file, what allows
us to display friendly message when there is some error, however in
latest PHP version user gets just empty page.

Reproduce code:
---
file1.php:


file2.php:


Expected result:

Test

Actual result:
--
empty





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


#33637 [Opn]: include fails on parse error

2005-07-10 Thread michal at cihar dot com
 ID:   33637
 User updated by:  michal at cihar dot com
 Reported By:  michal at cihar dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  4.3.10
 New Comment:

Sorry, the quotation was too short, it should have been:

"Be warned that parse error in required file doesn't cause processing
halting in PHP versions prior to PHP 4.3.5. Since this version, it
does."


Previous Comments:


[2005-07-11 00:06:00] michal at cihar dot com

I've read the documentation! There is:

"Be warned that parse error in required file doesn't cause processing
halting in PHP versions prior to PHP 4.3.5."

It's about required and not about included files. Please either make
the documentation clear that the same applies to included file or make
interpreter not to fail on this.



[2005-07-10 23:49:07] [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

.

----

[2005-07-10 23:39:28] michal at cihar dot com

Description:

While including file which has a parse error, php stops further
processing. As I understand documentation, this should happen only for
required files. This is also way it worked in previous php versions.

We use such code in phpMyAdmin for including config file, what allows
us to display friendly message when there is some error, however in
latest PHP version user gets just empty page.

Reproduce code:
---
file1.php:


file2.php:


Expected result:

Test

Actual result:
--
empty





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


#31442 [Opn]: unserialize broken

2005-01-07 Thread michal at cihar dot com
 ID:   31442
 User updated by:  michal at cihar dot com
 Reported By:  michal at cihar dot com
 Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Linux, 64-bit
 PHP Version:  4.3.10
 New Comment:

I haven't found way to attach patches here, so it's available on my
web: http://www.cihar.com/misc/php-unserializer.patch


Previous Comments:


[2005-01-07 16:48:11] michal at cihar dot com

Description:

Unserializing of numbers > MAX_INT is wrong. That's because php uses
long internally for storing ints but int is used in unserializing.
Attached patch fixes this issue.

Reproduce code:
---



Expected result:

2147483648

Actual result:
--
-2147483648





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


#31442 [NEW]: unserialize broken

2005-01-07 Thread michal at cihar dot com
From: michal at cihar dot com
Operating system: Linux, 64-bit
PHP version:  4.3.10
PHP Bug Type: Zend Engine 2 problem
Bug description:  unserialize broken

Description:

Unserializing of numbers > MAX_INT is wrong. That's because php uses long
internally for storing ints but int is used in unserializing. Attached
patch fixes this issue.

Reproduce code:
---



Expected result:

2147483648

Actual result:
--
-2147483648

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


#31442 [Fbk->Opn]: unserialize broken on 64-bit systems

2005-01-08 Thread michal at cihar dot com
 ID:   31442
 User updated by:  michal at cihar dot com
 Reported By:  michal at cihar dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: 64-bit
 PHP Version:  4.3.10, 5.0.3
 Assigned To:  helly
 New Comment:

What kind of tests do fail? I have no idea what could be broken by this
change.


Previous Comments:


[2005-01-08 14:41:01] [EMAIL PROTECTED]

If i apply that patch to a 32 bit machine i get many test errors any
idea? Also it is enough to put the .re diff



[2005-01-07 16:53:10] michal at cihar dot com

I haven't found way to attach patches here, so it's available on my
web: http://www.cihar.com/misc/php-unserializer.patch



[2005-01-07 16:48:11] michal at cihar dot com

Description:

Unserializing of numbers > MAX_INT is wrong. That's because php uses
long internally for storing ints but int is used in unserializing.
Attached patch fixes this issue.

Reproduce code:
---



Expected result:

2147483648

Actual result:
--
-2147483648





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


#31442 [Fbk->Opn]: unserialize broken on 64-bit systems

2005-01-08 Thread michal at cihar dot com
 ID:   31442
 User updated by:  michal at cihar dot com
 Reported By:  michal at cihar dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: 64-bit
 PHP Version:  4.3.10, 5.0.3
 Assigned To:  helly
 New Comment:

I can't reproduce these failures here (php 4.3.10).


Previous Comments:


[2005-01-08 18:39:07] [EMAIL PROTECTED]

php run-tests.php ext/standard/tests/serialize

...

FAILED TEST SUMMARY
-
serialize()/unserialize()/var_dump()
[ext/standard/tests/serialize/001.phpt]
Bug #25378 (unserialize() crashes with invalid data)
[ext/standard/tests/serialize/002.phpt]
Bug #14293 (serialize() and __sleep())
[ext/standard/tests/serialize/bug14293.phpt]
Bug #21957 (serialize() mangles objects with __sleep)
[ext/standard/tests/serialize/bug21957.phpt]
Bug #25378 (unserialize() crashes with invalid data)
[ext/standard/tests/serialize/bug25378.phpt]
Bug #28325 (Problem in serialisation of circular references)
[ext/standard/tests/serialize/bug28325.phpt]



[2005-01-08 18:32:38] michal at cihar dot com

What kind of tests do fail? I have no idea what could be broken by this
change.



[2005-01-08 14:41:01] [EMAIL PROTECTED]

If i apply that patch to a 32 bit machine i get many test errors any
idea? Also it is enough to put the .re diff



[2005-01-07 16:53:10] michal at cihar dot com

I haven't found way to attach patches here, so it's available on my
web: http://www.cihar.com/misc/php-unserializer.patch



[2005-01-07 16:48:11] michal at cihar dot com

Description:

Unserializing of numbers > MAX_INT is wrong. That's because php uses
long internally for storing ints but int is used in unserializing.
Attached patch fixes this issue.

Reproduce code:
---



Expected result:

2147483648

Actual result:
--
-2147483648





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


#28061 [NEW]: Apache crashes upon SIGHUP when PHP module is loaded

2004-04-19 Thread michal at logix dot cz
From: michal at logix dot cz
Operating system: Linux, glibc 2.3.2
PHP version:  4CVS-2004-04-19 (stable)
PHP Bug Type: Apache2 related
Bug description:  Apache crashes upon SIGHUP when PHP module is loaded

Description:

Apache 2.0.49 and PHP 4.3.6 (as well as lates CVS snapshot).

When everything is up and running I remove one of the Apache's logfiles
(e.g. ~www/logs/access_log) and tell Apache to recreate it by calling
"killall -HUP httpd". 

Apache immediately crashes with the following in error_log:

[Mon Apr 19 15:26:08 2004] [notice] SIGHUP received.  Attempting to
restart
[Mon Apr 19 15:26:08 2004] [notice] seg fault or similar nasty error
detected in the parent process

When I disable loading of the PHP module in httpd.conf everything works
just fine. When I downgrade to PHP 4.3.4 it works as well.

Reproduce code:
---
Compile Apache 2.0.49 with 
./configure --prefix=/home/www --enable-http \
--enable-so --enable-usertrack

and PHP 4.3.6 with:
./configure --prefix=/home/www/php \
--with-apxs2=/home/www/bin/apxs

Install and run.

Make any request, remove ~www/logs/access_log and run 
'killall -HUP httpd'

Expected result:

access_log should be recreated

Actual result:
--
This appears in the error_log:

[Mon Apr 19 15:26:08 2004] [notice] SIGHUP received.  Attempting to
restart
[Mon Apr 19 15:26:08 2004] [notice] seg fault or similar nasty error
detected in the parent process

-- 
Edit bug report at http://bugs.php.net/?id=28061&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28061&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28061&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=28061&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=28061&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28061&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=28061&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=28061&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=28061&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=28061&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=28061&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=28061&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=28061&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28061&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=28061&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=28061&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=28061&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28061&r=float


#31442 [Asn]: unserialize broken on 64-bit systems

2005-03-07 Thread michal at cihar dot com
 ID:   31442
 User updated by:  michal at cihar dot com
 Reported By:  michal at cihar dot com
 Status:   Assigned
 Bug Type: Zend Engine 2 problem
 Operating System: 64-bit
 PHP Version:  4.3.10, 5.0.3
 Assigned To:  helly
 New Comment:

The patch works fine also on 5.0.3, I have no idea what could break
tests for you...


Previous Comments:


[2005-01-08 20:00:53] michal at cihar dot com

I can't reproduce these failures here (php 4.3.10).



[2005-01-08 18:39:07] [EMAIL PROTECTED]

php run-tests.php ext/standard/tests/serialize

...

FAILED TEST SUMMARY
-
serialize()/unserialize()/var_dump()
[ext/standard/tests/serialize/001.phpt]
Bug #25378 (unserialize() crashes with invalid data)
[ext/standard/tests/serialize/002.phpt]
Bug #14293 (serialize() and __sleep())
[ext/standard/tests/serialize/bug14293.phpt]
Bug #21957 (serialize() mangles objects with __sleep)
[ext/standard/tests/serialize/bug21957.phpt]
Bug #25378 (unserialize() crashes with invalid data)
[ext/standard/tests/serialize/bug25378.phpt]
Bug #28325 (Problem in serialisation of circular references)
[ext/standard/tests/serialize/bug28325.phpt]



[2005-01-08 18:32:38] michal at cihar dot com

What kind of tests do fail? I have no idea what could be broken by this
change.



[2005-01-08 14:41:01] [EMAIL PROTECTED]

If i apply that patch to a 32 bit machine i get many test errors any
idea? Also it is enough to put the .re diff



[2005-01-07 16:53:10] michal at cihar dot com

I haven't found way to attach patches here, so it's available on my
web: http://www.cihar.com/misc/php-unserializer.patch



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

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


#31442 [Csd]: unserialize broken on 64-bit systems

2005-03-14 Thread michal at cihar dot com
 ID:   31442
 User updated by:  michal at cihar dot com
 Reported By:  michal at cihar dot com
 Status:   Closed
 Bug Type: Zend Engine 2 problem
 Operating System: 64-bit
 PHP Version:  4.3.10, 5.0.3
 Assigned To:  helly
 New Comment:

I haven't yet find time to test this, but you seem to duplicate part of
code with this commit:

if (elements < 0) {
return 0;
}

+   if (elements < 0) {
+   return 0;
+   }
+


Previous Comments:


[2005-03-10 03:01:58] [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.





[2005-03-07 17:42:46] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

This should be fixed since 17. January in CVS



[2005-03-07 15:21:38] michal at cihar dot com

The patch works fine also on 5.0.3, I have no idea what could break
tests for you...



[2005-01-08 20:00:53] michal at cihar dot com

I can't reproduce these failures here (php 4.3.10).



[2005-01-08 18:39:07] [EMAIL PROTECTED]

php run-tests.php ext/standard/tests/serialize

...

FAILED TEST SUMMARY
-
serialize()/unserialize()/var_dump()
[ext/standard/tests/serialize/001.phpt]
Bug #25378 (unserialize() crashes with invalid data)
[ext/standard/tests/serialize/002.phpt]
Bug #14293 (serialize() and __sleep())
[ext/standard/tests/serialize/bug14293.phpt]
Bug #21957 (serialize() mangles objects with __sleep)
[ext/standard/tests/serialize/bug21957.phpt]
Bug #25378 (unserialize() crashes with invalid data)
[ext/standard/tests/serialize/bug25378.phpt]
Bug #28325 (Problem in serialisation of circular references)
[ext/standard/tests/serialize/bug28325.phpt]



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

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


#37621 [NEW]: bind_param goes out of memory with wrong arguments

2006-05-28 Thread michal at logix dot cz
From: michal at logix dot cz
Operating system: Linux
PHP version:  5.1.4
PHP Bug Type: MySQLi related
Bug description:  bind_param goes out of memory with wrong arguments

Description:

When using MySQLi->bind_param() I noticed it will go out of memory when
supplied with wrong arguments, e.g.:

$db->bind_param("sss", $param1, $param2);

Note there are three 's' but only two parameters. This line never returns
in my script and instead the httpd process dies with OOM. Once deleted one
of the 's' it plays well again.

Using Apache 2.0.58, PHP 5.1.4 and MySQL 4.1.10a on SUSE Linux 9.3/x86.

Reproduce code:
---
$query = "SELECT cookie FROM cookies ".
 "WHERE username = ? AND sessionid = ? ".
 "AND expiration > NOW() ORDER BY expiration DESC ".
 "LIMIT 1";
$stmt = $db->prepare($query);
$stmt->bind_param("sss", $username, $sessionid);
[...]

Expected result:

Fail gracefully.

Actual result:
--
Goes out of memory, killing httpd thread.

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


#37621 [Fbk->Opn]: bind_param goes out of memory with wrong arguments

2006-05-29 Thread michal at logix dot cz
 ID:   37621
 User updated by:  michal at logix dot cz
 Reported By:  michal at logix dot cz
-Status:   Feedback
+Status:   Open
 Bug Type: MySQLi related
 Operating System: Linux
 PHP Version:  5.1.4
 Assigned To:  georg
 New Comment:

Cool, gives me a warning now: "Warning: mysqli_stmt::bind_param()
[function.mysqli-stmt-bind-param]: Number of elements in type
definition string doesn't match number of bind variables in
/.../server-mgr.php on line 175"

Thanks for the fix!


Previous Comments:


[2006-05-29 17:02:04] [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-29 01:52:26] michal at logix dot cz

Description:

When using MySQLi->bind_param() I noticed it will go out of memory when
supplied with wrong arguments, e.g.:

$db->bind_param("sss", $param1, $param2);

Note there are three 's' but only two parameters. This line never
returns in my script and instead the httpd process dies with OOM. Once
deleted one of the 's' it plays well again.

Using Apache 2.0.58, PHP 5.1.4 and MySQL 4.1.10a on SUSE Linux 9.3/x86.

Reproduce code:
---
$query = "SELECT cookie FROM cookies ".
 "WHERE username = ? AND sessionid = ? ".
 "AND expiration > NOW() ORDER BY expiration DESC ".
 "LIMIT 1";
$stmt = $db->prepare($query);
$stmt->bind_param("sss", $username, $sessionid);
[...]

Expected result:

Fail gracefully.

Actual result:
--
Goes out of memory, killing httpd thread.





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


[PHP-BUG] Bug #64186 [NEW]: Curly brace syntax not accessing superglobals?

2013-02-10 Thread michal at durooil dot com
From: michal at durooil dot com
Operating system: Windows 7 x64
PHP version:  5.4.11
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Curly brace syntax not accessing superglobals?

Description:

This looks really weird to me.

Test script:
---
// works well
print_r(${'_GET'});

// this not however
// returns notice: "Undefined variable: _GET"
$name = '_GET';
print_r(${$name});


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



#32064 [NEW]: session_regenerate_id doesn't remove old session file

2005-02-22 Thread michal-bcc at logix dot cz
From: michal-bcc at logix dot cz
Operating system: Linux/x86
PHP version:  4.3.8
PHP Bug Type: Session related
Bug description:  session_regenerate_id doesn't remove old session file

Description:

When regenerating session ID with session_regenerate_id() the file with
old ID is kept in the appropriate directory. 

Say that I create a session with session_start() and get ID=abcd. Then
sess_abcd is created.

Later I decide to generate a different ID for whatever reason, call
session_regenerate_id() and get ID=1234. The old file sess_abcd, although
truncated, is still kept in the filesystem. IMO it should be removed at
the time of session_regenerate_id() completion.

Reproduce code:
---


Expected result:

Only a single file sess_ should be in session dir.

Actual result:
--
However both files are still there...

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


[PHP-BUG] Bug #60498 [NEW]: Unset obj.prop. thru ArrayAccess while iterating thru ArrayIterator cause error

2011-12-12 Thread michal dot brzuchalski at gmail dot com
From: 
Operating system: Unix
PHP version:  5.3.8
Package:  SPL related
Bug Type: Bug
Bug description:Unset obj.prop. thru ArrayAccess while iterating thru 
ArrayIterator cause error

Description:

Using foreach to iterate object which implements IteratorAggregate and 
ArrayAccess while iterating with iterator created by ArrayIterator($this)
causes 
error in internal spl_array_update_pos when trying to unset object property
thru 
arrayaccess interface:

debug:

#0  0x000802f9cd2f in spl_array_update_pos (intern=0x80847d778) at 
/usr/ports/lang/php5/work/php-5.3.8/ext/spl/spl_array.c:101
101 intern->pos_h = pos->h;
[New Thread 8016041c0 (LWP 100187/httpd)]
(gdb) bt
#0  0x000802f9cd2f in spl_array_update_pos (intern=0x80847d778) at 
/usr/ports/lang/php5/work/php-5.3.8/ext/spl/spl_array.c:101
#1  0x000802fa00aa in spl_array_next_no_verify (intern=0x80847d778, 
aht=0x8082764a8) at
/usr/ports/lang/php5/work/php-5.3.8/ext/spl/spl_array.c:858
#2  0x000802fa0566 in spl_array_it_move_forward (iter=0x808428330) at 
/usr/ports/lang/php5/work/php-5.3.8/ext/spl/spl_array.c:983
#3  0x000803189a25 in ZEND_FE_FETCH_SPEC_VAR_HANDLER 
(execute_data=0x807a0a268) at zend_vm_execute.h:9014
#4  0x0008031616aa in execute (op_array=0x803af3d00) at 
zend_vm_execute.h:107
#5  0x00080311c307 in zend_call_function (fci=0x7fffcc50, 
fci_cache=0x7fffcc20) at /usr/ports/lang/php5/work/php-
5.3.8/Zend/zend_execute_API.c:968
#6  0x000802fcd3ee in zif_call_user_func (ht=2,
return_value=0x8082bd5d0, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at 
/usr/ports/lang/php5/work/php-5.3.8/ext/standard/basic_functions.c:4772
#7  0x00080316271c in zend_do_fcall_common_helper_SPEC 
(execute_data=0x807a09c48) at zend_vm_execute.h:320
#8  0x0008031636c5 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER 
(execute_data=0x807a09c48) at zend_vm_execute.h:425
#9  0x0008031616aa in execute (op_array=0x807af1c50) at 
zend_vm_execute.h:107
#10 0x00080312de5d in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /usr/ports/lang/php5/work/php-5.3.8/Zend/zend.c:1236
#11 0x0008030ad482 in php_execute_script (primary_file=0x7fffe5a0)
at 
/usr/ports/lang/php5/work/php-5.3.8/main/main.c:2284
#12 0x000803221e45 in php_handler (r=0x803ba40a0) at 
/usr/ports/lang/php5/work/php-5.3.8/sapi/apache2handler/sapi_apache2.c:669
#13 0x0043dd1a in ap_run_handler (r=0x803ba40a0) at config.c:157
#14 0x0043e643 in ap_invoke_handler (r=0x803ba40a0) at
config.c:376
#15 0x0044f9d4 in ap_process_request (r=0x803ba40a0) at 
http_request.c:282
#16 0x0044c7b4 in ap_process_http_connection (c=0x803afa290) at 
http_core.c:190
#17 0x004475aa in ap_run_process_connection (c=0x803afa290) at 
connection.c:43
#18 0x00447a2b in ap_process_connection (c=0x803afa290,
csd=0x803afa0a0) 
at connection.c:190
#19 0x00456d85 in child_main (child_num_arg=37) at prefork.c:667
#20 0x00456f3c in make_child (s=0x80161c708, slot=37) at
prefork.c:768
#21 0x00457629 in ap_mpm_run (_pconf=0x801615028, plog=0x801647028,

s=0x80161c708) at prefork.c:1068
#22 0x0042410b in main (argc=2, argv=0x7fffeb20) at main.c:739
(gdb) bt full


Test script:
---
class obj implements \ArrayAccess , \IteratorAggregate {

public function __construct() {
foreach(array("one" => 1, "two" => 2, "three" => 3) as $offset =>
$value) $this->{$offset} = $value;
}
public function offsetSet($offset, $value) {
$this->{$offset} = $value;
}
public function offsetExists($offset) {
return isset($this->{$offset});
}
public function offsetUnset($offset) {
unset($this->{$offset});
}
public function offsetGet($offset) {
return isset($this->{$offset}) ? $this->{$offset} : null;
}
function getIterator() {
return new \ArrayIterator($this);
}
}

$obj = new obj;

foreach($obj as $offset => $value) unset($obj[$offset]);

print_r($obj);

foreach(get_object_vars($obj) as $offset => $value) unset($obj[$offset]);

print_r($obj);


Expected result:

obj Object
(
)
obj Object
(
)

Actual result:
--
The first foreach cause an internal error second one is ok

-- 
Edit bug report at https://bugs.php.net/bug.php?id=60498&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60498&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60498&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=60498&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60498&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60498&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60498&r=alreadyfixed
Need backtrace:  

Bug #60498 [Opn]: Unset obj.prop. thru ArrayAccess while iterating thru ArrayIterator cause error

2011-12-12 Thread michal dot brzuchalski at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60498&edit=1

 ID: 60498
 User updated by:michal dot brzuchalski at gmail dot com
 Reported by:michal dot brzuchalski at gmail dot com
 Summary:Unset obj.prop. thru ArrayAccess while iterating
 thru ArrayIterator cause error
 Status: Open
 Type:   Bug
 Package:SPL related
-Operating System:   Unix
+Operating System:   FreeBSD
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

Sorry no Unix but FreeBSD


Previous Comments:

[2011-12-12 12:28:18] michal dot brzuchalski at gmail dot com

Description:

Using foreach to iterate object which implements IteratorAggregate and 
ArrayAccess while iterating with iterator created by ArrayIterator($this) 
causes 
error in internal spl_array_update_pos when trying to unset object property 
thru 
arrayaccess interface:

debug:

#0  0x000802f9cd2f in spl_array_update_pos (intern=0x80847d778) at 
/usr/ports/lang/php5/work/php-5.3.8/ext/spl/spl_array.c:101
101 intern->pos_h = pos->h;
[New Thread 8016041c0 (LWP 100187/httpd)]
(gdb) bt
#0  0x000802f9cd2f in spl_array_update_pos (intern=0x80847d778) at 
/usr/ports/lang/php5/work/php-5.3.8/ext/spl/spl_array.c:101
#1  0x000802fa00aa in spl_array_next_no_verify (intern=0x80847d778, 
aht=0x8082764a8) at /usr/ports/lang/php5/work/php-5.3.8/ext/spl/spl_array.c:858
#2  0x000802fa0566 in spl_array_it_move_forward (iter=0x808428330) at 
/usr/ports/lang/php5/work/php-5.3.8/ext/spl/spl_array.c:983
#3  0x000803189a25 in ZEND_FE_FETCH_SPEC_VAR_HANDLER 
(execute_data=0x807a0a268) at zend_vm_execute.h:9014
#4  0x0008031616aa in execute (op_array=0x803af3d00) at 
zend_vm_execute.h:107
#5  0x00080311c307 in zend_call_function (fci=0x7fffcc50, 
fci_cache=0x7fffcc20) at /usr/ports/lang/php5/work/php-
5.3.8/Zend/zend_execute_API.c:968
#6  0x000802fcd3ee in zif_call_user_func (ht=2, return_value=0x8082bd5d0, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at 
/usr/ports/lang/php5/work/php-5.3.8/ext/standard/basic_functions.c:4772
#7  0x00080316271c in zend_do_fcall_common_helper_SPEC 
(execute_data=0x807a09c48) at zend_vm_execute.h:320
#8  0x0008031636c5 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER 
(execute_data=0x807a09c48) at zend_vm_execute.h:425
#9  0x0008031616aa in execute (op_array=0x807af1c50) at 
zend_vm_execute.h:107
#10 0x00080312de5d in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /usr/ports/lang/php5/work/php-5.3.8/Zend/zend.c:1236
#11 0x0008030ad482 in php_execute_script (primary_file=0x7fffe5a0) at 
/usr/ports/lang/php5/work/php-5.3.8/main/main.c:2284
#12 0x000803221e45 in php_handler (r=0x803ba40a0) at 
/usr/ports/lang/php5/work/php-5.3.8/sapi/apache2handler/sapi_apache2.c:669
#13 0x0043dd1a in ap_run_handler (r=0x803ba40a0) at config.c:157
#14 0x0043e643 in ap_invoke_handler (r=0x803ba40a0) at config.c:376
#15 0x0044f9d4 in ap_process_request (r=0x803ba40a0) at 
http_request.c:282
#16 0x0044c7b4 in ap_process_http_connection (c=0x803afa290) at 
http_core.c:190
#17 0x004475aa in ap_run_process_connection (c=0x803afa290) at 
connection.c:43
#18 0x00447a2b in ap_process_connection (c=0x803afa290, 
csd=0x803afa0a0) 
at connection.c:190
#19 0x00456d85 in child_main (child_num_arg=37) at prefork.c:667
#20 0x00456f3c in make_child (s=0x80161c708, slot=37) at prefork.c:768
#21 0x00457629 in ap_mpm_run (_pconf=0x801615028, plog=0x801647028, 
s=0x80161c708) at prefork.c:1068
#22 0x0042410b in main (argc=2, argv=0x7fffeb20) at main.c:739
(gdb) bt full


Test script:
---
class obj implements \ArrayAccess , \IteratorAggregate {

public function __construct() {
foreach(array("one" => 1, "two" => 2, "three" => 3) as $offset => 
$value) $this->{$offset} = $value;
}
public function offsetSet($offset, $value) {
$this->{$offset} = $value;
}
public function offsetExists($offset) {
return isset($this->{$offset});
}
public function offsetUnset($offset) {
unset($this->{$offset});
}
public function offsetGet($offset) {
return isset($this->{$offset}) ? $this->{$offset} : null;
}
function getIterator() {
return new \ArrayIterator($this);
}
}

$obj = new obj;

foreach($obj as $offset => $value) unset($obj[$offset]);

print_r($obj);

foreach(get_object_vars($obj) as $offset => $value) unset($obj[$offset]);

print_r($obj);


Expected result:

obj Object
(
)
obj Object
(
)

Actual result:
--
The first foreach cause an internal error second one is ok


-

#45552 [Com]: Full circle drawn instead of arc with very small angle

2008-08-26 Thread michal dot dziemianko at gmail dot com
 ID:   45552
 Comment by:   michal dot dziemianko at gmail dot com
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: GD related
 Operating System: Linux 2.6.25-gentoo-r6
 PHP Version:  5.2.6
 New Comment:

Hi,
For me it does not seem to be a bug. In the documentation the following
declaration is given:

bool imagefilledarc  ( resource $image  , int $cx  , int $cy  , int
$width  , int $height  , int $start  , int $end  , int $color  , int
$style  )

Your 30.1 is truncated to 30 (conversion to int), then the function is
called with parameters $start=30 and $end =30. 

Please note that start and end values are *angles* at which the arc
starts/ends with respect to 0 degrees. As both start and end are 30 then
it is full circle (drawing starts at 30degrees and goes clockwise all
the way round until 30degrees is hit again). That is behaving as
expected I think. 

Cheers,
Michal


Previous Comments:


[2008-07-18 09:27:07] [EMAIL PROTECTED]

Description:

Instead of a very small arc slice, a full circle is drawn when calling
imagefilledarc with very small angles.

Reproduce code:
---


Expected result:

An image with a very small arc slice.

Actual result:
--
A full circle, like: http://k023.de/imagefilledarc_test.png





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



#38308 [Com]: is_file and file_exists return false for uploaded file

2009-02-17 Thread michal dot kocarek at brainbox dot cz
 ID:   38308
 Comment by:   michal dot kocarek at brainbox dot cz
 Reported By:  fartal at lanbyte dot com
 Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: windows 2000
 PHP Version:  4.4.3
 New Comment:

I experience this bug as well.

- file_exists returns false (error)
- is_uploaded file returns true (good)
- fopen(..., 'r') works as well as file_get_contents (good)

We have PHP 5.2.8 running on IIS 6.0 on Windows 2003 Server.

I can say that before we upgraded from PHP 5.1.x to PHP 5.2.8, this bug
was not there.


Previous Comments:


[2006-08-25 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".



[2006-08-17 14:08:28] tony2...@php.net

Please try using this CVS snapshot:

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





[2006-08-03 09:29:00] fartal at lanbyte dot com

Description:

Hi.
After uploading a file, functions "is_file" and "file_exists" return
false for the temp file

Probably related to "Bug #37118 :is_file returns false for uploaded
file" but getting false also with file_exists

Just upgraded to PHP Version 4.4.2 on Windows 2000 server SP4 from
4.3.11 where I found the same error


Reproduce code:
---






Expected result:

is_file:true
file_exists:true
is_uploaded_file:true

Actual result:
--
is_file:false
file_exists:false
is_uploaded_file:true





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



#37118 [Com]: is_file returns false for uploaded file

2009-02-17 Thread michal dot kocarek at brainbox dot cz
 ID:   37118
 Comment by:   michal dot kocarek at brainbox dot cz
 Reported By:  kimmo dot laine at zarga dot net
 Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: Windows 2003 IIS 6
 PHP Version:  5.1.2
 New Comment:

I experience this bug as well (PHP 5.2.8 running on IIS 6.0 on Windows
2003 Server).

- file_exists returns false (error)
- is_uploaded file returns true (good)
- fopen(..., 'r') works as well as file_get_contents (good)

I can say that before we upgraded from PHP 5.1.x to PHP 5.2.8, this
bug
was not there.

I posted same message to Bug #38308.


Previous Comments:


[2006-08-02 16:04:00] fartal at lanbyte dot com

Same bug found in Windows 2000 server IIS and PHP Version 4.3.11



[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 15:09:26] tony2...@php.net

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-24 06:18:11] kimmo dot laine at zarga dot net

adding var_dump($_FILES['myfile']['tmp_name']); to the code
echoes the following: 

string(27) "C:\WINDOWS\TEMP\phpAC2A.tmp"



[2006-04-22 17:42:51] tony2...@php.net

What do you get if you add var_dump($_FILES['myfile']['tmp_name']); to
your code?



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

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



#47789 [NEW]: Opera file upload - multiple files from one input cannot be handled

2009-03-26 Thread michal dot aichinger at gmail dot com
From: michal dot aichinger at gmail dot com
Operating system: Windows / Linux
PHP version:  5.2.9
PHP Bug Type: *General Issues
Bug description:  Opera file upload - multiple files from one input cannot be 
handled

Description:

Code below makes form with one file input. In Opera and Safari 4 it is
possible select more than one file in this input. If you send this form in
Safari it is in PHP normaly handled like multi file upload (multiple
inputs). Upload from Opera caused empty $_FILES array. 

The diference between this browsers is that Opera use multipart/mixed for
packing files from this input when posting data.

Reproduce code:
---
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="cs" lang="cs">
  
  
  Multiupload
  
  
Multiupload








  



Expected result:

full $_FILES array after sending more files selected in files[] input 
from Opera

Actual result:
--
array is empty

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



#47789 [Bgs]: Opera file upload - multiple files from one input cannot be handled

2009-03-31 Thread michal dot aichinger at gmail dot com
 ID:   47789
 User updated by:  michal dot aichinger at gmail dot com
 Reported By:  michal dot aichinger at gmail dot com
 Status:   Bogus
 Bug Type: *General Issues
 Operating System: Windows / Linux
 PHP Version:  5.2.9
 New Comment:

I am pretty shure that this is bug. PHP does not respect
multipart/mixed  part in POST request and it is clearly a bug. This part
is valid and is made only by Opera in this example.


Previous Comments:


[2009-03-31 07:20:07] j...@php.net

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.





[2009-03-26 14:33:55] michal dot aichinger at gmail dot com

Description:

Code below makes form with one file input. In Opera and Safari 4 it is
possible select more than one file in this input. If you send this form
in Safari it is in PHP normaly handled like multi file upload (multiple
inputs). Upload from Opera caused empty $_FILES array. 

The diference between this browsers is that Opera use multipart/mixed
for packing files from this input when posting data.

Reproduce code:
---
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="cs" lang="cs">
  
  
  Multiupload
  
  
Multiupload








  



Expected result:

full $_FILES array after sending more files selected in files[] input 
from Opera

Actual result:
--
array is empty





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



[PHP-BUG] Bug #52635 [NEW]: shm_put_var resorce destruction

2010-08-18 Thread michal dot zaloudik at gmail dot com
From: 
Operating system: Linux
PHP version:  5.3.3
Package:  Semaphore related
Bug Type: Bug
Bug description:shm_put_var resorce destruction

Description:

I'm putting socket resource or any other resource into shared memory using
shm_put_var and when im using shm_get_var i'm getting (int)0.

Test script:
---
Based on script finded on doc site.





Expected result:

resource(5) of type (stream)

resource(5) of type (stream)

Actual result:
--
resource(5) of type (stream)

int(0)

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



#35793 [Com]: General error: 2050

2006-10-16 Thread michal dot vrchota at seznam dot cz
 ID:   35793
 Comment by:   michal dot vrchota at seznam dot cz
 Reported By:  deadman_great at mail dot ru
 Status:   No Feedback
 Bug Type: PDO related
 Operating System: RH Fedora Core 2
 PHP Version:  5CVS-2005-12-25 (snap)
 Assigned To:  Wez
 New Comment:

I think I have solved this problem:

You have to free your PDOStatement instance

Of course You have to call closeCursor() method to be sure, but if you
have more queries and still using same identifier ($stmt) you have free
it by passing NULL value

Sample:
$stmt->closeCursor();
$stmt = NULL;

// now it works ;)


Previous Comments:


[2006-10-16 14:46:09] andiesPostfach at web dot de

The Problem still exists in PHP 5.2 RC5 !!

System ist SUSE-Linux 9.3
MySQL Version 5.0.18



[2006-08-23 11:14:46] tjerk dot meesters at gmail dot com

This problem still occurs with:
PHP-5.1.5
MySQL-5.0.22
Linux platform

Using PDO::ATTR_EMULATE_PREPARES doesn't resolve the problem, the error
message remains:

SQLSTATE[HY000]: General error: 2050 Row retrieval was canceled by
mysql_stmt_close() call



[2006-08-01 20:52:55] mass at carlsoft dot net

Can we at least change this error message to be more specific, perhaps
suggesting to emulate prepares (as wez @ php . net suggested)? or
better yet make the emulation default?



[2006-05-07 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".



[2006-05-02 14:53:18] email at steffenweber dot net

Upgrading to PHP 5.1.3 and using
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); fixes the problem
for me.



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

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


#39265 [NEW]: The ext/session/mod_files.sh script is faulty (fix included)

2006-10-26 Thread michal dot taborsky at gmail dot com
From: michal dot taborsky at gmail dot com
Operating system: Linux CentOS 4.4
PHP version:  5.1.6
PHP Bug Type: Session related
Bug description:  The ext/session/mod_files.sh script is faulty (fix included)

Description:

The script ext/session/mod_files.sh on our system fails:

[EMAIL PROTECTED] ~]# ./mod_files.sh /tmp/session/ 3 6
expr: syntax error
usage: ./mod_files.sh basedir depth

The reason being this line:

sh $0 $newpath `expr $2 - 1 $3`

It can be fixed easily:

sh $0 $newpath `expr $2 - 1` $3



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


#37783 [NEW]: SOAP call response is not parsed

2006-06-12 Thread michal dot taborsky at gmail dot com
From: michal dot taborsky at gmail dot com
Operating system: CentOS 4.3 x86_64
PHP version:  5.1.4
PHP Bug Type: SOAP related
Bug description:  SOAP call response is not parsed

Description:

The bug was reported and supposedly fixed long time ago as 29844 (and few
more). But I get exactly the same result. The webservice works fine on
other versions (namely 5.0.3) and other servers, but with this one it just
returns NULL, though the __getLastResponse() contains proper response.

Configure options:
'./configure' '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-libdir=lib64' '--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic'
'--disable-rpath' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf'
'--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv'
'--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell'
'--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib'
'--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx'
'--with-pear=/usr/share/pear' '--without-kerberos'
'--enable-ucd-snmp-hack' '--enable-memory-limit' '--enable-shmop'
'--enable-calendar' '--enable-dbx' '--enable-dio'
'--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite'
'--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs'
'--with-mysql' '--with-gd' '--with-dom' '--disable-dba' '--with-pgsql'
'--enable-soap'

Reproduce code:
---
 true,
"exceptions"=>true));
$r=$s->getTokens('aaa','bbb','ccc');
var_dump($r);
} catch (SoapFault $e) {
echo $e;
}
echo $s->__getLastRequest();
echo $s->__getLastResponse();

?>


Expected result:

string(129) "


1
Login incorrect

"

http://schemas.xmlsoap.org/soap/envelope/";>aaabbbccc

http://schemas.xmlsoap.org/soap/envelope/";><?xml
version="1.0"?>
<authorityResponse>
<error>
<code>1</code>
<message>Login incorrect</message>
</error>
</authorityResponse>


Actual result:
--
NULL

http://schemas.xmlsoap.org/soap/envelope/";>aaabbbccc

http://schemas.xmlsoap.org/soap/envelope/";><?xml
version="1.0"?>
<authorityResponse>
<error>
<code>1</code>

<message>Login incorrect</message>
</error>
</authorityResponse>


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


#41304 [NEW]: compress.zlib temp files left

2007-05-06 Thread michal dot albrecht at aster dot pl
From: michal dot albrecht at aster dot pl
Operating system: Linux
PHP version:  5.2.2
PHP Bug Type: Streams related
Bug description:  compress.zlib temp files left

Description:

Using the syntax given below leads to a temp file left in tmp directory.
The file is file.gz with random name like php??
Previous version 5.2.1 seems to be OK.

fopen('compress.zlib://http://www.somedomain.pl/file.gz', 'rb');

Reproduce code:
---
$f = fopen('compress.zlib://http://www.somedomain.pl/file.gz', 'rb');
if ( !$f ) die("Error");
while ( !feof($f) ) {
echo fread($f, 1024);
}
fclose($f);

Expected result:

There shouldn't be any file left in the tmp directory.


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


#36441 [NEW]: php exits script (without error) when finds code like "function xxx(); {}"

2006-02-18 Thread michal dot hantl at gmail dot com
From: michal dot hantl at gmail dot com
Operating system: Windows
PHP version:  5.1.2
PHP Bug Type: Compile Failure
Bug description:  php exits script (without error) when finds code like 
"function xxx(); {}"

Description:

php sort of exits executing this source code without propper parse error
(which php4 reports correctly)

problem is in that ";" after "function whatever()"

Reproduce code:
---
Hello there
 

Expected result:

some parse error

Actual result:
--


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


#34464 [NEW]: require/include problem with loading native .php in UTF8 encoding

2005-09-11 Thread michal dot vrchota at seznam dot cz
From: michal dot vrchota at seznam dot cz
Operating system: -
PHP version:  5.0.5
PHP Bug Type: Directory function related
Bug description:  require/include problem with loading native .php in UTF8 
encoding

Description:

I store "define() dictionary" in .php in native UTF8 encoding
(first 4 bytes represent UTF8 encoding - PHP dont recognize them)

When I use include/include_once/require/require_once

There is a E_WARNING that output already started

I think PHP should be smarter :)

Reproduce code:
---
// fr.php is in native utf-8
require_once("fr.php");

Actual result:
--
Warning: Cannot modify header information - headers already sent by
(output started at d:\wwwroot\hotel4you\html\admin\lang\fr.php:1) in
d:\wwwroot\hotel4you\html\admin\index.php on line 61

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


[PHP-BUG] Bug #54438 [NEW]: use statement overwrite aliased namespace against using multiple

2011-04-01 Thread michal dot brzuchalski at gmail dot com
From: 
Operating system: Linux
PHP version:  5.3.6
Package:  Class/Object related
Bug Type: Bug
Bug description:use statement overwrite aliased namespace against using multiple

Description:

In use statement we can use "," to separate aliased namespaces but the
alias only affect to the last one declared use namespace. It'll be logical
to use all declared namespaces in alias and use
classes/constants/closures/etc. from aliased namespace where they exists.

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



Req #54438 [Bgs]: use statement overwrite aliased namespace against using multiple

2011-04-02 Thread michal dot brzuchalski at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=54438&edit=1

 ID: 54438
 User updated by:michal dot brzuchalski at gmail dot com
 Reported by:michal dot brzuchalski at gmail dot com
 Summary:use statement overwrite aliased namespace against
 using multiple
 Status: Bogus
 Type:   Feature/Change Request
 Package:Class/Object related
 Operating System:   Linux
 PHP Version:5.3.6
 Block user comment: N
 Private report: N

 New Comment:

So why there's no parse error if there can be more than one
class/namespace aliased ?


Previous Comments:

[2011-04-02 19:06:09] fel...@php.net

This is not a bug. It works as expected, an alias cannot be used for
more than one class/namespace/...


[2011-04-01 10:09:34] michal dot brzuchalski at gmail dot com

Description:

In use statement we can use "," to separate aliased namespaces but the
alias only affect to the last one declared use namespace. It'll be
logical to use all declared namespaces in alias and use
classes/constants/closures/etc. from aliased namespace where they
exists.

Test script:
---
http://bugs.php.net/bug.php?id=54438&edit=1


Bug #31994 [Com]: output conversion failed due to conv error

2012-11-26 Thread michal dot vrchota at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=31994&edit=1

 ID: 31994
 Comment by: michal dot vrchota at gmail dot com
 Reported by:misnet at hotmail dot com
 Summary:output conversion failed due to conv error
 Status: No Feedback
 Type:   Bug
 Package:XSLT related
 Operating System:   windows 2003 server
 PHP Version:5CVS-2005-02-25
 Block user comment: N
 Private report: N

 New Comment:

Check if You are not using binary unsafe functions. I was calling substr() 
instead 
of mb_substr() which broke the utf8 encoding.


Previous Comments:

[2007-05-20 17:02:14] bonsite at hotmail dot com

This is not a PHP error. You must use utf8_encode() when you use characters 
like é, ë, ...


[2007-04-26 21:40:36] scott at realorganized dot com

Here's some example code that shows the problem:

createElement("xxx", chr(200));
  $domfather->appendChild($node);
  echo "";
  echo htmlspecialchars($domfather->saveXML());
  $nodelist =  $domfather->getElementsByTagName("xxx");
  $data = $nodelist->item(0)->nodeValue;
  echo $data;
  echo strlen($data);
?>

Character code 200 is an e grave and is a valid iso-8859-1 
character.  The output from my server is below.  When I retrieve 
the node's data back, it is as expected.  But it's the saveXML() 
code that seems to have a problem. I suspect the problem is with 
the utf-8 -> iso-8859 conversion before output.


Warning:  DOMDocument::saveXML() [function.DOMDocument-saveXML]: 
output conversion failed due to conv error in /Library/Tenon/
WebServer/WebSites/realtyjuggler.com/subscription/test.php on line 
23


Warning:  DOMDocument::saveXML() [function.DOMDocument-saveXML]: 
Bytes: 0xC8 0x3C 0x2F 0x78 in /Library/Tenon/WebServer/WebSites/
realtyjuggler.com/subscription/test.php on line 23


È1


[2005-04-17 01:00:06] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


[2005-04-09 17:34:52] der...@php.net

You're probably using a character which can not be represented in iso-8859-1... 
but I don't know for sure as I don't have the data. Come up with a 
*self-contained* script that does not rely on a database...


[2005-04-09 08:27:21] cbdbs at yahoo dot com

$doc = new DOMDocument('1.0','ISO-8859-1');
// we want a nice output
$doc->formatOutput = true;


$familias = $doc->appendChild(new DOMElement('familias'));

 while ($fam_datos = mysql_fetch_array($data)){

$familia = $familias->appendChild(new DOMElement('familia'));
$familia->appendChild(new DOMElement('Apellidos', 
$fam_datos['Familia']));
$familia->appendChild(new DOMElement('Representante', 
$fam_datos['Apellidos']));
$familia->appendChild(new DOMElement('Nombre', 
$fam_datos['Nombres']));
$familia->appendChild(new DOMElement('Edad', 
$fam_datos['Edad']));
$familia->appendChild(new DOMElement('Salud', 'Sano'));

 }

header('Content-Type: text/xml');
$documento = $doc->saveXML();
echo $documento;

OUTPUT
Warning:  output conversion failed due to conv error in 
c:\home\prueba\www\grid\xml.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

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


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


Bug #63521 [Com]: Adding 5 weekdays to Fri, Sat or Sun results in Sunday

2012-12-28 Thread michal dot kocztorz at polcode dot pl
Edit report at https://bugs.php.net/bug.php?id=63521&edit=1

 ID: 63521
 Comment by: michal dot kocztorz at polcode dot pl
 Reported by:linesarefuzzy at gmail dot com
 Summary:Adding 5 weekdays to Fri, Sat or Sun results in
 Sunday
 Status: Open
 Type:   Bug
 Package:Date/time related
 Operating System:   Mac, Linux
 PHP Version:5.3.18
 Block user comment: N
 Private report: N

 New Comment:

Seems to affect DateTime::modify too.
$dt = new DateTime("2013-01-04"); echo $dt->modify("+5 
weekdays")->format("Y-m-d 
H:i:s l") . "";
$dt = new DateTime("2013-01-05"); echo $dt->modify("+5 
weekdays")->format("Y-m-d 
H:i:s l") . "";
$dt = new DateTime("2013-01-06"); echo $dt->modify("+5 
weekdays")->format("Y-m-d 
H:i:s l") . "";
$dt = new DateTime("2013-01-07"); echo $dt->modify("+5 
weekdays")->format("Y-m-d 
H:i:s l") . "";

Got:
2013-01-13 00:00:00 Sunday
2013-01-13 00:00:00 Sunday
2013-01-13 00:00:00 Sunday
2013-01-14 00:00:00 Monday


Previous Comments:

[2012-11-23 02:58:58] linesarefuzzy at gmail dot com

Jon--

Since the bug always results in Sunday when it should be Friday, an
obvious workaround would be to test the weekday of the result, and
if it's Sunday, subtract two days. For example:




[2012-11-22 08:33:11] jon dot drummond at barrowsonline dot com

Has anyone found a solution to this yet? We can not wait for a patch & need a 
workaround in the mean time.


[2012-11-14 19:00:22] linesarefuzzy at gmail dot com

Description:

Adding 5 weekdays to a Friday, Saturday or Sunday returns the following Sunday 
instead of Friday. Same issue when adding multiples of 5. Starting with any 
other 
weekday works as expected, as does adding any other number of weekdays. 

Test script:
---
echo date ( 'l, F j, Y', strtotime ( 'friday + 1 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'friday + 2 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'friday + 3 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'friday + 4 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'friday + 5 weekdays' ) ) . "\n";
echo "\n"; 
echo date ( 'l, F j, Y', strtotime ( 'saturday + 1 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'saturday + 2 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'saturday + 3 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'saturday + 4 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'saturday + 5 weekdays' ) ) . "\n";
echo "\n"; 
echo date ( 'l, F j, Y', strtotime ( 'sunday + 1 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'sunday + 2 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'sunday + 3 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'sunday + 4 weekdays' ) ) . "\n";
echo date ( 'l, F j, Y', strtotime ( 'sunday + 5 weekdays' ) ) . "\n";

Expected result:

Monday, November 19, 2012
Tuesday, November 20, 2012
Wednesday, November 21, 2012
Thursday, November 22, 2012
Friday, November 23, 2012

Monday, November 19, 2012
Tuesday, November 20, 2012
Wednesday, November 21, 2012
Thursday, November 22, 2012
Friday, November 23, 2012

Monday, November 19, 2012
Tuesday, November 20, 2012
Wednesday, November 21, 2012
Thursday, November 22, 2012
Friday, November 23, 2012

Actual result:
--
Monday, November 19, 2012
Tuesday, November 20, 2012
Wednesday, November 21, 2012
Thursday, November 22, 2012
Sunday, November 25, 2012

Monday, November 19, 2012
Tuesday, November 20, 2012
Wednesday, November 21, 2012
Thursday, November 22, 2012
Sunday, November 25, 2012

Monday, November 19, 2012
Tuesday, November 20, 2012
Wednesday, November 21, 2012
Thursday, November 22, 2012
Sunday, November 25, 2012






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


#12002 [Com]: SIGSEGV with DOMXML (double free()?)

2004-05-06 Thread michal at pasternak dot w dot lub dot pl
 ID:   12002
 Comment by:   michal at pasternak dot w dot lub dot pl
 Reported By:  hulinsky at datasec dot cz
 Status:   Closed
 Bug Type: DOM XML related
 Operating System: Debian Linux 2/testing
 PHP Version:  4.0.6
 New Comment:

I have the same bug, somewhere in DOMXML module, I belive, using 4.3.3
and 4.3.6, both on FreeBSD machines.

This bug report should be reopened and reexamined IMO. I will try to
provide some simple testcase soon.


Previous Comments:


[2001-08-10 11:09:34] [EMAIL PROTECTED]

no feedback



[2001-07-10 06:04:17] [EMAIL PROTECTED]

Great! Thanks for the report. Would it be possible for you
to provide as short as possible of a reproducing script/xml
file, either through the bug report interface or by providing a
hyperlink, or something?



[2001-07-10 05:27:13] hulinsky at datasec dot cz

Script too complex to post here (XML edit module). php.ini and apache
config - nothing special.

PHP 4.0.6
./configure --prefix=/rscr/apprscr \
--with-apache=../../APACHE/ORIG/apache_1.3.20 \
--with-config-file-path=/rscr/apprscr/conf \
--with-regex=system \
--enable-debug \
--enable-track-vars \
--enable-trans-sid \
--disable-rpath \
--enable-session \
--enable-memory-limit \
--enable-sysvsem \
--enable-sysvshm \
--enable-shmop \
--enable-ctype \
--enable-sockets \
--enable-exif \
--with-jpeg-dir=shared,/usr \
--with-xpm-dir=shared,/usr/X11R6 \
--with-png-dir=shared,/usr \
--with-ttf=shared,/usr \
--with-t1lib=shared,/usr \
--with-mm \
--with-xml=/usr \ (debian ext/xml/config.m4 patch)
--with-expat-dir=/usr \
--with-pcre-regex=/usr \
--without-pgsql \
--with-mysql=/usr \
--with-dom=/usr \
--with-zlib=/usr \
--with-ming=/usr \
--with-iconv=/usr

Apache 1.3.20
./configure --prefix=/rscr/apprscr --with-layout=Apache
--disable-module=env --enable-module=setenvif
--disable-module=negotiation --enable-module=alias
--disable-module=userdir --disable-module=asis --disable-module=include
--disable-module=cgi --disable-module=actions --disable-module=imap
--disable-module=autoindex --enable-module=dir
--activate-module=src/modules/php4/libphp4.a
--activate-module=src/modules/gzip/mod_gzip.o --enable-module=rewrite

make EXTRA_CFLAGS=-DDYNAMIC_MODULE_LIMIT=0


ldd httpd
libpam.so.0 => /lib/libpam.so.0 (0x4002)
libdl.so.2 => /lib/libdl.so.2 (0x40028000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x4002c000)
libmm.so.11 => /usr/lib/libmm.so.11 (0x40049000)
libpcre.so.3 => /usr/lib/libpcre.so.3 (0x4004e000)
libmysqlclient.so.10 => /usr/lib/libmysqlclient.so.10
(0x40057000)
libz.so.1 => /usr/lib/libz.so.1 (0x4008b000)
libming.so => /usr/lib/libming.so (0x4009b000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x400c2000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x4014e000)
libresolv.so.2 => /lib/libresolv.so.2 (0x4017c000)
libm.so.6 => /lib/libm.so.6 (0x4018d000)
libnsl.so.1 => /lib/libnsl.so.1 (0x401af000)
libdb.so.2 => /lib/libdb.so.2 (0x401c4000)
libc.so.6 => /lib/libc.so.6 (0x401d2000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4000)

libc6  2.2.3-5
libc6-dbg  2.2.3-5
libxml22.3.13-1
libxml2-dev2.3.13-1
libexpat1  1.95.1-5
libexpat1-dev  1.95.1-5
libc6-dev 2.2.3-5

GDB trace:

(gdb) run -X
Starting program: /XX/./httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x4024320b in free () from /lib/libc.so.6
(gdb) bt
#0  0x4024320b in free () from /lib/libc.so.6
#1  0x401124d0 in xmlXPathFreeNodeSet () from /usr/lib/libxml2.so.2
#2  0x40112fc8 in xmlXPathFreeObject () from /usr/lib/libxml2.so.2
#3  0x8085362 in php_free_xpath_object (rsrc=0x86e6ed4) at
php_domxml.c:188
#4  0x8118bda in list_entry_destructor (ptr=0x86e6ed4) at
zend_list.c:179
#5  0x811722b in zend_hash_apply_deleter (ht=0x81e8150, p=0x86e6d04)
at zend_hash.c:615
#6  0x81173e8 in zend_hash_graceful_destroy (ht=0x81e8150) at
zend_hash.c:666#7  0x8118d27 in zend_destroy_rsrc_list () at
zend_list.c:234
#8  0x81090c1 in shutdown_executor () at zend_execute_API.c:179
#9  0x811242c in zend_deactivate () at zend.c:540
#10 0x807a867 in php_request_shutdown (dummy=0x0) at main.c:660
#11 0x8077c77 in php_apache_r

Bug #60471 [Com]: Random "Invalid request (unexpected EOF)" using a router script

2012-02-23 Thread michal dot pipa dot xsolve at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60471&edit=1

 ID: 60471
 Comment by: michal dot pipa dot xsolve at gmail dot com
 Reported by:lolautruche at gmail dot com
 Summary:Random "Invalid request (unexpected EOF)" using a
 router script
 Status: Assigned
 Type:   Bug
 Package:Built-in web server
 Operating System:   Mac OS X 10.7.2 (Lion)
 PHP Version:5.4.0RC2
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

I've noticed these messages and did some network traffic analysis.

I've tested this on Ubuntu and Chromium. What I've found is that Chromium has 
feature called "Predict network actions to improve page load performance" and 
it's enabled by default. It works this way, that if HTML page has links to some 
resources, than Chromium opens about 10 TCP connections in advance. And then if 
browser has less than 10 resources to fetch, unused connections times out after 
10 seconds. And this (empty payload) causes PHP server to display "Invalid 
request (unexpected EOF)" message.

See: 
http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c?revision=322966&view=markup#l1591

When you disable this Chromium's feature it doesn't open TCP connections in 
advance and this error message disappears.

I'm wondering if we really need this error message (maybe it was used for some 
debugging purposes).


Previous Comments:

[2012-02-16 18:29:02] ras...@php.net

The patch is here:

http://svn.php.net/viewvc/php/php-src/trunk/sapi/cli/php_cli_server.c?
r1=323078&r2=323077&pathrev=323078&view=patch

if someone could test it, please.


[2012-02-16 18:24:54] ras...@php.net

Could this simply be caused by the "Connection: closed" message instead of the 
correct "Connection: close" message the built-in server spits out? This is 
fixed 
in trunk but hasn't been merged to 5.4 yet.


[2012-02-12 17:06:17] rbrunius at gmail dot com

I'm am having the same thing happen and I Googled error code it and found this 
thread. I tried various ways to terminate the file but none solved it.

php 5.4 RC7 

development server on Windows 7

Chrome browser has brings the issue but Firefox does not.


[2011-12-09 13:59:12] patrickalla...@php.net

@laruence:
Gentoo Linux

Most of the time, several of those messages appears in one block like in:

[Thu Dec  8 13:39:29 2011] 127.0.0.1:50358 Invalid request (Unexpected EOF)
[Thu Dec  8 13:39:29 2011] 127.0.0.1:50359 Invalid request (Unexpected EOF)
[Thu Dec  8 13:39:29 2011] 127.0.0.1:50360 Invalid request (Unexpected EOF)
[Thu Dec  8 13:39:29 2011] 127.0.0.1:50361 Invalid request (Unexpected EOF)
[Thu Dec  8 13:39:29 2011] 127.0.0.1:50362 Invalid request (Unexpected EOF)

I expect it comes from the fact that the page generated by the built-in server 
contains references to pictures, js and css files that has been downloaded by 
chrome through the built-in server. Does chrome do some special treatment? 
Can't 
reproduce with a dummy page with just an Hello World.


[2011-12-09 05:44:26] larue...@php.net

I can't reproduce this on Linux. 

@patrickallaert, what is your OS?




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

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


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


Bug #60471 [Com]: Random "Invalid request (unexpected EOF)" using a router script

2012-02-25 Thread michal dot pipa dot xsolve at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60471&edit=1

 ID: 60471
 Comment by: michal dot pipa dot xsolve at gmail dot com
 Reported by:lolautruche at gmail dot com
 Summary:Random "Invalid request (unexpected EOF)" using a
 router script
 Status: Assigned
 Type:   Bug
 Package:Built-in web server
 Operating System:   Mac OS X 10.7.2 (Lion)
 PHP Version:5.4.0RC2
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

I've attached a patch that disables "Unexpected EOF" error message from 
built-in server.


Previous Comments:
----
[2012-02-23 18:45:53] michal dot pipa dot xsolve at gmail dot com

I've noticed these messages and did some network traffic analysis.

I've tested this on Ubuntu and Chromium. What I've found is that Chromium has 
feature called "Predict network actions to improve page load performance" and 
it's enabled by default. It works this way, that if HTML page has links to some 
resources, than Chromium opens about 10 TCP connections in advance. And then if 
browser has less than 10 resources to fetch, unused connections times out after 
10 seconds. And this (empty payload) causes PHP server to display "Invalid 
request (unexpected EOF)" message.

See: 
http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c?revision=322966&view=markup#l1591

When you disable this Chromium's feature it doesn't open TCP connections in 
advance and this error message disappears.

I'm wondering if we really need this error message (maybe it was used for some 
debugging purposes).


[2012-02-16 18:29:02] ras...@php.net

The patch is here:

http://svn.php.net/viewvc/php/php-src/trunk/sapi/cli/php_cli_server.c?
r1=323078&r2=323077&pathrev=323078&view=patch

if someone could test it, please.


[2012-02-16 18:24:54] ras...@php.net

Could this simply be caused by the "Connection: closed" message instead of the 
correct "Connection: close" message the built-in server spits out? This is 
fixed 
in trunk but hasn't been merged to 5.4 yet.


[2012-02-12 17:06:17] rbrunius at gmail dot com

I'm am having the same thing happen and I Googled error code it and found this 
thread. I tried various ways to terminate the file but none solved it.

php 5.4 RC7 

development server on Windows 7

Chrome browser has brings the issue but Firefox does not.


[2011-12-09 13:59:12] patrickalla...@php.net

@laruence:
Gentoo Linux

Most of the time, several of those messages appears in one block like in:

[Thu Dec  8 13:39:29 2011] 127.0.0.1:50358 Invalid request (Unexpected EOF)
[Thu Dec  8 13:39:29 2011] 127.0.0.1:50359 Invalid request (Unexpected EOF)
[Thu Dec  8 13:39:29 2011] 127.0.0.1:50360 Invalid request (Unexpected EOF)
[Thu Dec  8 13:39:29 2011] 127.0.0.1:50361 Invalid request (Unexpected EOF)
[Thu Dec  8 13:39:29 2011] 127.0.0.1:50362 Invalid request (Unexpected EOF)

I expect it comes from the fact that the page generated by the built-in server 
contains references to pictures, js and css files that has been downloaded by 
chrome through the built-in server. Does chrome do some special treatment? 
Can't 
reproduce with a dummy page with just an Hello World.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

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


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