I am hoping someone can point me in the right direction here...
I have a CMS that allows us to upload images to be shown on our site, which uses the PHP file upload mechanism (input field of type "file" and the ENCTYPE="multipart/form-data" in the form tag). This works wonderfully, with one exception. The script runs on the Unix server as "nobody", which means whenever I want to modify, move, download or delete the file, I cannot because I FTP in under a real user.
So, I thought, well, I will just bypass the PHP form upload stuff, and use the basic PHP FTP stuff. But I cannot get that to work either... Here is my code for that:
[a href=\"http://pastebin.com/712159\" target=\"_blank\"]http://pastebin.com/712159[/a]
Using the ftp_put method, everything seems to play well, but I get the "FTP upload has failed!" error after checking the value of $upload. I thought maybe this was because the $localFilePath was just the name of the file, so I hard coded the path and file name, but got the same error.
Then I tried ftp_fput, but got errors trying to open the file with fopen...
Basically, all I need to do is find a way to upload files to our site and make the owner an actual user, rather than "nobody" as PHP scripts run as.
Any help out there?
Thanks a million... this is driving me nuts!
FTP/PHP file upload quandry
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users