I can not create files in FreeBSD using PHP?

hi

i wrote this code in php but there is no effect??
edee.jpg

when i try to read the content of file it work fine but when i try to write it can not!

any ideas?
 
Most likely, the process executing your PHP script doesn't have the right permissions needed to modify the file.

Do you run your script inside a browser? Where is the file you want to modify?
 
my file locates in /usr/local/www/apache22/data/t

how can i change permissions?? to what??

i run my script inside same previous path using internet explorer in another machine
 
Try # chown www:www /usr/local/www/apache22/data/t. This changes the owner of the given directory to the user and group of the web server.

And don't forget to do
Code:
fclose($handle);
after you wrote to the file.
 
volatilevoid said:
Try # chown www:www /usr/local/www/apache22/data/t
. This changes the owner of the given directory to the user and group of the web server.

It can also be...

Code:
# chown -R www:www /usr/local/www/apache22/data/t
 
To save yourself from a world of problems, don't ever write files in the same directory as the web application.
 
Back
Top