Go back to previous page
Forum URL: http://www.dombom.com/cgi-bin/dcforum/dcboard.cgi
Forum Name: GodfatherBomb
Topic ID: 38
#0, SSI to PHP?
Posted by John McGovern on Aug-23-04 at 02:55 PM
Hi there,

I currently have my site set up to parse all .html pages as PHP pages (via the .htaccess file). Because of the programs running on my site, it's not easy to change over to SSI. How hard would it be to have this being read as PHP instead?

I've got credit card in hand ready to buy, but wanted to know how much tweaking I'll need to have done.

Thanks,
John


#1, RE: SSI to PHP?
Posted by jeffhope on Aug-23-04 at 03:20 PM
In response to message #0
Hi John,

The SSI include calls can be done with PHP instead very easily:

<? virtual("cgi-bin/...."); ?>

I use PHP for my own sites.


Jeff


#2, RE: SSI to PHP?
Posted by Kurt on Aug-23-04 at 03:24 PM
In response to message #1
John,

Jeff does it, but I can't support it simply because I don't know PHP.

Gbomb creates html pages which can be included in PHP pages, but this doesn't mean it will work with your individual situation...


#3, RE: SSI to PHP?
Posted by Jake Asbill on Dec-15-04 at 09:37 PM
In response to message #1
PHP can include SSI files using the above code, however I can not get the following to work with blog bomb.

<?php include($_SERVER<"DOCUMENT_ROOT">."/cgi-bin/bb/feedsearch_ssi.cgi?cat=1&random=1");?>

Any ideas on how to pass variables via SSI but using PHP? I dont think it can be done.

- J


#4, RE: SSI to PHP?
Posted by jeffhope on Dec-15-04 at 09:52 PM
In response to message #3
Jake,

You're right, PHP and SSI don't "speak" as a general rule.

But if you're using PHP, there should be no need to use SSI at all.

Can you explain more what you're trying to accomplish in your example? You shouldn't need to use the DOCUMENT_ROOT variable at all, as your server should typically see the /cgi-bin/... location properly, relative to the root. But maybe I'm missing something...

Jeff


#5, RE: SSI to PHP?
Posted by Jake on Dec-16-04 at 08:50 PM
In response to message #4
Hey Jeff,

Blog bomb requires variables to be passed in the SSI code to feedsearch. The information passed tells the CGI file what RSS data to extract back to the original page using the inclusion code.

PHP is having a hard time passing these variables and then returning the data that the perl script parses. I think I am going to have to rewrite the feedsearch file in PHP for this to work.

Best,

- JA


#6, RE: SSI to PHP?
Posted by jeffhope on Dec-16-04 at 08:56 PM
In response to message #5
Hi Jake,

You shouldn't have to rewrite anything. I use PHP with all the bombs all the time (a lot) & haven't had to rewrite anything yet.

I'm still not quite sure what you're having trouble with. If you're parsing your pages with PHP instead of SSI, you can do everything you need to do with PHP, no SSI required.

Ex:


<?
virtual("/cgi-bin/blogbomb/feedsearch_ssi.cgi?keywords=$phpkw&results=$phpnumresults");
?>

You should be able to substitute in PHP variables to your bomb query strings with no problem at all.

Jeff


#7, RE: SSI to PHP?
Posted by ezrydn on Jan-18-05 at 05:16 PM
In response to message #6
To all questioning the changeover from SSI to PHP,

When I first started my "stars-n-stripes" website, I went to Jeff for assistance because it was to be my first totally bombed site. Jeff talked me into changing from SSI to PHP and it with through without a hitch. Oh, I forgot to put little PHP tags in the right way a couple of times, which Jeff quickly caught and scolded me for being so hard headed, but it worked just fine. I know absolutely ZIP about SSI or PHP. Jeff told me how to change them and it's not hard to do.

BB would spit out SSI tags and I'd change them to PHP tags and that was it!

John


#8, RE: SSI to PHP?
Posted by jeffhope on Jan-18-05 at 05:20 PM
In response to message #7
Thanks John, and to everyone wondering the same thing:

Just remember it's not officially supported, and my time is limited. We're just calling the various bombs with PHP instead of SSI.

Everything you need to know is in my post 1 above.

Jeff