[Xitami] Xitami And PHP
Marcio Marchini
xitami@lists.xitami.org
Fri, 21 Dec 2001 13:03:50 -0500
I've had a somewhat similar problem regarding caching. I fixed it in my
case by generating an extra HTTP header, from my PHP source, like this:
header ("Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0");
I've also has a similar problem regarding PHP_SELF and portability across
Xitami and Apache. In my case I did this:
// Under Apache $PHP_SELF is what we want, under Xitami it is $SCRIPT_NAME
// We find out based on which one has ".php" in it.
if (ereg ("\.php", $SCRIPT_NAME)) $GLOBAL_SELF = $SCRIPT_NAME;
else $GLOBAL_SELF = $PHP_SELF;
$GLOBAL_SELF = str_replace ("\\\\", "/", $GLOBAL_SELF);
and then I use $GLOBAL_SELF
Hope it helps
marcio
-----Original Message-----
From: xitami-admin@lists.xitami.org [mailto:xitami-admin@lists.xitami.org]On
Behalf Of SandMan
Sent: December 21, 2001 12:33 PM
To: Xitami@lists.xitami.org
Subject: [Xitami] Xitami And PHP
I'm having a slight problem getting this to run properly. I've set the
filter's up, .php = source of php.exe, and have the latest version of php
4.1.0
My problem is this, I have a "Picture Gallery" page written in php that you
can upload images to, and it is supposed to show these images in the image
index upon a succesful upload. I've tested this script on IIS 5.0 and it
was working fine. Now when I run it, after the upload, it doesn't show the
image I just uploaded. The only way to get the images to appear is to open
the script, edit it, say add a comment //a or something like that, save the
script, then refresh the browser. It's almost as if Xitami is not allowing
php.exe to be recalled. It's very strange behaviour and I've found no way
around it beyond my little edit the source code/refresh fixer. Any ideas on
why it would be doing this? Think it could possibly be the Xitami server?
I've also noticed that the $PHP_SELF function, doesn't call the
path/filename, the whole weblink + php script, it only calls the root
directory. Here's an Example.
Say: http://www.someplace.com/picture.php is called. Within picture.php
is a call to $PHP_SELF, which is just supposed to be the previous link.
This is not the case tho in Xitami, it ends up being
http://www.someplace.com/ without the picture.php So I've had to edit a
lot of scripts to add the actual file name. Not sure if this would be PHP
related, or Xitmai related, but I'd figured I'd mention that too. Any
idea's on either of these issues would be greatly appreciated.
Thanks for your time,
~SandMan