Re: [PHP] SSI not working on PHP files with Apache

2010-09-02 Thread Per Jessen
Michael Alaimo wrote:

 Does special configuration have to take place with PHP to let apache
 process server side include files that are HTML documents?
 

PHP doesn't care, but you will need to configure apache to do both SSI
and PHP processing. 



-- 
Per Jessen, Zürich (17.8°C)


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



Re: [PHP] SSI problem with php after 4.3.10 - 4.4.1 upgrade

2005-12-06 Thread kristina clair
In case anyone encounters this problem - using the latest 4.4.x
snapshot fixed the problem for me (thanks, developers!).

Kristina

On 12/5/05, kristina clair [EMAIL PROTECTED] wrote:
 On 12/5/05, Jay Blanchard [EMAIL PROTECTED] wrote:
  [snip]
  I'm having a problem with certain SSI files which include php scripts
  after upgrding php from 4.3.10 to 4.4.1.
  The includes look like:
  !--#include file=eventsdb.php?ID=81fld=2 --
 
  In some cases, the page output is different with 4.4.1 than it is with
  4.3.10.  In the worst cases, Apache gives a segmentation fault, and
  the page is blank.
 
  Has anyone encountered any similar issues?
  [/snip]
 
  We'd have to see some code to begin to analyse what the problem might be.
  Can you send php code snips from eventdb.php?
 

 The code is short.  The same php script is being included in the page
 which is displaying differently and the page which is causing the
 apache segfault.

 if (empty($ID)){
 $ID='1';
 }
 $today = date(Ymd);
 $conn = mysql_connect ([snip]);
 if ($conn == false){
   echo mysql_errno() . :  . mysql_error() . BR;
   exit;
 }
 else {
 $rtn = mysql_select_db ([tablename]);
 $sql = select * from events where ID = .$ID;
 $result = mysql_query ($sql);
 if ( ($row = mysql_fetch_row($result)) 
 ($today=$row[4]
 ) ){
 //if ( $row =
 mysql_fetch_
 row($result)) {
 switch ($fld){
 case 2:
 echo $row[2];
 break;
 case 5:
 echo $row[5];
 break;
 case 6:
 echo $row[6];
 break;
 case 7:
 echo $row[7];
 break;
 default:
 echo $row[1];
 break;
   }
 }

}


 By the way, the backtrace from the apache segfault is:
 #0  0xb7e095cc in zend_hash_index_update_or_next_insert (ht=0xb7ea29c0, h=0,
 pData=0xbfffdc60, nDataSize=12, pDest=0x0, flag=1)
 at /home/sys/src/php-4.4.1/Zend/zend_hash.c:390
 390 p = ht-arBuckets[nIndex];
 (gdb) bt full
 #0  0xb7e095cc in zend_hash_index_update_or_next_insert (ht=0xb7ea29c0, h=0,
 pData=0xbfffdc60, nDataSize=12, pDest=0x0, flag=1)
 at /home/sys/src/php-4.4.1/Zend/zend_hash.c:390
 nIndex = 0
 p = Variable p is not available.
 (gdb)

 That segfault backtrace is the same even if I compile php with the
 --without-zend-memory-manager flag, and also when I disable all Zend
 settings in php.ini.

 Thanks,
 Kristina

 --
 In most cases, people, even wicked people, are far more naive and
 simple-hearted than one generally assumes.  And so are we.
 /* last line, 1st ch., The Brothers Karamazov */



--
In most cases, people, even wicked people, are far more naive and
simple-hearted than one generally assumes.  And so are we.
/* last line, 1st ch., The Brothers Karamazov */

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



[PHP] SSI problem with php after 4.3.10 - 4.4.1 upgrade

2005-12-05 Thread kristina clair
Hello,

I'm having a problem with certain SSI files which include php scripts
after upgrding php from 4.3.10 to 4.4.1.
The includes look like:
!--#include file=eventsdb.php?ID=81fld=2 --

In some cases, the page output is different with 4.4.1 than it is with
4.3.10.  In the worst cases, Apache gives a segmentation fault, and
the page is blank.

Has anyone encountered any similar issues?

Thanks,
Kristina

--
In most cases, people, even wicked people, are far more naive and
simple-hearted than one generally assumes.  And so are we.
/* last line, 1st ch., The Brothers Karamazov */

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



RE: [PHP] SSI problem with php after 4.3.10 - 4.4.1 upgrade

2005-12-05 Thread Jay Blanchard
[snip]
I'm having a problem with certain SSI files which include php scripts
after upgrding php from 4.3.10 to 4.4.1.
The includes look like:
!--#include file=eventsdb.php?ID=81fld=2 --

In some cases, the page output is different with 4.4.1 than it is with
4.3.10.  In the worst cases, Apache gives a segmentation fault, and
the page is blank.

Has anyone encountered any similar issues?
[/snip]

We'd have to see some code to begin to analyse what the problem might be.
Can you send php code snips from eventdb.php?

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



Re: [PHP] SSI problem with php after 4.3.10 - 4.4.1 upgrade

