awebbdesign Posted February 22, 2005 Share Posted February 22, 2005 I have created a very simple page where the page idtest.php displays the information of the database from the url parameter... idtest.php?id=1... displays the information fine... idtest.php?id=2 displays the information fine... So when I look at it on my browser (from the testing server) it works, I can change the number and the page reloads with the correct corrasponding information... But... When I upload this simple page to the web it doesn't work, why does it work on the testing server (my mac) and not on the web (a php server)? Any pointers would be helpful. Andy Quote Link to comment https://forums.phpfreaks.com/topic/2173-test-fine-live-not/ Share on other sites More sharing options...
AndyB Posted February 22, 2005 Share Posted February 22, 2005 Depends on how you retrieve the passed parameters. Best guess is that your server is set to register_globals OFF (the more secure setting). Retrieving a URL passed parameter then requires code like so: <?php $id = $_GET['id']; // url passed parameter .... Quote Link to comment https://forums.phpfreaks.com/topic/2173-test-fine-live-not/#findComment-7153 Share on other sites More sharing options...
awebbdesign Posted February 22, 2005 Author Share Posted February 22, 2005 Thanks for the help, the register_globals is on and the server is running PHP Version 4.0.6, I have upload the site to another site and it works fine, so I guess the issue is with the first server which was a bit of a suprise, the server can run php as I have ran phpinfo() but for some reason doesn't like passing the id=1; Thanks for your help... if your interested http://www.swindonweb.com/test/tcm/phpinfo.php is where I have just pulled the information, have a look and let me know if there is a problem with the php server and I can ring up the company and tell them the problem... much would be appreciated. Again thanks for your help Andy Quote Link to comment https://forums.phpfreaks.com/topic/2173-test-fine-live-not/#findComment-7154 Share on other sites More sharing options...
AndyB Posted February 22, 2005 Share Posted February 22, 2005 The phpinfo script from your domain clearly shows register_globals is set to ON, so you should be able to read passed variables 'directly'. Can you post a small sample of code that works locally and doesn't work on your domain server, so we can take a closer look just in case there's something weird there? Quote Link to comment https://forums.phpfreaks.com/topic/2173-test-fine-live-not/#findComment-7155 Share on other sites More sharing options...
awebbdesign Posted February 22, 2005 Author Share Posted February 22, 2005 I rang up the company and they said they could'nt upgrade the php server because it was an old server, so I set up the page on a different account and it works fine, to be honest the other server company are a pain in the butt, so when we register the domain for our client we wont use them, the server I am uploading to has a newer version of php, so I will use them... I set-up the site using dreamweaver so I know it cant be the code as it wouldn't of worked on my mac and the newer server. Thanks for the help though, I work for www.swindonweb.com and trying to convince my boss of doind PHP and not ASP so this has helped a lot. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/2173-test-fine-live-not/#findComment-7156 Share on other sites More sharing options...
AndyB Posted February 22, 2005 Share Posted February 22, 2005 I'd say you definitely made the right decision to dump the hosting company with the clapped-out server. Quote Link to comment https://forums.phpfreaks.com/topic/2173-test-fine-live-not/#findComment-7158 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.