From:             panda dot management at free dot fr
Operating system: Windows XP
PHP version:      4.3.3
PHP Bug Type:     Filesystem function related
Bug description:  Incorrect (?) behavior of file_get_contents with Norton Firewall and 
.htaccess

Description:
------------
Hello!

I'm using Norton Internet Security as a firewall.
It has a feature I couldn't find documentation for...
It simply doesn't allow the string ".htaccess" to be sent. (eg: I can't
submit a form containing the word .htaccess !!!!!!!).

Problem is: when NIS is on, and you try a
file_get_contents(http://site/.htaccess);

file_get_contents just hangs and eats cpu...

I'm aware that:
- such a file shouldn't be accessed via http anyway
- "the deny access" part of this is Norton's problem, not php.

But:
php might be concerned by the hang up in file_get_contents in such
circonstancies.

Reproduce code:
---------------
Considering you use Norton Internet Security under WinXP on the computer
you execute the script from...
Try this (that's a file on my site):
file_get_contents('http://panda.management.free.fr/rest/.htaccess');

Expected result:
----------------
A nice error message...

Actual result:
--------------
Notice: file_get_contents(): send of 32 bytes failed with errno=0 Une
connexion existante a dû être fermée par l'hôte distant*

(*Translation: 'an existing connection was closed by distant host')

Next Lines:
Notice: file_get_contents(): send of xx bytes failed with ...

then hangs up and eats all cpu ressource, with xxx climbing to... the
everest...


Norton Internet Security obviously does something tricky to block the
access (arguing that it contains the string .htaccess).

But maybe file_get_contents should behave in a more sensible way on such
an error?


Thank you for php!!!

Olivier

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

Reply via email to