Jump to content

CGI error....help urgent


aradhya

Recommended Posts

ok so here is the problem...when sum ppl try to upload files on my website they complain of getting a cgi error.. The specified CGI application misbehaved by not returning a complete set of HTTP headers....i dunno wht this means....it was working perfectly fine for a while....n now its showing this error....ne syggestions?...

Link to comment
Share on other sites

This can happen if your users upload too big files, at which point PHP takes so long to receive and process the file that it terminates before outputting anything on screen.The only solution is to either decrease the size of the accepted files or increase it as much as needed along with increasing PHP's maximum execution time. Both of these settings can be set in php.ini.If you're not running the site on your own server, but are on a host, ask them how (and if) you can alter those php.ini settings... ideally, tell them about the actual problem too.

Link to comment
Share on other sites

The set_time_limit() is only executed after the input is processed. It seems your users are giving you so big files, that PHP takes more than 30 seconds to process them as input before starting your script (and the set_time_limit() therefore).That's why I said you should alter the setting in php.ini - the php.ini file is processed before the input, so the time can be truly increased. You can't solve this problem without it.

Link to comment
Share on other sites

so this is the content of the php5.ini file that i uploaded in the root directory of my folder...

max_execution_time = 2000max_input_time = 2000post_max_size = 60Mupload_max_filesize = 30Mmemory_limit = 32M....is this all right...do i need to add a .htacess file too...or will this work fine??..
Link to comment
Share on other sites

php5.ini?!? Are you sure the file is loaded? Is that what your host told you to use?php.ini is the main configuration file, and hosts will usually not allow you to alter it, but some may let you add an additional configuration file. What exactly is the location PHP will look into, and what will ignore depends on a few factors. You MUST contact your host about this. The possible combinations are many, and they are only the default ones. The host may twist them in various ways.

Link to comment
Share on other sites

yeah..i checked my servers php files...its php.ini....so i changed php5.ini to php.ini....n now i get cgi error even when i try to view the site....forgt abt uploading!!!>....where is the problem...???...also whn i remove the file from my root directory i am able to view the site...!!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...