-   Linux - Server (
-   -   php on apache server running in fedora 13 (

zob 06-18-2012 01:12 AM

php on apache server running in fedora 13
Hello, for the past few weeks I have been learning php. Right now I have been playing with the fopen() statement for saveing data from php and html.
However when I try to run my code I get this error in firefox:

saveing your file... Warning: fopen(hi.txt): failed to open stream: Permission denied in /var/www/html/fileio.php on line 5

I know my php code is good because I have a php debugger on my work station and it runs with that but my server for some reason has issues with file io
Can any one point me to where I would find the config file to fix this and how I would edit that config file?

scandalist 06-18-2012 02:44 AM

Firefox is probably running under a normal system account and does not have permission to save where you want it to. Either run firefox as a root user or grant yourself permission to save in /var/www/html/

If I'm just messing around in Apache, I explicitly grant myself full privileges so I don't run into these nuisances. ie


chmod -R 777 /var/www/
Obviously you need to be careful with this if security is a concern...

zob 06-21-2012 12:59 AM

didn't work
I think that the issue is not with permissions for the file but with the php config file do you have any idea where that would be?

All times are GMT -5. The time now is 11:34 AM.