php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: panda dot management at free dot fr
New email:
PHP Version: OS:

 

 [2003-10-22 07:16 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-22 10:03 UTC] magnus@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.
 [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] rasmus@php.net
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.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Dec 05 13:01:23 2020 UTC