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

 ID:                 25950
 Updated by:         ras...@php.net
 Reported by:        panda dot management at free dot fr
 Summary:            Incorrect (?) behavior of file_get_contents with
                     Norton Firewall and .htaccess
 Status:             Not a bug
 Type:               Bug
 Package:            Filesystem function related
 Operating System:   Windows XP
 PHP Version:        4.3.3
 Block user comment: N
 Private report:     N

 New Comment:

Sorry, this is not a support forum. Read the docs. There are multiple examples 
on 
the file_get_contents() page on how to set a timeout in the default stream 
context.


Previous Comments:
------------------------------------------------------------------------
[2013-05-20 21:36:59] mc dot meti at hotmail dot com

than how the heck to fix this PROBLEM ? ? ? ? ?

------------------------------------------------------------------------
[2003-10-22 10:03:26] mag...@php.net

There's no bug here.

It tries to connect and will sit there waiting for reply from
the server until the script times out.

------------------------------------------------------------------------
[2003-10-22 07:16:06] panda dot management at free dot fr

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 this bug report at https://bugs.php.net/bug.php?id=25950&edit=1

Reply via email to