2005-12-05 Thread kristina clair
On 12/5/05, Jay Blanchard [EMAIL PROTECTED] wrote:
 [snip]
 I'm having a problem with certain SSI files which include php scripts
 after upgrding php from 4.3.10 to 4.4.1.
 The includes look like:
 !--#include file=eventsdb.php?ID=81fld=2 --

 In some cases, the page output is different with 4.4.1 than it is with
 4.3.10.  In the worst cases, Apache gives a segmentation fault, and
 the page is blank.

 Has anyone encountered any similar issues?
 [/snip]

 We'd have to see some code to begin to analyse what the problem might be.
 Can you send php code snips from eventdb.php?


The code is short.  The same php script is being included in the page
which is displaying differently and the page which is causing the
apache segfault.

if (empty($ID)){
$ID='1';
}
$today = date(Ymd);
$conn = mysql_connect ([snip]);
if ($conn == false){
  echo mysql_errno() . :  . mysql_error() . BR;
  exit;
}
else {
$rtn = mysql_select_db ([tablename]);
$sql = select * from events where ID = .$ID;
$result = mysql_query ($sql);
if ( ($row = mysql_fetch_row($result)) 
($today=$row[4]
) ){
//if ( $row =
mysql_fetch_
row($result)) {
switch ($fld){
case 2:
echo $row[2];
break;
case 5:
echo $row[5];
break;
case 6:
echo $row[6];
break;
case 7:
echo $row[7];
break;
default:
echo $row[1];
break;
  }
}

   }


By the way, the backtrace from the apache segfault is:
#0  0xb7e095cc in zend_hash_index_update_or_next_insert (ht=0xb7ea29c0, h=0,
pData=0xbfffdc60, nDataSize=12, pDest=0x0, flag=1)
at /home/sys/src/php-4.4.1/Zend/zend_hash.c:390
390 p = ht-arBuckets[nIndex];
(gdb) bt full
#0  0xb7e095cc in zend_hash_index_update_or_next_insert (ht=0xb7ea29c0, h=0,
pData=0xbfffdc60, nDataSize=12, pDest=0x0, flag=1)
at /home/sys/src/php-4.4.1/Zend/zend_hash.c:390
nIndex = 0
p = Variable p is not available.
(gdb)

That segfault backtrace is the same even if I compile php with the
--without-zend-memory-manager flag, and also when I disable all Zend
settings in php.ini.

Thanks,
Kristina

--
In most cases, people, even wicked people, are far more naive and
simple-hearted than one generally assumes.  And so are we.
/* last line, 1st ch., The Brothers Karamazov */

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



Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-29 Thread Richard Lynch
On Thu, October 27, 2005 3:43 am, Christoph Freundl wrote:
 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:

I *believe* that there are two different scenarios here:

1. Each virtual is a totally separate HTTP request, in the
stateless HTTP protocol, and your environment variables in one will
not (ever) survive to the next.

2. Apache is configured to do virtual requests as some kind of
sub-request and it's all in one single HTTP request/process/thread. 
I *think* this is a feature I've read about in HTTP specification at
http://apache.org

If I'm right about all this, none of this has much to do with PHP
really, and has everything to do with Apache and configuration.  You'd
have the same issues in mod_perl or mod_python as you are having in
PHP.

PS Abondon SSI and just use PHP and your headaches will all disappear.
:-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-29 Thread Richard Lynch
On Fri, October 28, 2005 9:36 am, Christoph Freundl wrote:
 Perhaps I return to what I primarily intended to ask: is it really the
 wanted behaviour of virtual() that changes that are made by the
 included file do not influence the environment of the including file?

That is most definitely a desirable behaviour for some users.

/virtual is a separate HTTP requestm just as if the user had surfed
there and crammed in the result.

HTTP is stateless for various reasons.

There are pros and cons to that, but it was not done on a whim.

You MIGHT be able to pass myvar *into* the /virtual as a GET arg...

!-- #virtual /whatever.shtml?myvar=!-- #print myvar 

I'm pretty sure of 2 things:
1. !-- #print myvar -- is probably not how you print out an SSI var.
2. Even if it *IS* how you do it, nesting the !-- # directives ain't
gonna work.

But you get the idea.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Christoph Freundl
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 Freundlhttp://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



Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Jochem Maas

Christoph Freundl wrote:

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 );


have yuou tried include/require here instead of virtual()

I imagine that the env of the subprocess wouldn't affect
the env of the parent process - i.e. to me it makes sense
if you say the env var in the subprocess is not available in
the parent process.


  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



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



Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Christoph Freundl
Am Freitag, 28. Oktober 2005 13:22 schrieb Jochem Maas:
  info.php
  -
  ?php
virtual( setvar.shtml );

 have yuou tried include/require here instead of virtual()

 I imagine that the env of the subprocess wouldn't affect
 the env of the parent process - i.e. to me it makes sense
 if you say the env var in the subprocess is not available in
 the parent process.

echo apache_getenv( myvar );
  ?
  -

Nope, both include and require result that the content of setvar.shtml 
shows up literally in the output without the SSI having been processed 
by Apache.

-- 
Christoph Freundlhttp://www10.informatik.uni-erlangen.de/~chfreund/
Lehrstuhl für Systemsimulation (Inf. 10), Cauerstr. 6, D-91058 Erlangen
  Quiet people aren't the only ones who don't say much. - R. Baalke

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



Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Jochem Maas

