Jump to content
Sign in to follow this  
aradhya

CGI error....help urgent

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?...

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

...earlier when i said it seems to b working....well turns out i was wrong....the problem is still ther..but the error is shown only on sum pc's...not all of them....ne ideas people????.

Share this post


Link to post
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.

Share this post


Link to post
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??..

Share this post


Link to post
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.

Share this post


Link to post
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...!!

Edited by aradhya

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...