cancel
Showing results for 
Search instead for 
Did you mean: 

ccgi down

pentwyn
Grafter
Posts: 41
Thanks: 6
Registered: ‎31-07-2007

Re: ccgi down

Many thanks Bob for the frequent updates..... 
My site seems to be OK again now..... Smiley

Rhys
Gabe
Community Veteran
Posts: 767
Registered: ‎29-10-2008

Re: ccgi down

Here is one I prepared earlier:
A non-obvious change from the old ccgi platform is that the new ccgi platform uses suEXEC to run scripts as your user. suEXEC checks that neither the script nor the folder it's in are writable by anyone other than user (i.e., group or other) and will generate an error if either is. So script and folder permissions like 770 or 777 will not work on the new cgi platform.
suEXEC works with /~username mapping. This makes no difference to the URL you request.
However, when you request
http://ccgi.username.plus.com/foo.php
this gets rewritten so that suEXEC sees a script at /~username/foo.php
This rewrite happens before Apache checks your .htaccess file. So, if you use %{REQUEST_URI} in your RewriteCond, remember to test for a match on /~username/foo.php For example, to rewrite requests for the root directory to a subdirectory you would now use:

RewriteCond %{HTTP_HOST} ^ccgi\.username\.plus\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/~username/folder/
RewriteRule (.*) /folder/$1

(or substitute something like ^(www\.)?mydomain\.co\.uk$ in the first condition)

Alternatively, use %{ENV:SCRIPT_URL} if you want to test for the initial request, before rewrites.
In PHP, on the other hand, just to confuse you, _ENV["REQUEST_URI"] does not contain the /~username, and neither does _ENV["SCRIPT_URL"] but _SERVER["SCRIPT_NAME"], _SERVER["PHP_SELF"] and _ENV["SCRIPT_NAME"] do.
You'll notice that on the new ccgi platform, %{REQUEST_FILENAME} does contain the full file path and can be tested for file or directory status, so the trailing-slash problem would now be solved by:

RewriteBase /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R,L]

Another change to .htaccess is the scope of override. The new platform allows .htaccess to override only: FileInfo, AuthConfig and Limit directive types. This is much more secure, but may cause some formerly-allowed directives to fail; e.g. IndexIgnore must be removed.
Edit: incidentally, scripts with .php, .cgi and .pl extensions can now be run from anywhere under root. They don't need to be in the cgi-bin folder, which is just there for back compatibility.
maccladd
Newbie
Posts: 5
Registered: ‎15-03-2010

Re: ccgi down

So.... what does this mean now.... the server is OK, but my application doesn't work on the new setup?...
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500
ccgi.macclesfield-harriers.co.uk
Mon Mar 15 17:17:52 2010
Apache
bobpullen
Community Gaffer
Community Gaffer
Posts: 14,948
Thanks: 2,567
Fixes: 169
Registered: ‎04-04-2007

Re: ccgi down

Thanks Gabe Smiley
I'll use information like that to flesh out the FAQ and accompanying docs tomorrow...

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

jtonline
Grafter
Posts: 73
Thanks: 6
Registered: ‎21-03-2008

Re: ccgi down

I'm getting the Server Error! 500 too  Cry
Do I now have an error in a CGI script, or is it the server that's overloaded/not yet fully fixed?
bobpullen
Community Gaffer
Community Gaffer
Posts: 14,948
Thanks: 2,567
Fixes: 169
Registered: ‎04-04-2007

Re: ccgi down

