i have working codes from my server which is really working using Xampp server but when i uploaded it to my hosting site, it seems the whole uploading isn't working.. what is missing? the temp folder? do i need to make a temp folder to my hosting site?
+1
A:
I am sure you have not settup the permission for your upload path. Check the permission for upload path. First try by making the permission to world write format (777).
Muneer
2010-06-26 11:54:13
Always make error_reporting(E_ALL) when development time. So you can track what is going on.
Muneer
2010-06-26 11:58:11
where will i put the error_reporting(E_ALL)?
vrynxzent
2010-06-26 12:37:16
[error_reporting()](http://php.net/error-reporting) is a function. Make sure it's the first line in your code, so you don't miss any errors.
Adam Backstrom
2010-06-26 13:32:30
Yea add that in the start of any line of your code. If you are using session, then put under session_start();http://www.w3schools.com/php/func_error_reporting.asp
Muneer
2010-06-26 19:10:49
+1
A:
Check two things :
- The folder where file gets uploaded exist on server or not ?
- Write permissions on that folder
Mahin
2010-06-26 11:54:36
+1
A:
Make sure for:
- Upload limits on the server, php.ini
- Folder permissions, chmod to 755
- You are specifying the correct path
- You have used the
enctypeinformattribute - Turn on error reporting in case it is off
Update:
The enctype should be set to enctype="multipart/form-data" eg:
<form enctype="multipart/form-data">
And you can turn on error reporting by putting these lines on top of your script:
ini_set('display_erros', true);
error_reporting(E_ALL);
Additionally try to see what does $_FILES array contain after form is submitted:
echo '<pre>';
print_r($_FILES);
echo '</pre>';
Sarfraz
2010-06-26 11:57:05
File Uploads file_uploads Whether to allow HTTP file uploads = On,Folder permissions, chmod to from 755 to 777You have used the enctype in form attribute what should i use sir?and how to turn on the error reporting? :)
vrynxzent
2010-06-26 12:33:06