dancingbear Posted October 10, 2006 Share Posted October 10, 2006 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? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted October 10, 2006 Share Posted October 10, 2006 How are you accessing the [b]a[/b] URL paramter in your script?The following should work:[code=php:0]echo $_GET['a']; // returns the value of a[/code] Quote Link to comment Share on other sites More sharing options...
dancingbear Posted October 10, 2006 Author Share Posted October 10, 2006 > 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? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted October 10, 2006 Share Posted October 10, 2006 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. Quote Link to comment Share on other sites More sharing options...
dancingbear Posted October 10, 2006 Author Share Posted October 10, 2006 thanks - that appears to be the problem, so I guess I'll be having some fun re-coding scripts for the next few days. :( Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.