[thelist] PHP & Fopen() errors....

David Olsen David.Olsen at mail.wvu.edu
Wed Mar 12 07:31:15 CST 2003


Are you sure that your host allows fopen() to open remote files? members.evolt.org didn't allow opening of remote files and I ran into a similar problem as yours. drop a simple phpinfo() into your directory and make sure that the directive 'allow_url_fopen' is set to 1. I've used fsockopen in the past to get by this but I'm not sure how appropriate it is. 

http://www.php.net/manual/en/function.fsockopen.php

- dave olsen
  web services group
  304-293-5298
  http://www.wvu.edu/webservices/

>>> cditty at mlgw.org 03/11/03 02:39PM >>>
I asked this question on the PHP list and didn't get any feedback. 
Hopefully someone here can help.

I seem to be having a problem with fopen on apache 1.3.27/php 4.3 
servers.  Scripts that worked before and on other servers do not work
on 
this one.  The web host recently upgraded both php and apache.   Below
is 
the error.....

Warning: fopen(XXXXXXXXXXXXXXXXXXXXXX) [function.fopen]: failed to
create 
stream: Invalid argument in /path/to/script/import.php on line 30

This is the code around line 30.....
$local_file = $feed;
$fp = fopen($local_file, "r");

This is being pulled from a http site. The site and the link are both
correct and working. Replacing 
$feed with the actual url doesn't help.  I have looked over the manual
and the only thing I could 
find similar to this is in the comments.  

Anyone?

Chris

------------------------------------------------------------------------------
03/11/2003, 02:52:54 PM
This e-mail and any attachments represent the views and opinions of only the sender and are not necessarily those of Memphis Light, Gas & Water Division, and no such inference should be made.

==============================================================================

-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/ 

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 



More information about the thelist mailing list