NYCPHP Meetup

NYPHP.org

[nycphp-talk] phantom file writing errors

Phillip Powell phillip.powell at adnet-sys.com
Mon Jul 26 18:04:31 EDT 2004


Marc Antony Vose wrote:

> Hi there:
>
> Can anyone tell my why I would get this error:
>
> Warning: fwrite(): supplied argument is not a valid stream resource in 
> Warning: fclose(): supplied argument is not a valid stream resource in
> when the script is in fact opening and writing out the file just fine?
>
> here's my file handling calls, just for reference:
>
> // output the file
> $output_h = fopen($output_path,"w");
> fwrite($output_h,$output);
> fclose($output_h);


 From the outset it might be due to a permissions issue.  If PHP (under 
your web server) has no permissions to open the file, that would throw 
your error.  Check your file permissions as well as the group setting, 
and make sure Apache (or whatever web server you're using) has the same 
rights to that file as you (or whatever user).

Phil

>
>
> This is happening on a new server I just moved to, and doesn't happen 
> on my old server, nor did it happen on my old server.  Must be some 
> kind of configuration thing...
>
>-- 
>  
>
> Marc Antony Vose
> http://www.suzerain.com/
>
> They that can give up essential liberty to obtain a little temporary 
> safety deserve neither liberty nor safety.
> -- Benjamin Franklin
>
>------------------------------------------------------------------------
>
>_______________________________________________
>New York PHP Talk
>Supporting AMP Technology (Apache/MySQL/PHP)
>http://lists.nyphp.org/mailman/listinfo/talk
>http://www.newyorkphp.org
>


-- 
---------------------------------------------------------------------------------
Phil Powell
Multimedia Programmer
BPX Technologies, Inc.
#: (703) 709-7218 x107 
Fax: (703) 709-7219

	




More information about the talk mailing list