Christoph Freundl wrote:

Am Freitag, 28. Oktober 2005 13:22 schrieb Jochem Maas:


info.php
-
?php
 virtual( setvar.shtml );


have yuou tried include/require here instead of virtual()

I imagine that the env of the subprocess wouldn't affect
the env of the parent process - i.e. to me it makes sense
if you say the env var in the subprocess is not available in
the parent process.



 echo apache_getenv( myvar );
?
-



Nope, both include and require result that the content of setvar.shtml 
shows up literally in the output without the SSI having been processed 
by Apache.



ok, and if you stick the following in 1 file and call it?:

!--#set var=myvar value=myval --
?php echo apache_getenv( myvar ); ?


... just thinking out loud here.





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



Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Christoph Freundl
Am Freitag, 28. Oktober 2005 13:42 schrieb Jochem Maas:
 ok, and if you stick the following in 1 file and call it?:

 !--#set var=myvar value=myval --
 ?php echo apache_getenv( myvar ); ?

 ... just thinking out loud here.

Ok, I tried this by configuring Apache such that .php-files are also 
parsed for Server Side Includes and wrote it the way you suggest. Now 
I am really confused: the SSI statements are obviously recognized 
because they do not appear in the resulting file but
a) apache_getenv does still not return the value for the variable but
b) if I call phpinfo() instead of apache_getenv the variable myvar 
plus the set value is shown correctly in the Apache Environment and
c) an SSI !--#echo var=myvar -- after the php block also gives the
correct value

Perhaps I return to what I primarily intended to ask: is it really the 
wanted behaviour of virtual() that changes that are made by the 
included file do not influence the environment of the including file?

Regards, Christoph

-- 
Christoph Freundlhttp://www10.informatik.uni-erlangen.de/~chfreund/
Lehrstuhl für Systemsimulation (Inf. 10), Cauerstr. 6, D-91058 Erlangen
Tel: +49-9131-85-28676 | A low voter turnout is an indication of fewer
Fax: +49-9131-85-28928 |people going to the polls. - D. Quayle

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



Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Jochem Maas

Christoph Freundl wrote:

Am Freitag, 28. Oktober 2005 13:42 schrieb Jochem Maas:


ok, and if you stick the following in 1 file and call it?:

!--#set var=myvar value=myval --
?php echo apache_getenv( myvar ); ?

... just thinking out loud here.




I just looked at apache_getenv():

string apache_getenv ( string variable [, bool walk_to_top] )

the second arg maybe something to consider?
also does getenv() [http://php.net/getenv] have the same problems?




Ok, I tried this by configuring Apache such that .php-files are also 
parsed for Server Side Includes and wrote it the way you suggest. Now 
I am really confused: the SSI statements are obviously recognized 
because they do not appear in the resulting file but

a) apache_getenv does still not return the value for the variable but
b) if I call phpinfo() instead of apache_getenv the variable myvar 
plus the set value is shown correctly in the Apache Environment and

c) an SSI !--#echo var=myvar -- after the php block also gives the
correct value

Perhaps I return to what I primarily intended to ask: is it really the 
wanted behaviour of virtual() that changes that are made by the 
included file do not influence the environment of the including file?


I would say yes because virtual() create a sub-process, with it _own_ env.



Regards, Christoph



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



[PHP] SSI and PHP

2004-10-13 Thread j kensler
I've got to use some server side includes (and some SETs). 
And PHP is set up as a CGI program.

If I include the php page from the .shtml page, the php page cannot
receive queries.

.php files are not set up to process these includes.

And of course virtual(), etc. do not work because PHP is set up as CGI.

Anyone know of any good work around tricks?

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



Re: [PHP] SSI and PHP

2004-10-13 Thread Dan Joseph
 I've got to use some server side includes (and some SETs).
 And PHP is set up as a CGI program.
 
 If I include the php page from the .shtml page, the php page cannot
 receive queries.
 
 .php files are not set up to process these includes.
 
 And of course virtual(), etc. do not work because PHP is set up as CGI.
 
 Anyone know of any good work around tricks?

I've moved to using include(), I can't use SSIs either.  Is this a
viable option for you?  Do you maybe have some code examples we could
take a look at to help you further?

-Dan Joseph

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



Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Evan Nemerson
On Saturday 24 April 2004 10:29 pm, Tim Traver wrote:
 Hi all,

 ok, this may be a dumb question, but I have a page that has server side
 includes that include a php script like this :

 !--#include virtual=schedule.php --

 works fine, except the script doesn't appear to receive any of the query
 string information if that page has a query string on it...

 an example would be something like this :

 http://www.domain.com/index.shtml?myvariable=1

 the php script should get $_REQUEST['myvariable']==1, but instead does not
 get any of the query information.

 The $_SERVER global gets the unescaped query string, but has no value for
 just the query string...

um, huh? you mean it has the query string but it isn't parsed into the proper 
superglobals ($_GET, $_REQUEST)? Not really sure what you're looking for here 
so i'm going to just pretend this paragraph isn't here ;)

 any way around this without making the whole page a php script ?

php.net/parse_str

 Thanks,

 Tim

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
The greatest mistake is to imagine that the human being is an autonomous 
individual. The secret freedom which you can supposedly enjoy under a 
despotic government is nonsense, because your thoughts are never entirely 
your own. Philosophers, writers, artists, even scientists, not only need 
encouragement and an audience, they need constant stimulation from other 
people. It is almost impossible to think without talking. If Defoe had really 
lived on a desert island, he could not have written Robinson Crusoe, nor 
would he have wanted to. Take away freedom of speech, and the creative 
faculties dry up.

-George Orwell

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



Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Burhan Khalid
Tim Traver wrote:
Hi all,

ok, this may be a dumb question, but I have a page that has server side 
includes that include a php script like this :
Please send a new message if you have a new question, and do not reply 
to a thread and change the subject.  It breaks the conversation flow.

Where is that newbie guide?

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


Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Tim Traver
Yes, I mean that php gets the server information for the request, but it 
doesn't get the QUERY_STRING variable. But it does get the 
UNESCAPED_QUERY_STRING variable...wierd, huh ?

It might be that apache isn't sending that variable to php from an included 
file...not sure...

That's why I'm asking everyone.

Tim.

At 01:22 AM 4/25/2004, Evan Nemerson wrote:
On Saturday 24 April 2004 10:29 pm, Tim Traver wrote:
 Hi all,

 ok, this may be a dumb question, but I have a page that has server side
 includes that include a php script like this :

 !--#include virtual=schedule.php --

 works fine, except the script doesn't appear to receive any of the query
 string information if that page has a query string on it...

 an example would be something like this :

 http://www.domain.com/index.shtml?myvariable=1

 the php script should get $_REQUEST['myvariable']==1, but instead does not
 get any of the query information.

 The $_SERVER global gets the unescaped query string, but has no value for
 just the query string...
um, huh? you mean it has the query string but it isn't parsed into the proper
superglobals ($_GET, $_REQUEST)? Not really sure what you're looking for here
so i'm going to just pretend this paragraph isn't here ;)

 any way around this without making the whole page a php script ?
php.net/parse_str

 Thanks,

 Tim
--
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en
--
The greatest mistake is to imagine that the human being is an autonomous
individual. The secret freedom which you can supposedly enjoy under a
despotic government is nonsense, because your thoughts are never entirely
your own. Philosophers, writers, artists, even scientists, not only need
encouragement and an audience, they need constant stimulation from other
people. It is almost impossible to think without talking. If Defoe had really
lived on a desert island, he could not have written Robinson Crusoe, nor
would he have wanted to. Take away freedom of speech, and the creative
faculties dry up.
-George Orwell

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


SimpleNet's Back !
http://www.simplenet.com


Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Evan Nemerson
On Sunday 25 April 2004 09:56 am, Tim Traver wrote:
 Yes, I mean that php gets the server information for the request, but it
 doesn't get the QUERY_STRING variable. But it does get the
 UNESCAPED_QUERY_STRING variable...wierd, huh ?

Yeah, especially since I've never heard of UNESCAPED_QUERY_STRING- but then 
again, neither has google- 
http://www.google.com/search?q=%22UNESCAPED_QUERY_STRING%22

Can you send a copy of the variable, or if you're comfortable a phpinfo()?

 It might be that apache isn't sending that variable to php from an included
 file...not sure...

 That's why I'm asking everyone.

 Tim.

 At 01:22 AM 4/25/2004, Evan Nemerson wrote:
 On Saturday 24 April 2004 10:29 pm, Tim Traver wrote:
   Hi all,
  
   ok, this may be a dumb question, but I have a page that has server side
   includes that include a php script like this :
  
   !--#include virtual=schedule.php --
  
   works fine, except the script doesn't appear to receive any of the
   query string information if that page has a query string on it...
  
   an example would be something like this :
  
   http://www.domain.com/index.shtml?myvariable=1
  
   the php script should get $_REQUEST['myvariable']==1, but instead does
   not get any of the query information.
  
   The $_SERVER global gets the unescaped query string, but has no value
   for just the query string...
 
 um, huh? you mean it has the query string but it isn't parsed into the
  proper superglobals ($_GET, $_REQUEST)? Not really sure what you're
  looking for here so i'm going to just pretend this paragraph isn't here
  ;)
 
   any way around this without making the whole page a php script ?
 
 php.net/parse_str
 
   Thanks,
  
   Tim
 
 --
 Evan Nemerson
 [EMAIL PROTECTED]
 http://coeusgroup.com/en
 
 --
 The greatest mistake is to imagine that the human being is an autonomous
 individual. The secret freedom which you can supposedly enjoy under a
 despotic government is nonsense, because your thoughts are never entirely
 your own. Philosophers, writers, artists, even scientists, not only need
 encouragement and an audience, they need constant stimulation from other
 people. It is almost impossible to think without talking. If Defoe had
  really lived on a desert island, he could not have written Robinson
  Crusoe, nor would he have wanted to. Take away freedom of speech, and the
  creative faculties dry up.
 
 -George Orwell
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 SimpleNet's Back !
 http://www.simplenet.com

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
The greatest mistake is to imagine that the human being is an autonomous 
individual. The secret freedom which you can supposedly enjoy under a 
despotic government is nonsense, because your thoughts are never entirely 
your own. Philosophers, writers, artists, even scientists, not only need 
encouragement and an audience, they need constant stimulation from other 
people. It is almost impossible to think without talking. If Defoe had really 
lived on a desert island, he could not have written Robinson Crusoe, nor 
would he have wanted to. Take away freedom of speech, and the creative 
faculties dry up.

