Upload File with Server Error
Upload File with Server Error
pioada
Posts: 2Questions: 1Answers: 0
Hello everybody!
I'm trying the example "File Upload" on my server.
I configured the config.php file and I can post new entries "First Name", "Last Name", ecc.
But if I try to load an image below comes "A server error occurred while uploading the file".
What's the problem, what am I doing wrong?
Thanks very much.
This discussion has been closed.
Answers
I guess more info will be available in server error logs...
As a starting point try to implement the example provided on the website.
Without seeing logs and an example we can't help much. If you have followed the examples perfectly the only obvious thing would be a permissions issue where the folder to which you intend to drop the uploaded files does not have the correct permissions to allow your web application to save there.
My guess is that you probably need to allow write access to the target directory for whatever user your web-server is running under. But as the two replies above say, the real answer will be in your server's error logs .
Allan
Thank you very much for your answers.
It was indeed a permissions problem, I did not realize that the uploads folder must be in the server root.
$_SERVER['DOCUMENT_ROOT'].'/upload/NAME
It works now!
Thanks