Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

building static php pages **

Quote Reply
building static php pages **
Are there any known problems/limitations in changing the extention of the static build pages to .PHP? The site needs to be indexed properly by search engine spiders and from my experience, dynamic pages (ie. page.php) do not index well.

Thanks in advance.
-simon
http://www.fatscripts.com
Quote Reply
Re: [lastsaga] building static php pages ** In reply to
Yeah.. it shouldn't be a problem. Its just a case of setting build_extension and build_index I believe to index.php and .php.

LSQL will then build the heirarchy something like;

index.php
Category/index.php
Category/more2.php
Category2/index.php

...etc.

Please note, you will need to edit the normal HTML templates, and NOT the default_php one for what you are trying to acomplish (as nph-build.cgi will not use the default_php template set).

Cheers

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] building static php pages ** In reply to
i read something about this, but i'm not exactly sure how to get around it. when i changed the extension of the static build files from .html to .php, all of my linksql global variables and functions stopped working. it's easy enough to just create and include another php file with all the variables, but.. yeah.

i wasn't made aware of this limitation when changing my build extension to .php. are there any other issues i should watch out for?

oh, and how have other people gone about building their static php pages without using the linksql globals? is there a workaround?

thanks in advance
-simon
http://www.fatscripts.com

Last edited by:

lastsaga: Nov 7, 2003, 4:12 PM
Quote Reply
Re: [lastsaga] building static php pages ** In reply to
That shouldn't be the case at all. You can use globals/plugins etc all fine with static generated pages.. no matter what they are named... For example, you could use index.foo, index.ace , or anything you want :-) (as long as your server knows what to parse the extension as).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] building static php pages ** In reply to
hm, i'll take a look again at what the error is then. if i can't figure it out i'll go ahead and post the error on here. thanks for your help andy!
-simon
http://www.fatscripts.com
Quote Reply
Re: [lastsaga] building static php pages ** In reply to
alright, here we go:

my home.html contains just this:

Code:
<html>

<head>
<title><?php echo $site_title ?> | <?php echo $company_name ?></title>
<meta name="description" content="">
<meta name="keywords" content="">
<?php echo $css ?>
</head>
<?php echo $body_tag?>
<center>
<?php include('include_header.html')?>
</html>

the error i get is:
Code:
Warning: main(include_header.html): failed to open stream: No such file or directory in /home/fatty/public_html/index.php on line 11

Warning: main(): Failed opening 'include_header.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fatty/public_html/index.php on line 11
-simon
http://www.fatscripts.com
Quote Reply
Re: [lastsaga] building static php pages ** In reply to
That usually means that php couldn't open include_header.html. This is usually caused by permission problems.

Looking at the error again, it looks like you have to use a full path to the file (unless it's in the same directory as index.php)

Adrian

Last edited by:

brewt: Nov 10, 2003, 10:11 PM
Quote Reply
Re: [lastsaga] building static php pages ** In reply to
It might be that you have to copy your globals.txt file into the default_php directory

------------------------------------------