-George Orwell

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



Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Tim Traver
Hmmm after doing more research on it, it appears that this server 
variable only appears in SSI documents.

And I didn't quote the variable correctly, its QUERY_STRING_UNESCAPED

I guess that SSI does not send through the querystring to the included script.

I might have to just use the QUERY_STRING_UNESCAPED variable and populate 
the $_REQUEST array myself, cause the QUERY_STRING variable is empty...

Tim.



At 10:52 AM 4/25/2004, Evan Nemerson wrote:
On Sunday 25 April 2004 09:56 am, Tim Traver wrote:
 Yes, I mean that php gets the server information for the request, but it
 doesn't get the QUERY_STRING variable. But it does get the
 UNESCAPED_QUERY_STRING variable...wierd, huh ?
Yeah, especially since I've never heard of UNESCAPED_QUERY_STRING- but then
again, neither has google-
http://www.google.com/search?q=%22UNESCAPED_QUERY_STRING%22
Can you send a copy of the variable, or if you're comfortable a phpinfo()?

 It might be that apache isn't sending that variable to php from an included
 file...not sure...

 That's why I'm asking everyone.

 Tim.

 At 01:22 AM 4/25/2004, Evan Nemerson wrote:
 On Saturday 24 April 2004 10:29 pm, Tim Traver wrote:
   Hi all,
  
   ok, this may be a dumb question, but I have a page that has server side
   includes that include a php script like this :
  
   !--#include virtual=schedule.php --
  
   works fine, except the script doesn't appear to receive any of the
   query string information if that page has a query string on it...
  
   an example would be something like this :
  
   http://www.domain.com/index.shtml?myvariable=1
  
   the php script should get $_REQUEST['myvariable']==1, but instead does
   not get any of the query information.
  
   The $_SERVER global gets the unescaped query string, but has no value
   for just the query string...
 
 um, huh? you mean it has the query string but it isn't parsed into the
  proper superglobals ($_GET, $_REQUEST)? Not really sure what you're
  looking for here so i'm going to just pretend this paragraph isn't here
  ;)
 
   any way around this without making the whole page a php script ?
 
 php.net/parse_str
 
   Thanks,
  
   Tim
 
 --
 Evan Nemerson
 [EMAIL PROTECTED]
 http://coeusgroup.com/en
 
 --
 The greatest mistake is to imagine that the human being is an autonomous
 individual. The secret freedom which you can supposedly enjoy under a
 despotic government is nonsense, because your thoughts are never entirely
 your own. Philosophers, writers, artists, even scientists, not only need
 encouragement and an audience, they need constant stimulation from other
 people. It is almost impossible to think without talking. If Defoe had
  really lived on a desert island, he could not have written Robinson
  Crusoe, nor would he have wanted to. Take away freedom of speech, and the
  creative faculties dry up.
 
 -George Orwell
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 SimpleNet's Back !
 http://www.simplenet.com
--
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en
--
The greatest mistake is to imagine that the human being is an autonomous
individual. The secret freedom which you can supposedly enjoy under a
despotic government is nonsense, because your thoughts are never entirely
your own. Philosophers, writers, artists, even scientists, not only need
encouragement and an audience, they need constant stimulation from other
people. It is almost impossible to think without talking. If Defoe had really
lived on a desert island, he could not have written Robinson Crusoe, nor
would he have wanted to. Take away freedom of speech, and the creative
faculties dry up.
-George Orwell

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


SimpleNet's Back !
http://www.simplenet.com


[PHP] SSI and query string variables to PHP

2004-04-24 Thread Tim Traver
Hi all,

ok, this may be a dumb question, but I have a page that has server side 
includes that include a php script like this :

!--#include virtual=schedule.php --

works fine, except the script doesn't appear to receive any of the query 
string information if that page has a query string on it...

an example would be something like this :

http://www.domain.com/index.shtml?myvariable=1

the php script should get $_REQUEST['myvariable']==1, but instead does not 
get any of the query information.

The $_SERVER global gets the unescaped query string, but has no value for 
just the query string...

any way around this without making the whole page a php script ?

Thanks,

Tim

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


[PHP] SSI and query string variables to PHP

2004-04-24 Thread Tim Traver
Hi all,

ok, this may be a dumb question, but I have a page that has server side 
includes that include a php script like this :

!--#include virtual=schedule.php --

works fine, except the script doesn't appear to receive any of the query 
string information if that page has a query string on it...

an example would be something like this :

http://www.domain.com/index.shtml?myvariable=1

the php script should get $_REQUEST['myvariable']==1, but instead does not 
get any of the query information.

The $_SERVER global gets the unescaped query string, but has no value for 
just the query string...

