Free Ringtones - Loans - Meeting Rooms - Flights - Copyrights

PDA

View Full Version : Problems with php include and .shtml pages


jamjv
Dec 12th 2004, 1:45 pm
Hello,

First time poster long time browser.

I've set it up on another site and it worked great but for some strange reason it won't show the ads on www.buycollectablesonline.com.

All pages are .shtml and it does support php.
http://www.buycollectablesonline.com/test.php


I created the ad_network.php and the ad_network_ads.txt and set the permissions to 777.

I added this to the pages.

<!--#include virtual="/inc/ad_network.php" -->

As you can see when you view the source you dont see the php script or the <!--#include virtual="/inc/ad_network.php" --> code.

When I few the source via ftp i can see the <!--#include virtual="/inc/ad_network.php" --> so it seems to be not parsing the php.

The weird thing is when i renamed the php file and refreshed the page I would come up with an internal server error.

Any help would be appreciated.

Thanks.

jwtimmon
Dec 12th 2004, 3:24 pm
Try

<!--#include virtual="/ad_network.php" -->

instead of
<!--#include virtual="/inc/ad_network.php" -->


and move the ad_network.php out of the /inc folder into the root
same with the txt file



John

jamjv
Dec 12th 2004, 3:36 pm
Yeah I already tried that but it didn't work. The txt files is getting data if that helps.

jwtimmon
Dec 12th 2004, 3:41 pm
Do your SSI includes work anyway?

If your not sure use this

Last modified: <!--#echo var="LAST_MODIFIED" -->

which should insert a line into your page showing the date the file was modified
(assuming your using apache)
John

jwtimmon
Dec 12th 2004, 3:45 pm
Also try making a file called emm.... testads.php
put in it

<?php
readfile('http://ads.digitalpoint.com/network.php');
?>

save it to the root
call it from your browser
i.e. www.yourdomain.com/testads.php

you should see a page with an ad on it


John

jamjv
Dec 12th 2004, 5:41 pm
Yes the SSI includes are working fine and I ran that test and the ads show.

http://www.buycollectablesonline.com/testads.php

Hrrmm

csaba
Dec 13th 2004, 8:35 am
Try this
http://forums.digitalpoint.com/showthread.php?t=6197
Csaba

jamjv
Dec 13th 2004, 10:23 am
That worked, thanks csaba and jwtimmon. You guys were very helpful.