PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I've utilized a little "uploading java applet" that I found on the web which allows you to upload files to a server by drag and drop. The java applet calls a pretty straight forward upload script which basically creates a folder and saves the uploaded file in that folder. The app. works wonders when I run it locally on my Windows machine - but when I deploy it with on my Unix server (shared hosting) it just doesn't work. It doesn't create the folders nor does it save the file. What is ever weirder is that the PHP script doesn't throw an error. And the mkdir comes back as "true" when I try to debug....
I'm obviously thinking this issue has to do with "A" the development environment and "B" php.ini settings - having said that, I don't have a clue what exactly the problem is...I've included some of the code I'm using below:
91.368249% of the time on Unix the problem is that the program does not have write permission to the file/directory. If you are using PHP, remember that the "user" is whatever user the web server runs as.
Hmm..so how do I set the access right of the server then? I have already set the folders access rights to 0777 (read,write,etc.) and I do the same when I create the new folders.
gotlisch wrote:Hmm..so how do I set the access right of the server then? I have already set the folders access rights to 0777 (read,write,etc.) and I do the same when I create the new folders.
The directory this script runs in has been chmod 0777? I assume using FTP/SSH?
If it has and this is still happening it's possible safe_mode is on or open_basedir restriction is on.