The servers are hitting the process limit (looks like it's set lower than it was on the old platform). We're looking to up this now. Failing that I'd make sure your files are permissioned in accordance with the advice offered by Gabe here.

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

Tony_W
Grafter
Posts: 745
Registered: ‎11-08-2007

Re: ccgi down

I can FTP to it.
I can't get anything up on http to:
cgi.username.force9.co.uk
cgi.username.f9.co.uk
ccgi.username.force9.co.uk
ccgi.username.f9.co.uk
domainname.co.uk
www.domainname.co.uk - did come up once after a long time, but seemed to be pointing at my Homepages rather than the ccgi space
Tony
Edit - whatever you did while I was typing this seems to have helped. Domain now coming up OK
jtonline
Grafter
Posts: 73
Thanks: 6
Registered: ‎21-03-2008

Re: ccgi down

Thanks for the reply Bob.  I'll go and have a bite to eat and on my return, if I'm sill getting the same error, I'll see if I can figure out my file and folder permissions.
Quote from: Bob
The servers are hitting the process limit (looks like it's set lower than it was on the old platform). We're looking to up this now. Failing that I'd make sure your files are permissioned in accordance with the advice offered by Gabe here.
Tony_W
Grafter
Posts: 745
Registered: ‎11-08-2007

Re: ccgi down

I think that I spoke too soon. It will not allow me to do 'includes' from my Homepages server, so falls over.
This now also makes my www.username.f9.co.uk site fall over - it was working earlier but now takes for ever waiting for the ccgi server to reply.
Quote
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /share/storage/03/pl/username/contactus.php on line 2
Warning: include(http://www.username.f9.co.uk/contactus.php) [function.include]: failed to open stream: no suitable wrapper could be found in /share/storage/03/pl/username/contactus.php on line 2
Warning: include() [function.include]: Failed opening 'http://www.username.f9.co.uk/contactus.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /share/storage/03/pl/username/contactus.php on line 2

I seem to recall getting this on the PAYH trial.
MauriceC
Superuser
Superuser
Posts: 4,062
Thanks: 2,479
Fixes: 17
Registered: ‎10-04-2007

Re: ccgi down

Quote from: Bob
I'll use information like that to flesh out the FAQ and accompanying docs tomorrow...

Also looks like a strong candidate for the Community Library Bob?
M
marku
Grafter
Posts: 28
Registered: ‎12-03-2010

Re: ccgi down

Hi All.
I have perl scripts sitting in the cgi-bin folder without the .pl extension but with execute permissions.  On the old platform this was fine as the Perl intepreter processed them.  Now I'm getting an Access Forbidden, Error 403 as I guess the file is not seen as perl, is deemed a flat file and can't be opened as it doesn't have read permission.   Is my only option to rename them all with a .pl extension or can a configurable attribute be set that states 'All files in the cgi-bin folder with an execute permission, send them to Perl'
thanks
maccladd
Newbie
Posts: 5
Registered: ‎15-03-2010

Re: ccgi down

More general question - do I now need a plesk account to do anything with the new server?.... if so, how do I get one?
Slapdash
Newbie
Posts: 6
Registered: ‎05-09-2007

Re: ccgi down

No access to my site after the upgrade to Apache2 and PHP5
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: index.php
If you think this is a server error, please contact the webmaster.
Error 500
Mon Mar 15 18:27:59 2010
Apache
I do think its a Server Error
Gabe
Community Veteran
Posts: 767
Registered: ‎29-10-2008

Re: ccgi down

Quote from: maccladd
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

This can also be caused by a .htaccess error. May not be, but you get the same error message if it is.
Gabe
bobpullen
Community Gaffer
Community Gaffer
Posts: 14,948
Thanks: 2,567
Fixes: 169
Registered: ‎04-04-2007

Re: ccgi down

Quote from: maccladd
More general question - do I now need a plesk account to do anything with the new server?.... if so, how do I get one?

No.
Quote from: marku
I have perl scripts sitting in the cgi-bin folder without the .pl extension but with execute permissions.  On the old platform this was fine as the Perl intepreter processed them.  Now I'm getting an Access Forbidden, Error 403 as I guess the file is not seen as perl, is deemed a flat file and can't be opened as it doesn't have read permission.  Is my only option to rename them all with a .pl extension or can a configurable attribute be set that states 'All files in the cgi-bin folder with an execute permission, send them to Perl'

Will need extensions setting to fork perl. Can you go here and raise a support ticket under Webspace & CGI > CGI > I have a problem after the upgrade to PHP5 requesting the same thing?
Quote from: MauriceC
Quote from: Bob
I'll use information like that to flesh out the FAQ and accompanying docs tomorrow...

Also looks like a strong candidate for the Community Library Bob?

That's where the placeholder lives.
Quote from: Tony
I think that I spoke too soon. It will not allow me to do 'includes' from my Homepages server, so falls over.

Could be an ACL issue, can you raise a support ticket too following the path above and we'll take a look into it tomorrow?

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