PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 05-28-2007, 09:48 AM   #1
piperpowell
Green Mole
 
Join Date: May 2007
Posts: 1
file upload with php

Total noob here, please be kind.

I am trying to script an file upload form without success.


move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'],

"/piperp86/public_html/useruploads/{$_FILES['uploadFile'] ['name']}");

echo "File uploaded.";
if($_FILES['uploadFile'] ['error'] > 0)

{

switch ($_FILES['uploadFile'] ['error'])
{

case 1: echo 'File exceeded maximum server upload size';
break;

case 2: echo 'File exceeded maximum file size';
break;

case 3: echo 'File only partially uploaded';
break;

case 4: echo 'No file uploaded';
break;

}


}

else

{

echo 'File successfully uploaded';

}



}

?>

<form enctype="multipart/form-data" action="upload.php" method="post">

Select File: <input type="file" name="uploadFile"/>

<input type="hidden" name="MAX_FILE_SIZE" value="1000000"/>

<input name="SubmitB" type="submit" value="Upload File"/>

</form>


The error I get is:

Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid/gid is 32979/32982 is not allowed to access / owned by uid/gid 0/0 in /home/piperp86/public_html/upload.php on line 9
File uploaded.File successfully uploaded

The folder useruploads has write privileges.
My web is hosted by ehostpros. Could it be that they don't allow uploads from web pages? The file is not uploaded.
thanks for reading.
piper
piperpowell is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re-upload multiple crawlers ammo Mod Requests 1 05-25-2005 08:49 AM
including file with php does not work... Fking How-to Forum 5 10-09-2004 11:47 AM
Writing to a file. (PHP) Nasimov Coding & Tutorials 1 04-13-2004 08:38 AM
Newbie : How to include PHP file (.php) frostbyte How-to Forum 1 01-04-2004 12:42 PM
How to exclude part of page in a PHP file mario51 How-to Forum 2 12-18-2003 12:13 AM


All times are GMT -8. The time now is 02:57 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.