Problem using query string navigation on php 4.3.1 (ensim)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dtportnoy69
Forum Newbie
Posts: 3
Joined: Fri Aug 15, 2003 9:00 am

Problem using query string navigation on php 4.3.1 (ensim)

Post by dtportnoy69 »

I seem to be having a problem using url query strings.

It works fine on a 4.3.2 host:

http://www.wintermyth.com/archeronne/ma ... elcome.tpl

It doesn't work on the main server though and i have no idea why.

http://archeronne.tcpgaming.net/archeronne/main.php

The main server is running php 4.3.1 on IIS using the ensim package. Its not my server but the admin doesn't know what the problem is either.

I set up a php info page for you guys to look at

http://archeronne.tcpgaming.net/phpinfo.php

Basically i set link='welcome.tpl' by default in my php file. So on the 4.3.1 server when you click on News, Downloads etc.. it will stay on the welcome page because the value for link hasn't changed. And there's the problem. the value should have changed.

I have no clue what the problem is, i've been looking everywhere for a solution. Supposedly passing a query through your URL is part of PHP's URL Functions which, accordign to php's manual, is already in its core so it doesn't need to be set. Is it the same for 4.3.1 ?

Well thanks in advance :)
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

phpinfo report wrote:register_globals Off
How are you trying to access the variables from the query string? Are you using $_GET?

Mac
dtportnoy69
Forum Newbie
Posts: 3
Joined: Fri Aug 15, 2003 9:00 am

RE

Post by dtportnoy69 »

Nope. Just passing values for link. Not using @_Get or @_Post. Hyperlink to News is main.php?link=news.tpl

That's it. :P So that would need register globals on?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Personally I would change the code to not rely on reg globals (not all hosts will turn it on) but a quick fix would be to enable it.

Mac
dtportnoy69
Forum Newbie
Posts: 3
Joined: Fri Aug 15, 2003 9:00 am

Post by dtportnoy69 »

ah thanks for the help. I'll try to think of a way to get it to work without turning it on then.

Great forum and great help ;) It's really appreciated . Thank you :)
Post Reply