Jump to content


This topic is now archived and is closed to further replies.


Need Help Troubleshooting Variable Errors

Recommended Posts

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.

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites


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.