Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: SSI include in PHP page  (Read 272 times)
0 Members and 1 Guest are viewing this topic.
gary-shah
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: October 19, 2003, 05:33:00 PM »

Umm ... I seem to be in need of using SSI include to my index.php page on the site.

From what I read thru 07/2002 --- it was not possible to do this on non-Apache configurations as PHP virtual() is specific to Apache module.

I am trying to get this to work on IIS 6.0 environment and have tried few things -- which errors out as follows:

1> Warning: shell_exec(): Unable to execute '/calendar/calendar.pl?template=ssi.html'

2> Warning: main(): Failed opening '/calendar/calendar.pl?template=ssi.html' for inclusion (include_path='.;c:\php4\pear')

3> Warning: passthru(): Unable to fork [/calendar/calendar.pl]

I am sure there is someone out there who has done this before ...

What are my options? Workarounds? OR this just cannot happen? Ummm ... can I possibly have .shtml page with .php include for PHP portion AND then use SSI? Has anyone used this specifically with CalendarScript?

Thanks

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: October 19, 2003, 06:07:00 PM »

** I seem to be in need of using SSI include to my index.php page on the site. What are my options? **

Read the calendar.pl file's output with PHP the same way you would read any external web page, then print out that code into your PHP page.

One way of doing it in PHP is shown in the previous forum message "Can I use PHP includes instead of SSI?".

Dan O.


[This message has been edited by DanO (edited October 19, 2003).]

Logged
gary-shah
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: October 19, 2003, 06:23:00 PM »

Thanks for the response.

I tried following using full URL AND adding template=ssi.html parameter ...

I get "Variable passed to each() is not an array or object"

<?php
$calendar = file("http://www.mysite.com/calendar/calendar.pl?template=ssi.html");
while ( list($key, $line) = each( $calendar ) )
{
echo "$line";
}
?>

Am I geeting close?

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

Logged
Pages: [1]   Go Up
Print
Jump to: