News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Can't get SSI to work :(

Started by Grudge, August 10, 2003, 02:51:53 PM

Previous topic - Next topic

Grudge

Hey,

I've searched and read for the past hour trying to figure this out so I am completly lost as to what could be wrong so I post here :)

I've been trying to get SSI to work so that on my main index page for the site it will show the most recent posts. ssi_examples.php works absolutly FINE for me and everything comes up as it should.

I've added the require line to the very top of the document and the php line where I want the data. I don't get ANY error messages at all - I just get nothing. Absolutly nothing at all. Could there be anything I have to enable on my server? I already have the server set up the parse the files as SSI. Below is the code I am using in the html file:
<?php require("./yabbse/SSI.php"); ?>

<HTML><HEAD>
<TITLE>P0stWh0re.com - For All Your P0stWh0ring Needs</TITLE>
<STYLE type="text/css">
.windowbg
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #020A40;
  }
.windowbg2
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #05074D;
  }
.catbg
  {
    font-weight: bold;
    font-size: 13px;
    border-color: #000000;
    background-color: #C07018;
    color: #FFFFFF;
  }
</STYLE>
<!--#include virtual="titlebar.htm" -->
<?php phpinfo(); ?>
Newest threads:
<?php "latestMember();" ?>

<table width="100%" align="left" class="windowbg" bgcolor="windowbg" cellpadding="1" cellspacing="5">
<!--#include file="nphp/news.txt" -->
</table>


<!--#include virtual="footer.htm" -->
</HEAD></HTML>


The other includes are just the some HTML inserts. Also - I have set up my path corrently in SSI.php (Although I tried just . first and that also had no effect).
I'm only a half geek really...

۞

#1
The problem is, that you're using PHP on an SSI page. Which I believe does not work. Its best to stick to one or the other. for example

<?php require("./yabbse/SSI.php"); ?>

<HTML><HEAD>
<TITLE>P0stWh0re.com - For All Your P0stWh0ring Needs</TITLE>
<STYLE type="text/css">
.windowbg
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #020A40;
  }
.windowbg2
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #05074D;
  }
.catbg
  {
    font-weight: bold;
    font-size: 13px;
    border-color: #000000;
    background-color: #C07018;
    color: #FFFFFF;
  }
</STYLE>
<?php include("titlebar.htm"); ?>
<?php phpinfo(); ?>
Newest threads:
<?php "latestMember();" ?>

<table width="100%" align="left" class="windowbg" bgcolor="windowbg" cellpadding="1" cellspacing="5">
<?php include("./nphp/news.txt"); ?>
</table>


<?php include("footer.htm"); ?>
</HEAD></HTML>


And save it with a php extension, not shtml. If you want to use SSI instead of php, post here, and i'll show you how to do that.
TTTTTT  OOOOOO MMMMMM   BBBBBB


Grudge

Hey!! Thanks a lot for the reply! I haven't got time to test it now as I'm on my way to bed! I would prefer to save it as an shtml file if it's possible... If you could show me how to do it the other way I'd be very grateful. If not I'll try the other way tomorrow anyway!!!

Many Thanks!!
I'm only a half geek really...

[Unknown]

Do you use apache or IIS?

You can use shtml, just look at ssi_examples.shtml.

-[Unknown]

۞

Heres, how to do it with SSI:

<HTML><HEAD>
<TITLE>P0stWh0re.com - For All Your P0stWh0ring Needs</TITLE>
<STYLE type="text/css">
.windowbg
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #020A40;
  }
.windowbg2
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #05074D;
  }
.catbg
  {
    font-weight: bold;
    font-size: 13px;
    border-color: #000000;
    background-color: #C07018;
    color: #FFFFFF;
  }
</STYLE>
<!--#include virtual="titlebar.htm" -->
Newest threads:
<!--#include virtual="SSI.php?function=latestMember" -->

<table width="100%" align="left" class="windowbg" bgcolor="windowbg" cellpadding="1" cellspacing="5">
<!--#include file="nphp/news.txt" -->
</table>


<!--#include virtual="footer.htm" -->
</HEAD></HTML>


take a look at http://www.yabbse.org/community/ssi_examples.shtml for more info :)
TTTTTT  OOOOOO MMMMMM   BBBBBB


Grudge

Thanks, I feel really stupid now!!

I just checked my yabbse directory again and saw the ssi_examples.shtml file - I only noticed the php version before - stupid windows giving it a notepad option :( Anyway - thanks LOADS- you made my day!
I'm only a half geek really...

Advertisement: