"Safe Mode" errors
Posted: Wed Oct 08, 2003 11:04 pm
I am trying to upload files to a directory using PHP. I have encountered a "Safe Mode" error; and I can't seem to find a way around it.
Error:
I can sucessfully upload the file into a MySQL database using the same form, but the filesize limitation is 1MB (mySQL limitation). So I was hoping to get this working using the file system. Any suggestions as to what to do would be appreciated.
The manual suggests that there may be no "easy" way around this
Error:
Here is the code (from line 94):Warning: copy(): SAFE MODE Restriction in effect. The script whose uid is 579 is not allowed to access / owned by uid 0 in /home/virtual/site72/fst/var/www/html/cms/projects.php on line 94
Warning: copy(/projectfiles/filename.pdf): failed to open stream: No such file or directory in /home/virtual/site72/fst/var/www/html/cms/projects.php on line 94
Error, failed to copy file
Code: Select all
// Copy the file
if (copy($fileUpload, $location))
{
echo "<h1>File Uploaded</h1>";
} else {
echo "<h1>Error, failed to copy file</h1>";
}The manual suggests that there may be no "easy" way around this