File locations to make php work ?
- 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
- :
- File locations to make php work ?
File locations to make php work ?
10-08-2010 11:02 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I'm trying to insert the navbar into my webpage using php.
I've removed the navbar html code from the webpage and stored in in a separate file called navbar.php and loaded it to the cgi server .
This file contains nothing else other than the navbar html ?
Where I've removed the navbar from my webpage I have replaced it with:
<?php include("MyUserName@cshell.plus.net/navbar.php"); ?>
which should insert the navbar at this point ?
I've loaded this page to the normal htdocs folder ?
It is not working, and I've tried various permutations, Could anyone please answer any of the following:
Does the navbar.php require any other code than the basic navbar html?
Have I uploaded this to the correct place; the cgi server ?
Have I loaded the webpage to the correct place; the 'normal' htdocs' server ?
Is the path "MyUserName@cshell.plus.net/navbar.php" absolutely correct ?
N.B. it took me several days to work out that adding ../ would get my images to load!!
Anything else I've missed out ?
Many thanks to anyone who can help.
Re: File locations to make php work ?
10-08-2010 12:25 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
jelv (a.k.a Spoon Whittler) Why I have left Plusnet (warning: long post!) Broadband: Andrews & Arnold Home::1 (FTTC 80/20) Line rental: Pulse 8 Home Line Rental (£14.40/month) Mobile: iD mobile (£4/month) |
Re: File locations to make php work ?
10-08-2010 1:20 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I've now changed the "Include" to :
<?php include("ccgi.username.plus.com/navbar.php"); ?>
but still no joy.
No error messages, just page loading without the navbar.
Any other thoughts ?
Regards
Re: File locations to make php work ?
10-08-2010 2:12 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
jelv (a.k.a Spoon Whittler) Why I have left Plusnet (warning: long post!) Broadband: Andrews & Arnold Home::1 (FTTC 80/20) Line rental: Pulse 8 Home Line Rental (£14.40/month) Mobile: iD mobile (£4/month) |
Re: File locations to make php work ?
10-08-2010 2:18 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
http://ccgi.grahammorris.plus.com/lhnavigation.php
then I get:
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: lhnavigation.php
If you think this is a server error, please contact the webmaster.
Error 500
ccgi.grahammorris.plus.com
Tue Aug 10 14:15:47 2010
Apache
Re: File locations to make php work ?
10-08-2010 3:34 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The CGI Upgrade FAQ stickied at the top of this board provides relevant information.
I think the problem with your webpage is because the page is on the homepages servers, and those servers do not understand PHP. The whole page would have to be on ccgi (and made executable) for it to work.
Re: File locations to make php work ?
10-08-2010 4:30 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I'll change permissions first, see what happens and then move to other server.
If I do, presumably I will have to change file extension to .php from .html ?
If this works I will want to change all my html web pages over, does that mean I will effectively have to move the entire site over to the other server ?
What about my images folder and the css file ?
Are there any other implications in this ?
Regards
Re: File locations to make php work ?
10-08-2010 5:03 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I'm now getting an unformatted page (no CSS ?) with the following 2 error messages where the navbar should be:
Warning: include(ccgi.grahammorris.plus.com/lhnavigation.php) [function.include]: failed to open stream: No such file or directory in /share/storage/02/gr/grahammorris/phptrial.php on line 115
Warning: include() [function.include]: Failed opening 'ccgi.grahammorris.plus.com/lhnavigation.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /share/storage/02/gr/grahammorris/phptrial.php on line 115
N.B. Line 115 is (I think !) the inclusion statement :
<?php include("ccgi.grahammorris.plus.com/lhnavigation.php"); ?>
Is that any help ?
Re: File locations to make php work ?
10-08-2010 6:38 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
<?php include("lhnavigation.php"); ?>
That's the relative path from where phptrial.php is located to the included script.
Files which are to be parsed by PHP need to have a .php extension.
If you want to run your site from ccgi everything will have to be on there including css and images, with the right file paths for the server to find them. The main implication is that it is going to involve you in a lot of work.
Re: File locations to make php work ?
10-08-2010 6:55 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Changing the file path loaded the navbar, & loading the css file to the cgi server sorted the formatting. I think I should be able to work the rest out from here - Thank you again

If you want to run your site from ccgi everything will have to be on there including css and images, - I don't necessarily want to, but it looks as though I will have to, if I want these php navbars to work ?
- 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
- :
- File locations to make php work ?