Jump to content

not parsing parameters


dancingbear

Recommended Posts

Hi,

I have a webserver based php application that is working absolutely fine on a couple of servers.

I've recently put together a new server (using Fedora core 5 & apache), and although PHP works fine for 'bought' applications such as Invision Power Board, 'my' application isn't detecting the parameters passed to the application.

What I mean is this:-
- "www.domain.com/index.php" does what it's meant to.

- "www.domain.com/index.php?a=1" doesn't - it completely ignores the a=1 part (it cannot be detected by the script) and does just "www.domain.com/index.php" instead.

It's obviously related to the webserver setup in someway, but I have no idea what. Can anyone help please?
Link to comment
Share on other sites


> How are you accessing the a URL paramter in your script?

with a simple:-

if ($a) {
  do this...
}

I'd much rather make any changes to the server config so that this still works done in this manner, rather than have to implement a new method to such as $_GET['a'] - I have around 200,000 lines of code in various php apps, and I don't much fancy having to trawl thru all these to make changes in scripts that currently work fine as they are.

Having said that, if there's very good reason to make the change then I will - is there a good reason?
Link to comment
Share on other sites

Turn on regitser_gloabls in then php.ini. Restart your server after you've made the changes though,

I do not recommend you to turn this setting on as it can cause security exploits in your code, thus why it is turn off by defeault. You should use the superglobals arrays ($_GET, $_POST, $_COOKIE etc). However most apps should work with this settting off anyway. If the app you are using requires this setting to be on then I would not recommend you to continue using that app.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.