Upload File with Server Error

Upload File with Server Error

pioadapioada 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.

Answers

  • bacalovbacalov Posts: 22Questions: 3Answers: 0

    I guess more info will be available in server error logs...
    As a starting point try to implement the example provided on the website.

  • ewmantheiewmanthei Posts: 14Questions: 1Answers: 2

    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.

  • allanallan Posts: 61,452Questions: 1Answers: 10,055 Site admin

    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 :smile:.

    Allan

  • pioadapioada Posts: 2Questions: 1Answers: 0

    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

This discussion has been closed.