There is an error when uploading an image on server.It shows 500 internal server error.If i upload small image than everything is ok but when upload large size image there is above error. This is working on local but error on live server.
Check you upload_max_filesize in php.ini
Echo ini_get ("upload_max_filesize");
Also, read this: http://www.radinks.com/upload/config.php
it was:
mod_fcgid: HTTP request length 131308 (so far) exceeds MaxRequestLen (131072)
so I've changed the limit by adding this to global httpd.conf (from cPanel):
MaxRequestLen 15728640
and everything is running fine....
php.ini
file memory_limit=128M
to memory_limit=256M
ctrl+s
to save the changes Apache
or Nginx
Server any size
Repeat from Step-1 above
memory_limit
till the server accepts big files. but dont forget to save the changes and restarting of server or else it will not work. check this allowed time to execute your script using below,
echo $maxExeTime = ini_get('max_execution_time');
and check how much time your script takes and increase the time execution before execution of your file upload script to increase it you can use below code
ini_set('max_execution_time', '0');
检查您的php.ini文件
upload_max_filesize
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.