any way around this without making the whole page a php script ?

Thanks,

Tim 

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


[PHP] ssi problem

2003-02-21 Thread Hans Prins
Could anyone please shed some light on the following issue?

I have a problem with including a test.php into a test.shtml and passing
a variable to the test.shtml which should be available and processed in
the test.php

the test.php document includes the following:
---

?php

if ($HTTP_GET_VARS['theValue']) {
print $HTTP_GET_VARS['theValue'];
} else {
print
form method=\GET\ action=\test.shtml\
input type=\text\ name=\theValue\ size=\20\
input type=\submit\ value=\Submit\ name=\submit_button\
/form
;
}

?

the test.shtml document includes the following:
-

html
head
titlepoll/title
/head
body
!--#include virtual=test.php --
/body
/html

I've also tried using the POST method but I got an error stating that post
is not a valid method in shtml.

I have also considered a session variable but since a session needs to
initiated or continued before anything is output to the browser that wont
work (I think).

does anyone have a solution to get this to work?

thanks,
Hans



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



Re: [PHP] Re: Strange problem with PHP,SSI

2002-12-17 Thread sport4ever
Hello

my page is .SHTML format, so I can't use ?php include('path/to/file') ? or
any PHP coding..

another strange thing, I found that the page source contains the included
PHP content, without executing it!!
I mean, when I use the sentince:

!--#include virtual=sympoll/poll.php?id=2 --

I found the follwoing in the source:

?php

  require './booth.php';
  display_booth($id);

?

which is the content of included file (poll.php)!!!

notice that when ever I put this php INCLUDE before any other php INCLUDE
command, it executed perfectly, but the other INCLUDE's would have this
problem (printing out the contents of included file without execution)

As I said before, this problem happens if and only if I include PHP script,
no problems when including SHTML or HTML pages!

please help :(


- Original Message -
From: conbud [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Sport4ever [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, December 15, 2002 10:39 AM
Subject: [PHP] Re: Strange problem with PHP,SSI


 Sport4ever wrote:
  PHP version: 4.2.1
  OS: RedHat Linux 8
  Apache version: 2.0
 
  My problem is that I can't execute more than one (SSI include) on my
website JUST for PHP file.. so there is NO problems at all if I include HTML
or SHTML files.
 
  Anyway, if I include 2 PHP files into any page, the first INCLUDE
statement would execute correctly and print out the file output, but the
second INCLUDE statement would NOT execute, and instead, the statement
printed in the page source as it is:
 
  !--#include virtual=sympoll/poll.php?id=2 --
 
  notice that this problem was not exist in my server before I upgrade PHP
from 4.1.2 to 4.2.1 and Apache from 1.3 to 2.0 and Linux from 7.3 to 8.0 !!
 
  any idea?
 
 
--

 Hey, you could try using the PHP include

 ?php include('path/to/file') ?

 or

 ?php require('path/to/file') ?


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


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




[PHP] Strange problem with PHP,SSI

2002-12-14 Thread sport4ever
PHP version: 4.2.1
OS: RedHat Linux 8
Apache version: 2.0

My problem is that I can't execute more than one (SSI include) on my website JUST for 
PHP file.. so there is NO problems at all if I include HTML or SHTML files.

Anyway, if I include 2 PHP files into any page, the first INCLUDE statement would 
execute correctly and print out the file output, but the second INCLUDE statement 
would NOT execute, and instead, the statement printed in the page source as it is:

!--#include virtual=sympoll/poll.php?id=2 --

notice that this problem was not exist in my server before I upgrade PHP from 4.1.2 to 
4.2.1 and Apache from 1.3 to 2.0 and Linux from 7.3 to 8.0 !!

any idea?




[PHP] Re: Strange problem with PHP,SSI

2002-12-14 Thread conbud
Sport4ever wrote:

PHP version: 4.2.1
OS: RedHat Linux 8
Apache version: 2.0

My problem is that I can't execute more than one (SSI include) on my website JUST for PHP file.. so there is NO problems at all if I include HTML or SHTML files.

Anyway, if I include 2 PHP files into any page, the first INCLUDE statement would execute correctly and print out the file output, but the second INCLUDE statement would NOT execute, and instead, the statement printed in the page source as it is:

!--#include virtual=sympoll/poll.php?id=2 --

notice that this problem was not exist in my server before I upgrade PHP from 4.1.2 to 4.2.1 and Apache from 1.3 to 2.0 and Linux from 7.3 to 8.0 !!

any idea?




Hey, you could try using the PHP include

?php include('path/to/file') ?

or

?php require('path/to/file') ?


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




Re: [PHP] SSI

2001-12-26 Thread Alexander Skwar

So sprach »[EMAIL PROTECTED]« am 2001-12-21 um 15:12:54 -0800 :
 if you have a PHP page and you want to use SSI in it... is there a special
 method?

Yes - scrap it.  It's neither senseful nor possible.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 6 days 17 hours 59 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP ssi

2001-12-25 Thread Joel Boonstra

 No, this isnt possible - but the constructs in PHP should allow you to
 do anything you can do with SSI just as easily.

This may be possible with Apache 2.0 and greater, once it's in stable
release (perhaps it is already).  It would allow the server to perform
multiple passes on documents, thus allowing your PHP script to execute and
output SSI, which would then get parsed by the server and be executed,
again.

Why you would need this, I don't know.  As people already mentioned, SSI's
very limited capabilities should all be available in PHP.

Joel

-- 
[ joel boonstra | [EMAIL PROTECTED] ]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SSI

2001-12-22 Thread Philip Olson

Things you can do:

 a) rewrite SSI as PHP
 b) rewrite SSI as PHP
 c) try using virtual()
 d) include them via http, like with file() or include() or fopen()

