|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25950 Incorrect (?) behavior of file_get_contents with Norton Firewall and .htaccess
Submitted: 2003-10-22 07:16 UTC Modified: 2013-05-21 01:49 UTC
From: panda dot management at free dot fr Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.3.3 OS: Windows XP
Private report: No CVE-ID: None
 [2003-10-22 07:16 UTC] panda dot management at free dot fr

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 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.

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):

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!!!



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-22 10:03 UTC]
There's no bug here.

It tries to connect and will sit there waiting for reply from
the server until the script times out.
 [2013-05-20 21:36 UTC] mc dot meti at hotmail dot com
than how the heck to fix this PROBLEM ? ? ? ? ?
 [2013-05-21 01:49 UTC]
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 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Dec 05 11:01:23 2020 UTC