ccgi down
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Re: ccgi down
Re: ccgi down
19-03-2010 10:58 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Bit confused by the ~username bit.
I access my cgi directly by cgi.username.force9.co.uk/folder/
But if I enter RewriteCond %{REQUEST_URI} !^/~username/folder/ it doesn't work - what does the ~ represent ?
When I upload the .htaccess it breaks the direct cgi access - if I delete the .htaccess I can navigate directly but then I don't have the domain forwarding...
EDIT: If I remove the Options +FollowSymlinks I can navigate directly to my folders but when I enter the www.534nm.co.uk I now get 403 access forbidden
Re: ccgi down
19-03-2010 11:19 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote But if I enter RewriteCond %{REQUEST_URI} !^/~username/folder/ it doesn't work - what does the ~ represent ?
"When prepended to a particular username, the tilde indicates that user's home directory" (straight from http://en.wikipedia.org/wiki/Tilde ; )
In your original post it looks like you were trying to redirect to the folder "534" from www.534nm.co.uk ?
Gabes post on page 2 explains why the ~username is now required. Hopefully he / or someone with more experience than me will be able to offer some better help.
Re: ccgi down
19-03-2010 11:19 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
"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"
Saying that the same PHP files runs fine in a sub directory. All the permissions are all set as '755' and we have disabled the .htaccass file...
See example http://www.promanade.co.uk - http://www.promanade.co.uk/test
Any help would be much appreciated.
Re: ccgi down
19-03-2010 11:59 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote Warning: include() [function.include]: Failed opening 'templates/homepage.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /share/storage/ (user file path omitted) /test/index.php on line 144
plus the failed to open stream message because templates/homepage.php was not found.
Hope that helps.
David
Re: ccgi down
19-03-2010 12:14 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Don't know if it was me or if plusnet have been tweaking, but finally if it will help anyone else, the following is now working for me !
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.534.co.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/~username/534/
RewriteRule (.*) /534/$1
And that ~username is exactly that - the ~ followed by my username.
I deleted the Options +FollowSymlinks
Re: ccgi down
19-03-2010 1:23 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Try it without the RewriteBase and see if that works for you.
Re: ccgi down
19-03-2010 3:57 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Our fault - we had set up a "holding" message because of the problems. Now reset back to the index.php file...
What I don't understand is why the script file executes in the subfolder but not in the root?
Re: ccgi down
19-03-2010 4:17 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Are you sure you've eliminated the following as the cause of the domain problem?
[quote=http://community.plus.net/forum/index.php/topic,84451.0.html]
8.) I'm getting a server 500 error when trying to browse to my web site.
The most common reason for this error is where customers are using .htaccess directives that are not compatible with the new servers. 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. For more information about this, please refer to the forum post here. If you're receiving this error then you should also check that your permissions adhere to the limitations detailed above.
9.) I'm getting a 'Premature end of script headers: index.php' error, what does it mean?
Check that your file permissions and any .htaccess files adhere to the limitations set out above. You should also check that you're using compatible environment variables. See here for more information.
Re: ccgi down
19-03-2010 5:29 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I've identified that the problem is with the .htaccess file that worked OK before. The problem is that the SEF settings in joomla don't work anymore (remapping of URLs).
The old .htacess was this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks
#
# mod_rewrite in use
RewriteEngine On
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)
#RewriteBase /
########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The new one requires that Options +FollowSymLinks is commented out, or it fails. However after this, I can't get it to rewrite the URLs. I read Gabes note about the ~username, and have tried adding this to the 3rd RewriteCond ( with my own username), but with no avail.
I assume that mod_rewrite is installed?
Any help would be greatly appreciated, as I've been down for a week now and am getting very grey!
Re: ccgi down
19-03-2010 11:10 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Crookwood So my Joomla site is still causing me problems...
Looks like you might need to uncomment the RewriteBase / line and if Joomla's in a folder make it RewriteBase /foldername
Gabe
Re: ccgi down
20-03-2010 12:12 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Unfortunately, this (uncomment rewritebase) doesn't seem to alter anything.
Basically the site is working fine, but the SEF modules outputs english filenames rather than php variables. Because I've encoded all of my links to these english names, without the redirection, they don't link.
I don't know what joomla module does the SEF work, but the rewriting doesn't work. It used to work fine on the old platform, but doesn't with the new platform. Everything else is the same. I've altered the permissions to 750 ( was 755 before), the recomended 710 locks the site out. I can investigate this later, but at present, the site works apart from the URL re-writing. I'm getting 404 or 500 errors. The only difference I can see is that the ~username gets inserted into all the URLs. This may be the problem, but I don't know how to erradicate it.
Any ideas?
Re: ccgi down
20-03-2010 1:12 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The rewrite base, has done something. My browser cache and an irregularity in joomla's links was confusing some of the pages.
So now it's working, thank you. Except it's throwing out ~username on each URL, which might confuse my google cache...
I'm guessing this is an .htaccess rule, but I'm not an expert. Any suggestions welcome!
Re: ccgi down
20-03-2010 1:34 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Not the ideal solution perhaps, but might well fix the problem, at least to get you going.
David
Re: ccgi down
20-03-2010 7:44 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Is it possible to generate a standard cgi script - of the kind that Gabe produced for altering permissions - that we can run which looks for all of the global variables in every PHP file and substitutes the preferred version e.g. $_SERVER['SCRIPT_URL']?
There aren't that many global variables and it would save people missing one in their own (complex) website. Also, some people who have installed off-the-shelf packages and do not understand the code, could still get one other obstacle out of the way.
Tony
Re: ccgi down
20-03-2010 1:14 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
For ones own code a competent editor should be able to do a global search for variables the user knows have been used. I'd be wary of unchecked replacements made by a script.
The problem with certain environment variables having a /~username prefix is not connected with the global_variables setting. I hope before too long Plusnet will be able to remove that prefix so pre-ccgi change behaviour is re-established. I regard changing to a different variable as a stop-gap measure to get things working until this is fixed.
David
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page