(a) and (b) are preferred, (c) will work as will (d) and most likely [e-z] 
:)  Also, search through the archives for other advice on the matter:

 http://marc.theaimsgroup.com/?l=php-generals=SSI

Essentially you can't mingle SSI/PHP code in one file as the web server
wants to parse a given extension as, in this case, PHP.  PHP can do
anything SSI can do, and then a great deal more.

Read about predefined variables and include() in php manual too.

Regards,
Philip Olson


On Fri, 21 Dec 2001 [EMAIL PROTECTED] wrote:

 if you have a PHP page and you want to use SSI in it... is there a special
 method?
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP ssi

2001-12-21 Thread Nick

Is it possible to have a .php file parse SSI's?  I tried adding .php as a
SSI file but it overwrote the php type, and wouldn't display PHP.  And
vice-versa.  If not, i'd hafta write a php script that executes a program,
and take the output from that program and parse it, which I don't know how
to do.  If anyone can help on that, please do so, and if anyone knows how to
get SSI working with PHP, please let me know how.  Thanks.

-Nick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP ssi

2001-12-21 Thread Shane Wright

Hi Nick,

No, this isnt possible - but the constructs in PHP should allow you to do 
anything you can do with SSI just as easily.

--
Shane

On Friday 21 Dec 2001 5:45 pm, Nick wrote:
 Is it possible to have a .php file parse SSI's?  I tried adding .php as a
 SSI file but it overwrote the php type, and wouldn't display PHP.  And
 vice-versa.  If not, i'd hafta write a php script that executes a program,
 and take the output from that program and parse it, which I don't know how
 to do.  If anyone can help on that, please do so, and if anyone knows how
 to get SSI working with PHP, please let me know how.  Thanks.

 -Nick

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP ssi

2001-12-21 Thread Nick

Well the include line I needed was this:
!--#include virtual=/cgi-bin/ssirand.cgi?REGION=Sports --!

That didn't work since the filetype is PHP.  After some searching on the
developers website I came across a posting for getting the thing to work on
PHP3, so I tried it (even tho i'm using PHP4) and it worked.  This is what I
had to use:
?
  $ads = `cd /home/sites/www.delriolive.com/web/pay;
/home/sites/www.delriolive.com/web/pay/ssirand.cgi Region=localRICH`;
  echo $ads;
?

It worked perfectly.  If you know how to get the include file to work
though, i'd rather use it.  Thanks :)

-Nick

 From: Shane Wright [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 Date: Fri, 21 Dec 2001 17:54:42 +
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] PHP  ssi
 
 Hi Nick,
 
 No, this isnt possible - but the constructs in PHP should allow you to do
 anything you can do with SSI just as easily.
 
 --
 Shane
 
 On Friday 21 Dec 2001 5:45 pm, Nick wrote:
 Is it possible to have a .php file parse SSI's?  I tried adding .php as a
 SSI file but it overwrote the php type, and wouldn't display PHP.  And
 vice-versa.  If not, i'd hafta write a php script that executes a program,
 and take the output from that program and parse it, which I don't know how
 to do.  If anyone can help on that, please do so, and if anyone knows how
 to get SSI working with PHP, please let me know how.  Thanks.
 
 -Nick
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP ssi

2001-12-21 Thread Philip Olson

Try virtual()

  http://uk.php.net/virtual

Something like:

  virtual('cgi-bin/ssirand.cgi?REGION=Sports');

regards,
Philip Olson


On Fri, 21 Dec 2001, Nick wrote:

 Well the include line I needed was this:
 !--#include virtual=/cgi-bin/ssirand.cgi?REGION=Sports --!
 
 That didn't work since the filetype is PHP.  After some searching on the
 developers website I came across a posting for getting the thing to work on
 PHP3, so I tried it (even tho i'm using PHP4) and it worked.  This is what I
 had to use:
 ?
   $ads = `cd /home/sites/www.delriolive.com/web/pay;
 /home/sites/www.delriolive.com/web/pay/ssirand.cgi Region=localRICH`;
   echo $ads;
 ?
 
 It worked perfectly.  If you know how to get the include file to work
 though, i'd rather use it.  Thanks :)
 
 -Nick
 
  From: Shane Wright [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  Date: Fri, 21 Dec 2001 17:54:42 +
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] PHP  ssi
  
  Hi Nick,
  
  No, this isnt possible - but the constructs in PHP should allow you to do
  anything you can do with SSI just as easily.
  
  --
  Shane
  
  On Friday 21 Dec 2001 5:45 pm, Nick wrote:
  Is it possible to have a .php file parse SSI's?  I tried adding .php as a
  SSI file but it overwrote the php type, and wouldn't display PHP.  And
  vice-versa.  If not, i'd hafta write a php script that executes a program,
  and take the output from that program and parse it, which I don't know how
  to do.  If anyone can help on that, please do so, and if anyone knows how
  to get SSI working with PHP, please let me know how.  Thanks.
  
  -Nick
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] SSI

2001-12-21 Thread steph

if you have a PHP page and you want to use SSI in it... is there a special
method?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] SSI

