Page 1 of 1

Getting different result from MS 2K and Unix(coolfreepage)

Posted: Fri Dec 20, 2002 12:35 am
by iguana
Apache/1.3.26 (Win32) PHP/4.2.3 - Using MS W2k

register1.html
++++++++++++++
<html>
<head>
</head>
<form name=registration action="signup1.php" method="get">
Username:
<input name="signupusername" type="text" width="10"><BR>
Password:
<input name="signuppassword" type="password" width="10"><BR>
Verify your password:
<input name="signuppasswordverify" type="password" width="10"><BR>
Email Address:
<input name="emailaddress" type="text" width="10"><BR>
<INPUT TYPE=SUBMIT VALUE="Sign Up">
</form>
</body>
</html>

signup1.php
+++++++++++
<?
echo " -- Your Signup -- </br>";
echo "Username: $signupusername</br>";
echo "Password: $signuppassword</br>";
echo "Email Address: $emailaddress</br>";
?>


While using my server:
-- Your Signup --

Notice: Undefined variable: signupusername in c:\php\workspace\signup1.php on line 3
Username:

Notice: Undefined variable: signuppassword in c:\php\workspace\signup1.php on line 4
Password:

Notice: Undefined variable: emailaddress in c:\php\workspace\signup1.php on line 5
Email Address:


RESULT: On coolfreepage.com
+++++++++++++++++++++++++++

-- Your Signup --
Username: tcc
Password: tcc
Email Address: myemail@email.com

So could any body tell what happen on my server setup? Did I need to do any configuration for my apache or php server? Im cracking my head around. Thank you for any help. Sorry for the long message.

In "httpd.conf" I added:
+++++++++++++++
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php "/php/php.exe"

LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php .phtml

Posted: Fri Dec 20, 2002 1:23 am
by iguana
:)

In the "php.ini", set the "register_globals = On", restart the web server then everything will be fine.

Thank you.