#33453 [NEW]: PHP support for ETags in gzip output handler

2005-06-23 Thread gunnar at mysql dot com
From: gunnar at mysql dot com
Operating system: *
PHP version:  4CVS-2005-06-23 (stable)
PHP Bug Type: Feature/Change Request
Bug description:  PHP support for ETags in gzip output handler

Description:

Currently PHP doesn't check the ETag header at all, nor does it send it
out. I propose to add an ETag functionality that works like this:

1. in the output zlib handler check whether an ETag (If-None-Matched) was
set, and store it in the ZLIB globals.
2. when we're compressing the output we do an MD5 (or any other kind of
hashing function) over the compressed output.

3. If the hash is the same as the If-None-Matched header value that was
stored in step 1: just send a 304 Not Modified, if it's not the same send
the normal output but at an ETag header containing the hash value.


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


#29086 [NEW]: PHP 5.0 crash on long php scripts

2004-07-10 Thread gunnar at greyhound-data dot com
From: gunnar at greyhound-data dot com
Operating system: MorphOS, Windows, Linux
PHP version:  5.0.0RC3
PHP Bug Type: Reproducible crash
Bug description:  PHP 5.0 crash on long php scripts

Description:

PHP crashes on long source scripts.


I use Apache(1.3.31) and PHP 5.0.0rc3 on MorphOS.

I noticed that all long scripts (over 1200 lines)
will crash the Apache/PHP build.

Script with 1000 or less lines run fine in less than
a second, as soon as I add a few hundred more lines PHP 
will die.

The amount of compiled lines of code is the limiting 
factor. A script with 3000 lines of code and 2000 
commented out lines runs fine.
But the same script with just 1200 lines of code (none 
of them commented out) dies.


It looks like a memory problem but my machine has still 
more than 250 MB free... The php memory limit (in 
php.ini) is set to 20MB.




Mr Bert Slagter reproduced the crash on Linux and 
Windows.

He said that:
The same problem exists here, though on a significant 
higher linecount.

Tried it on WinXP, Apache 1.3.29 with PHP 5.0.0-dev 
(built: Jul-2-2004).
With 17.000 lines everything is fine. With 18.000 of the 
above lines apache crashes. Verified it by adding and 
deleting 1.000 lines a few times.

Tried it on Linux, CLI PHP 5.0.0-dev (build: Jul-8
-2004). Here it segfaults exactly on 34517 lines. One 
line less, no problem. Reproducable.

Running under the Zend Debugger Apache doesn't crash.


I hope this report will help you to find and fix the 
problem. If you have any ideas how I extend the number 
of lines which PHP is able to compile on MorphOS, then 
please tell me.

Kind regards

Gunnar

Reproduce code:
---
Any code which is long enough will crash PHP

I verified this with a very simple test script

?
$i++
print $ibr;
$i++
print $ibr;
...[1000 more lines like the above]..
?

Actual result:
--
PHP crashes.

PHP on MorphOS will crash on scripts longer than 1500 
lines.

PHP on WinXP will crash an script longer 18,000 lines.
Tried it on WinXP, Apache 1.3.29 with PHP 5.0.0-dev 
(built: Jul-2-2004).

On linux PHP will crash an scripts longer than 35,000 
lines.

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


#26362 [NEW]: stream_select(): unable to select [0]: mod.eval.php

2003-11-22 Thread gunnar dot peipman at mail dot ee
From: gunnar dot peipman at mail dot ee
Operating system: Windows XP Pro
PHP version:  4.3.4
PHP Bug Type: Sockets related
Bug description:  stream_select(): unable to select [0]: mod.eval.php

Description:

When using non-blocking sockets I get the following error:

Warning: stream_select(): unable to select [0]: No error in
bc:\web\www\bot\bot\mod.eval.php(17).



Reproduce code:
---
Open stream to IRC server and after getting connection and identifying the
script try to use the following code:

error_reporting(E_ALL);
echo (stream_select($gSOCKARRAY, $write=NULL, $except=NULL, 1,
1)===false);

Expected result:

I expect that for false there is no changes and for true there is some
socket I have to test. 

Actual result:
--
All I get is the warning above. I tried to change timeouts but no luck at
all. Still apache eats about 78% of my CPU.

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


#26362 [Opn]: stream_select(): unable to select [0]: mod.eval.php

2003-11-22 Thread gunnar dot peipman at mail dot ee
 ID:   26362
 User updated by:  gunnar dot peipman at mail dot ee
 Reported By:  gunnar dot peipman at mail dot ee
 Status:   Open
 Bug Type: Sockets related
 Operating System: Windows XP Pro
 PHP Version:  4.3.4
 New Comment:

Sorry, forgot to mention that $gSOCKARRAY is array with one socket
pointer. ($gSOCKARRAY=array($gSOCK_POINTER)).


Previous Comments:


[2003-11-22 23:24:43] gunnar dot peipman at mail dot ee

Description:

When using non-blocking sockets I get the following error:

Warning: stream_select(): unable to select [0]: No error in
bc:\web\www\bot\bot\mod.eval.php(17).



Reproduce code:
---
Open stream to IRC server and after getting connection and identifying
the script try to use the following code:

error_reporting(E_ALL);
echo (stream_select($gSOCKARRAY, $write=NULL, $except=NULL, 1,
1)===false);

Expected result:

I expect that for false there is no changes and for true there is some
socket I have to test. 

Actual result:
--
All I get is the warning above. I tried to change timeouts but no luck
at all. Still apache eats about 78% of my CPU.





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


#20110 [Com]: input in flex scanner failed in directory :)

2002-12-24 Thread gunnar
 ID:   20110
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Linux, Net|Free|OpenBSD, others?
 PHP Version:  4.2.3
 Assigned To:  derick
 New Comment:

This error also appears with other functions. More specifically I've
experienced it with the parse_ini_file() function. I do not have access
to test it with PHP CVS version, do I don't know wether it has been
fixed for just the include function, or all functions affected by this
problem.


Previous Comments:


[2002-10-27 18:28:18] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2002-10-26 15:05:14] [EMAIL PROTECTED]

Severity: Cosmetic for error reporting

PHP Fatal error:  input in flex scanner failed in directoryname

When doing a:
8
include(/tmp/);
8

For instance will produce above error, maybe a You can't include
directories would be nice?






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