简体   繁体   中英

500 Internal server when uploading file to AWS EC2 PHP Project

I'm trying to upload a file using Core PHP. In my localhost it is successful. It saved the path file in the db and the file is stored in the folder. But when it's in AWS EC2 SERVER. It display 500 internal server error. The path file is save in the database but I can't see image file in the folder inside the project.

What I have already tried? 1. I tried the permission of my folder to 777. - still the same error.

Is there any suggestions you can give me? I used move_file_upload() in PHP.

Try enabling error logging in PHP which should stop the 500 internal error from displaying but give you error outputs instead:

error_reporting(E_ALL);
ini_set('display_errors', 1);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM