If you are using http protocol to access your php scripts, see below.. php runs as a module in apache (either compiled in or loadable). So it shares the same effective user id as that of apache (default is nobody). Check the directory under which you want to create the file has the write permission for user "nobody" or whatever user id apache runs as.
HTH Thanks - Tusar On Fri, 4 Mar 2005 17:37:45 +0900, Thaths <[EMAIL PROTECTED]> wrote: > On Mon, 28 Feb 2005 21:27:10 -0800 (PST), hello > <[EMAIL PROTECTED]> wrote: > > im trying a simple php script which writes to a > > file.when i run the script from the console,the file > > is created and the contents are written to the > > file. > > How did you run the script from the console? > > > but when i call the same script from mozilla,it > > returns an error "permission denied-failed to open > > stream". > > Make sure your apache's httpd.conf has the following line in it someplace: > > AddType application/x-httpd-php .php > > How did you open the /var/www/html/foo.php file in mozilla? Did you > use file:///var/www/html/foo.php or http://localhost/foo.php as the > URL? > > Also, please post the relevant snippet from your php code. Do you see > any errors in your Apache and/or php log files? > > Thaths > -- > "You don't quit your job because you don't like it, you just go in and do it > really half-assed." -- Homer J. Simpson > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > linux-india-help mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/linux-india-help > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-india-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-india-help
