Change to Linux server!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dynasty
Forum Newbie
Posts: 3
Joined: Sun Jan 19, 2003 3:59 pm

Change to Linux server!

Post 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?
User avatar
puckeye
Forum Contributor
Posts: 105
Joined: Fri Dec 06, 2002 7:26 pm
Location: Joliette, QC, CA
Contact:

Post 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.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
User avatar
mr_griff
Forum Commoner
Posts: 64
Joined: Tue Sep 17, 2002 11:11 am
Location: Bozeman, Montana

Post 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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

That was a bit of a race to answer :lol:. Looks like the consensus is reg_globals though.

Mac
Post Reply