exec from php is causing an “Premature end of script headers: php-cgi.exe” error

前端 未结 2 580
借酒劲吻你
借酒劲吻你 2021-01-15 05:08

I have a php script written which calls an external command using exec which compiles a spacial database query result into a shape file. In tables with lots of records (say

2条回答
  •  无人共我
    2021-01-15 05:48

    Premature end of script headers means that webserver's timeout for CGI scripts was exceeded by your script. This is a webserver timeout and it has nothing to do with php.ini configuration. You need to look at your CGI handler configuration to increase time allowed for CGI scripts to run.

    E.g. if you are using mod_fastcgi you may want to specify the following option in your Apache config: FastCgiServer -idle-timeout 600 which will give you timeout of 10 minutes. By default fastcgi provides 30 seconds. You could find some other fastcgi options here http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html

提交回复
热议问题