Welcome to WebmasterWorld Guest from 23.22.17.192

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

ssi include for web stat tracking on the php pages

how do we get a ssi include to work on php?

   
4:31 am on Jan 8, 2002 (gmt 0)

10+ Year Member



here is my ssi

<!--#include virtual="/_tx/traxis-counter.cgi?site=atwstat"-->

is is not being parsed / read by the tracking program on *.php pages ...

any thoughts?

This Does Work On html with

htaccess
Options Includes +ExecCGI

AddType text/x-server-parsed-html .html .htm

5:19 pm on Jan 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't think you can get PHP and SSI to coexist on the same page, but PHP has the virtual() function which does more or less the same job eg

<?
virtual("/_tx/traxis-counter.cgi?site=atwstat");
?>

This apparently only works if PHP is installed as an Apache module - I think it usually is.

6:14 pm on Jan 8, 2002 (gmt 0)

10+ Year Member



any other ideas???
this is the warnong message i get

<b>Warning</b>: Unable to include '/_tx/traxis-counter.cgi?site=atwstat' - request execution failed in <b>/home/sites/site30/web/content/index.php</b> on line <b>3</b><br>

6:25 pm on Jan 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<?php
$fpt = fopen("http://full/web/path/_tx/traxis-counter.cgi?site=atwstat");
$fpassthru($fpt);
?>

I think the problem in the previous example lies in the query string. Im not sure if this will work either. Be sure to change the path.

6:27 pm on Jan 8, 2002 (gmt 0)

WebmasterWorld Senior Member marcia is a WebmasterWorld Top Contributor of All Time 10+ Year Member



<!--#include virtual="/_tx/traxis-counter.cgi?site=atwstat"-->

<!--#include virtual="/_tx/traxis-counter.cgi?site=atwstat" -->

SSI's need to have that extra blank space after the final quote. Could that be it?

6:28 pm on Jan 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hmm, looks like it will work if the path is right. Try it without the leading / in "/_tx/", or if that doesn't work try the full server path/home/sites/site30/web/content/_tx/traxis-counter.cgi?site=atwstat
7:49 pm on Jan 8, 2002 (gmt 0)

10+ Year Member



... nope..

here is my last try...

any more ideas??? thanks

<?php
$fpt = fopen("home/sites/site30/web/_tx/traxis-counter.cgi?site=atwstat");
$fpassthru($fpt);
?>