|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10033 Function file does not work with remote files
Submitted: 2001-03-27 18:00 UTC Modified: 2001-08-20 11:59 UTC
From: raymondc at quik dot com Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.4pl1 OS: aix 4.3.3
Private report: No CVE-ID: None
 [2001-03-27 18:00 UTC] raymondc at quik dot com

 $jnk= file ("");

Error: bad file number

 $jnk = file ("myfile");
 echo "works fine";

Options compilated with PHP:

CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure 
--with-mysql=/usr/local/mysql --with-gd --enable-track-vars 

Notes: I tried to use different compilers such as gcc, cc or xlC_r,  I got the same error about file function (bad file number). With the same option of 
compilateion, the script works in LINUX.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-29 11:29 UTC]
Could you please try the latest CVS snapshot from ?


 [2001-03-29 15:34 UTC] raymondc at quik dot com
Hi Jani,

Thank you for your suggestion.

I have just tried the lates version php4-latest from on my AIX 4.3.3 box, I got the same 
error when using function 'file': bad file number. 


 [2001-07-21 21:43 UTC]
See if this works (this and EXACTLY this)

for ($i=0;$i<count($carjunk);$i++){
echo $carjunk[$i];

If this doesn't work, make sure you DNS/Internet Server is
running correctly.
 [2001-08-20 11:59 UTC]
No feedback. Reopen if you still have this problem
with PHP 4.0.7 (soon to be released) or with latest CVS 
snapshot from

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri May 07 09:01:44 2021 UTC