From:             richard dot quadling at carval dot co dot uk
Operating system: Windows XP Pro SP1
PHP version:      4.3.7
PHP Bug Type:     HTTP related
Bug description:  file_get_contents works in CLI but not in ISAPI.

Description:
------------
Hi.

I have a script which is used to validate the location of files on another
server.

If I upload the script to my ISPs server (an IX of some sort) it works.
If I use run the script from the command line on my pc, it works.
If I run the script from my local web server, it does not.

The code supplied is the critical code. The filename actually comes from a
list and is concatenated inside a function.

This method has previously worked!

I use file_get_contents a LOT. Even in this script I use it to retrieve
the lists using file_get_contents and it works, but for some reason, this
site is (www2.oeri.ath.cx) is not working correctly with ISAPI.

My web server is Sambar.

I have NOT tried a snapshot yet. I am not sure why ISAPI would not work
but CLI does.


P.S. How do I produce a backtrace on a Windows version of PHP?


Reproduce code:
---------------
<?php
$sLen =
file_get_contents('http://www2.oeri.ath.cx/richq/check_file.php?url=Chumbawamba%2F1982%2F01+-+Garageland.mp3');
echo $sLen;
?>

Expected result:
----------------
A number indicating the file size, in this case ...

1939853

Actual result:
--------------
Warning: file_get_contents() [function.file-get-contents.html]:
php_network_getaddresses: gethostbyname failed in C:\Downloaded Software
and personal info\Saved CDs\Archive_002\Flight1721\public_html\proof.php
on line 2

Warning:
file_get_contents(http://www2.oeri.ath.cx/richq/check_file.php?url=Chumbawamba%2F1982%2F01+-+Garageland.mp3)
[function.file-get-contents.html]: failed to open stream: No error in
C:\Downloaded Software and personal info\Saved
CDs\Archive_002\Flight1721\public_html\proof.php on line 2


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

Reply via email to