writing files on to apache with php
i have an apache server, and i'm writng php scripts for a website. now i'm trying to create and write to files for my website, however, apache server seem to be not creating the files. i ran my script offline of the server and it created a new file, however when i run it on the server it doesn't create the file. i looked in the httpd.conf wiht no success
thanks djgerbavore |
hi
what i think is that apache uses userbane apache to perform all operaion. that might be hindering it so try giving more rights to username apacahe or try writing to a diferent directory regards |
i'll try that,
but i'm running apache as root, and my php scripts are creating/writing files to the htdocs directory, so everything is on the server side. do i still need to give rights to my directory? also i'm a noobie to apache web server. so you been have to point me in the right directions. thanks, djgerbavore |
hi there
thats what i am saying u r running apache as root user but apache performs all actions w.r.t to user apache also see ur logs, u will get some erorr msgs in ur webserver logs regards |
thank you,
sorry i'm alittle new to apache web server you have been alot of help sorry to brother you, but this i'm trying to meet a deadline, you mean i need to use hte chmod command, or is there something in the httpd.conf script that i need to look in, sorry i'm not on my linux box right now, so i can't check what the log files say. thanks |
hey did that sort ut ur problem??
regards |
you have been alot of help
sorry to brother you, but this i'm trying to meet a deadline, you mean i need to use hte chmod command, or is there something in the httpd.conf script that i need to look in, sorry i'm not on my linux box right now, so i can't check what the log files say. thanks |
hi there
no do not bother me at all!!! i get to learn a lot from all these well what u can try is assign different permission to ur directory so that the user apache can access that also regards |
i just have one more question, (sorry for being such a newbie), but i don't know how to change apache user permissions.
I look on the web and no success, i tried about thousadn different chown apache /var/www/htdocs/ variation. but i keep getting a permission deny error in my apache error log. It writes permission deny to open stream(file.dat). Is there somehting i'm doin wrong... thank you for help, djgerbavore |
hi there
before changing pemissions for user apache one thing u need to consider is if u give full permissions to pache then it cvan change a lot of things with out ur permision so try changing thepermisions of the file that u want to edit chmod 0777 <name of file with path> this will make the file read. write. xecute for all users try this regards |
you are the best!!!!! chmod 0777 worked. i can read/write files! i'm very happy you have no idea, how good this feels,
i might actually make my deadline now!!!!! thank so much djgerbavore |
gooooddd!!
i too have a great feeling that it worked for u now!! by the way where is PA?? regards |
pa is in usa , pennslyavia
|
All times are GMT -5. The time now is 03:03 PM. |