i am java Posted September 23, 2009 Share Posted September 23, 2009 mkdir("/home/public_html/upload/".$gal[g_id], 0777); Anyone know why when I use this code, the directory that is made not only doesn't set permissions to 0777, but it also won't allow me to change it to 0777 manually?Edit: OK, so, I used chmod to change its permissions. It worked. Unfortunately, I still can't use move_uploaded_file() to move files into the directory.. Link to comment Share on other sites More sharing options...
chibineku Posted September 23, 2009 Share Posted September 23, 2009 I thought file permissions were only 3 digits, i.e. 777Edit: I'm wrong. There is something about the function not working right in windows if there are spaces in the filenames tho, I don't know if that's applicable here Link to comment Share on other sites More sharing options...
i am java Posted September 23, 2009 Author Share Posted September 23, 2009 I thought file permissions were only 3 digits, i.e. 777Edit: I'm wrong. There is something about the function not working right in windows if there are spaces in the filenames tho, I don't know if that's applicable hereIt's a Linux server. I think it may have something to do with the safe mode that my host uses or something.Oh, and I am just curious: Do PHP errors display on the pages, or was there a change in cPanel or PHP that made it so that you can only view PHP errors in an error log? Link to comment Share on other sites More sharing options...
i am java Posted September 23, 2009 Author Share Posted September 23, 2009 [Wed Sep 23 14:09:54 2009][Wed Sep 23 14:09:54 2009] [error] [client 68.205.137.212] PHP Warning: move_uploaded_file() [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: Unable to move '/tmp/php40K2ey' to '/upload/35/ignore.bmp' in /home/jasenand/public_html/member_gallery.php on line 433, [error] [client 68.205.137.212] PHP Warning: move_uploaded_file(/upload/35/ignore.bmp) [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: failed to open stream: No such file or directory in /home/jasenand/public_html/member_gallery.php on line 433, referer: That's the two error messages I get when trying to upload a file into there using PHP/HTML. Link to comment Share on other sites More sharing options...
i am java Posted September 25, 2009 Author Share Posted September 25, 2009 nothing? Link to comment Share on other sites More sharing options...
Hooch Posted September 25, 2009 Share Posted September 25, 2009 Try this... $mkDIR = ("/home/public_html/upload/".$gal[g_id]); mkdir($mkDIR); chmod($mkDIR, 0777); Link to comment Share on other sites More sharing options...
justsomeguy Posted September 28, 2009 Share Posted September 28, 2009 Do PHP errors display on the pages, or was there a change in cPanel or PHP that made it so that you can only view PHP errors in an error log?There are several PHP options for which errors to report and where to report them.Does this server have safe mode enabled? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.