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 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:
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
// Copy the file
if (copy($fileUpload, $location))
{
echo "<h1>File Uploaded</h1>";
} else {
echo "<h1>Error, failed to copy file</h1>";
}
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.