Mixed PHP/SSI and environment variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have a problem with the persistence of environment variables when 
mixing PHP and SSI (Apache) and I am not sure if I just made an error 
or if this approach cannot work at all.
So please consider the following files:

setvar.shtml
-------------------------------------------------
<!--#set var="myvar" value="myval" -->
-------------------------------------------------

showvar.php
-------------------------------------------------
<?php echo apache_getenv( "myvar" ); ?>
-------------------------------------------------

info.shtml
-------------------------------------------------
<!--#include virtual="setvar.shtml" -->
<!--#include virtual="showvar.php" -->
-------------------------------------------------

info.php
-------------------------------------------------
<?php
  virtual( "setvar.shtml" );
  echo apache_getenv( "myvar" );
?>
-------------------------------------------------

What I would expect is that you get the same result if you call 
info.shtml and info.php. What happens when I tried (PHP 4.3.10 with 
both Apache 1.3.33 and 2.0.53): the shtml shows the variable but the 
php does not, it seems to "forget" the variable set in setvar.shtml.
Please, can anybody tell me what is going wrong here?

Regards, Christoph

-- 
Christoph Freundl    http://www10.informatik.uni-erlangen.de/~chfreund/
Lehrstuhl für Systemsimulation (Inf. 10), Cauerstr. 6, D-91058 Erlangen
   The earth is like a tiny grain of sand, only much, much heavier.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux