I've written the author, but not heard back; As I'm new to PHP, I'm going crazy trying to figure this out...
This nifty little "flexible navigation script" works on two servers, but it doesn't work correctly on the client server I need it to work on, nor does it work on my localhost. I've used the PhpInfo tag to compare the 4 setups, and nothing obvious jumps out at me.
My first thought was that Short Tags weren't enabled on the 2 servers that don't run this script properly - but they are.
The script can be found here:
the page template:
[onlinetools.org...]
the nav page:
[onlinetools.org...]
The script doesn't "error out", either, it simply doesn't
a) show the page name captured from the URI in the Title bar: In other words(=$d) just generates a blank spot in the Title.
b) it doesn't un-hyperlink the page you are on; all the pages remain hyperlinked.
One other question: you'd think that if it "didn't work" it would at least throw some kind of error (ColdFusion usually does) - is there some kind of advanced error-generation tag I can enable in the php.ini to help me debug this kind of problem?
Thanks kindly for your input.
(BTW, all the servers are running Apache 1.3.26 'cept for my localhost, which is running Apache 2.0)
I'm not quite sure 'til I test this, but I think the problem might be because the original script was written with the PHP directive "register_globals" set on - which I just found out is defaulted to "off" in PHP 4.2 (and confirmed in my localhost php.ini). If this is the case, then I just have to figure out how to re-write the script around this...
It turns out it WAS the Register Globals setting in PHP 4.2 - so all I had to do was replace
$REQUEST_URI
with
$_SERVER ['REQUEST_URI']
and it works like a charm!
Thanks again for setting me on the right path - now I'm going to write the original author and get him to upgrade his script online...