Php loading and internal server error

I am using html form with php to load data into mysql.

the form works correctly when I use it on my laptop (wamp), but when I uploaded the site to a dedicated server (ispconfig), get this error

Internal Server Error
The server detected an internal error or incorrect configuration and was unable to fulfill your request.

I tried changing php.ini values ​​in

post_max_size 64M upload_max_filesize 64M max_input_time 3000 max_execution_time 3000 

and those in apache also in

 memory_limit 96M post_max_size 64M upload_max_filesize 64M 

but i still can't download.

Thank you for that.

+4
source share
4 answers

You need to increase FcgidMaxRequestLen in the httpd.conf file

use something like

 FcgidMaxRequestLen 67108864 

From FcgidMaxRequestLen Directive

A warning

Prior to version 2.3.6, this default value is 1 GB. Most users of earlier versions should use this directive to establish a more reasonable limit.

+4
source

The accepted answer is correct. To be more specific, you need to add the code to the httpd.conf file:

 # Work around annoying fcgid limitations <IfModule mod_fcgid.c> # 20MB should be enough MaxRequestLen 20000000 </IfModule> 

You can check out the full article here: http://pivica.me/blog/500-internal-server-error-while-uploading-files-bigger-then-100kb-modfcgid-problem

+1
source

Please note that a syntax error in processing php / ajax script may report as "internal server error".

For example, I used the Ravishanker Kusuma jQuery Upload File plugin and received this message.

Turns out it's just missing ) in the (unused) function inside my code in the PHP processor file specified by the AJAX script. When the file has been downloaded, this script will be called, the script will be broken inside an unused function, and this will be an error message.

Fwiw

0
source

None of the above solutions worked for me. For CentOS users with the Plesk Pannel, follow these steps.

Change this value in the template

# grep -ir FcgidMaxRequestLen / usr / local / psa / admin / conf / templates / default / domain / domainVirtualHost.php FcgidMaxRequestLen 16777216

# sed -i 's / FcgidMaxRequestLen 16777216 / FcgidMaxRequestLen 1073741824 / g' / usr / local / psa / admin / conf / templates / default / domain / domainVirtualHost.php

# grep -ir FcgidMaxRequestLen / usr / local / psa / admin / conf / templates / default / domain / domainVirtualHost.php FcgidMaxRequestLen 1073741824

Restore virtual host configurations.

# / usr / local / psa / admin / bin / httpdmng --reconfigure-all # / usr / local / psa / admin / bin / httpdmng --reconfigure-server

https://support.plesk.com/hc/en-us/articles/213955145-Unable-to-upload-large-files-via-PHP-HTTP-request-length-exceeds-MaxRequestLen

0
source

Source: https://habr.com/ru/post/1491579/


All Articles