Page 1 of 1

Change to Linux server!

Posted: Tue Jan 21, 2003 9:41 am
by dynasty
I am using a new server database, if it helps it is a redhat linux 8 OS, now to store some older php scripts that I know work. I have made all the appropriate changes to the code and it will not pass on variable to the php script through an html form. I tested the scripts on another server and they worked fine.

I am using an html form and a submit button to pass into the php scripts:
<FORM action="do_addrecord.php" method="POST">
<INPUT type="text" name="name" size=30 maxlength=40>
<INPUT type="submit" name="submit" value="Add Record">
</form>

Then in the php script I try to pass it into the database and the database receives nothing but empty variables, Also I try to confirm the variables on the screen and they are also empty. In all instnces where error could occur I have programed message so no error is occuring in the php script, it is just passing in empty variables. I replaced the variable with pre declared strings and it worked and they were added to the database. Anybody know why I am getting these empty variables and how to correct it?

Posted: Tue Jan 21, 2003 9:44 am
by puckeye
What PHP version did you have on your old server and what version do you have on your new server.

There might be a different variable handling from one version to another.

Posted: Tue Jan 21, 2003 9:44 am
by twigletmac
Without seeing the code for working with the returned variables it's difficult to diagnose the problem. Most likely it's something to do with register_globals:
viewtopic.php?t=511

Mac

Posted: Tue Jan 21, 2003 9:45 am
by mr_griff
Sounds like register_globals is probably turned off on your new server.

Check out this post for more information:
http://www.devnetwork.net/forums/viewtopic.php?t=511

Posted: Tue Jan 21, 2003 9:48 am
by twigletmac
That was a bit of a race to answer :lol:. Looks like the consensus is reg_globals though.

Mac