2001-10-29 Thread Patrick Dunford

The virtual( ) function is the same as #include on Apache

If you're running a script, you may need to simulate the CGI variables as
they aren't automatically available to a script that you would normally run
with the #exec SSI directive.

=
Patrick Dunford, Christchurch, NZ
http://pdunford.godzone.net.nz/
http://www.trainweb.org/ferrymead/


 -Original Message-
 From: Gary [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 29 October 2001 14:59
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] SSI


 Yes I do, it is to run a pre-exiting program. I figured it out. I was
 uing double quotes in the ssi and excaping them when echoing. I should
 of been using single quotes.

 Thanks
 Gary

 Christian Dechery wrote:

  At 19:04 28/10/01 -0500, Gary wrote:
 
  How do you get a SSI to work on a php page?
 
 
  you don't need SSI if you're running PHP... just use include()...
 
  _
  . Christian Dechery
  . . Gaita-L Owner / Web Developer
  . . http://www.webstyle.com.br
  . . http://www.tanamesa.com.br
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] SSI

2001-10-28 Thread Gary

How do you get a SSI to work on a php page?

TIA
Gary


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SSI

2001-10-28 Thread Christian Dechery

At 19:04 28/10/01 -0500, Gary wrote:
How do you get a SSI to work on a php page?

you don't need SSI if you're running PHP... just use include()...

_
. Christian Dechery
. . Gaita-L Owner / Web Developer
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SSI

2001-10-28 Thread Gary

Yes I do, it is to run a pre-exiting program. I figured it out. I was 
uing double quotes in the ssi and excaping them when echoing. I should 
of been using single quotes.

Thanks
Gary

Christian Dechery wrote:

 At 19:04 28/10/01 -0500, Gary wrote:
 
 How do you get a SSI to work on a php page?
 
 
 you don't need SSI if you're running PHP... just use include()...
 
 _
 . Christian Dechery
 . . Gaita-L Owner / Web Developer
 . . http://www.webstyle.com.br
 . . http://www.tanamesa.com.br
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP SSI in armony?

2001-07-21 Thread Seb Frost

I want to use both PHP and SSI on the same page.  My server requires that
SSI files are .shtml.  If I set it to also treat .shtml files as php files
(like I have done with .htm) then what will happen?  Will it get parsed
first for php and then for ssi, or the other way round?  Or puke completely?

Or is there a way of doing this that I've overlooked.

- seb


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP SSI in armony?

2001-07-21 Thread Rasmus Lerdorf

 I want to use both PHP and SSI on the same page.  My server requires that
 SSI files are .shtml.  If I set it to also treat .shtml files as php files
 (like I have done with .htm) then what will happen?  Will it get parsed
 first for php and then for ssi, or the other way round?  Or puke completely?

 Or is there a way of doing this that I've overlooked.

Apache 1.3.x does not support multiple content handlers.  You cannot parse
a file both for PHP tags and SSI tags.  The best solution is to convert
your SSI tags to PHP tags.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP SSI in armony?

2001-07-21 Thread Jack Sasportas

The answer is up to you.
You make the shtml generate the php, OR the php generate the shtml...
My guess is probably php generates the shtml, and the reference to
it...
I think that should work...

Seb Frost wrote:

 I want to use both PHP and SSI on the same page.  My server requires that
 SSI files are .shtml.  If I set it to also treat .shtml files as php files
 (like I have done with .htm) then what will happen?  Will it get parsed
 first for php and then for ssi, or the other way round?  Or puke completely?

 Or is there a way of doing this that I've overlooked.

 - seb

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
___
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP SSI

2001-02-20 Thread Brandon Orther

Hello,

I am writing a banner rotation script and want to use Server Side include.
When I try to include from any server other than the one that php script is
on I get an error,

Error: [an error occurred while processing this directive]

Any Ideas?


Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP SSI

2001-02-20 Thread Simon Garner

From: "Brandon Orther" [EMAIL PROTECTED]

 Hello,

 I am writing a banner rotation script and want to use Server Side include.
 When I try to include from any server other than the one that php script
is
 on I get an error,

 Error: [an error occurred while processing this directive]

 Any Ideas?


 Thank you,

 
 Brandon Orther
 WebIntellects Design/Development Manager
 [EMAIL PROTECTED]
 800-994-6364
 www.webintellects.com
 



SSI doesn't support opening files over HTTP, so what you're trying to do
will not work.

You either need to have your banner script called from an IMG tag in the
remote file (your script would return image data) - in which case you can't
do HTML banners - or the remote server needs to run PHP and do something
like this where the banner will appear:

?php
readfile("http://your-adserver.dom/banner.php?id=1234");
?


Cheers

Simon Garner


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]