Jump to content


Photo

Need Help Troubleshooting Variable Errors


  • Please log in to reply
2 replies to this topic

#1 akolson

akolson
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 03 June 2006 - 05:32 AM

I've switched from a shared host to a virtual dedicated server and my web application has stopped functioning.

The php scripts still run, and the site is successfully connecting to and displaying data from MySQL. However, any script that requires a temporary (?) variable fails...logins, variables in URL strings, etc.

As an example, the following URLs should each sort a list differently, but they both return the default sort (most recent) and the next/previous buttons return the same.
[a href=\"http://www.houseblogs.net/webring/?limite=10&classe=date&ordre=DESC\" target=\"_blank\"]http://www.houseblogs.net/webring/?limite=...date&ordre=DESC[/a]
[a href=\"http://www.houseblogs.net/webring/?classe=site_nom&ordre=ASC\" target=\"_blank\"]http://www.houseblogs.net/webring/?classe=site_nom&ordre=ASC[/a]

Another example, the admin login panel doesn't recognize any inputs:
[a href=\"http://www.houseblogs.net/webring/admin.php\" target=\"_blank\"]http://www.houseblogs.net/webring/admin.php[/a]

Any thoughts on why this might happen? I'm assuming that some setting must be different on the new server, but strangely other web apps that also made the move still function properly.

#2 ysu

ysu
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 03 June 2006 - 06:00 AM

check register_globals on the server.
It's possible that the script was written withouth consideration of it.
In that case you can quickly enable it, or better yet, fix it to work from $_POST and $_GET superglobals instead (the proper way).

It's not a good practice to rely on auto globals.
_____________________________________________________________________

[a href="http://www.ysuprogramming.com/" target="_blank"]Ysu Programming web development[/a]

#3 akolson

akolson
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 04 June 2006 - 01:55 AM

Sure enough, the app was written before the default for reister_globals was turned off so turning on register_globals did it. Thanks.

I'd take your advice of moving to superglobals but I've decided to move away from this particular web application so I probably won't invest the time.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users