ID: 17897 Comment by: fredlaplante at hotmail dot com Reported By: hofmann at isl dot org Status: Bogus Bug Type: Apache2 related Operating System: Linux PHP Version: 4.2.1 New Comment:
hi! i have this problem when I post a form on a UNIX server, the variables are empty... but it works fine on my test server in WinXP :P ------------------------------------------------ Info about the UNIX server : ------------------------------------------------ PHP Version 4.2.3 System : IRIX humu 6.5 09190646 IP22 Build Date : Sep 26 2002 15:58:31 Server API : Apache Apache Version : Apache/1.3.26 ------------------------------------------------ Info about the WinXP serveur : ------------------------------------------------ PHP Version 4.2.0 System : Windows NT 5.1 build 2600 Build Date : Apr 20 2002 18:36:03 Server API : Apache Apache Version : Apache/1.3.24 ------------------------------------------------ Here's the form and the PHP file: <FORM ACTION="form.php" METHOD="post"> <input name="firstname" type="text" size=30><BR> <input name="lastname" type="text" size=30><BR> <input type="submit" name="ok" value="Send"> </FORM> form.php <?PHP echo $firstname.'<BR>'; echo $lastname.'<BR>'; ?> and there is nothing echoed... :P Please, fix this bug as soon as possible... THANKS! Previous Comments: ------------------------------------------------------------------------ [2003-02-04 05:59:50] dave at nicedayin dot co dot uk just to say thanks, this thread has just solved a problem with an ASP based system I am writing. Dreamweaver MX places form actions in as script sources by default, and so does not always put full url in the action field. As such all my post variables dissapeared, then I found this form, hard coded the action page and it worked ! ------------------------------------------------------------------------ [2003-01-03 07:40:16] air01 at gmx dot de Following extraction helped me to solve the problem that, variables are missing in the *.php after submition. >>Hi there... The problem is actually that in PHP 4.2, Register Globals is automatically defaulted to OFF. This means that variables that were normally in the global space such as GET and POST variables are no longer in the global space by default. PHP Announcement: http://www.php.net/release_4_2_0.php You can still force the old default behavior by changing the php.ini file and set the value for register_globals to "On". This will allow you to access the variables as they are named in the forms Documentation: http://www.php.net/manual/en/configuration.php#ini.register-globals << By the way, I found this Information on expert-exchange.com http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20293768.html My configuration: PHP 4.2.3 Apache 2.0.43 Windows 2k ------------------------------------------------------------------------ [2002-12-13 21:25:05] donny at net-yan dot com I think the problem is PHP4. Because I installed PHP on both Apache and IIS of W2k. I got the same problem. The following are the test program (test.php). <html> <head> <title>TEST</title> </head> <body> <? print_r($_POST); print_r($HTTP_POST_VARS); ?> <form action=test.php method=post> <input type=text id=ftext value=123></input> <br><br> <input type=submit></input> </form> </body> </html> I always get empty Arrays. I never imagine that such simple function have bugs in PHP, or I know to little about the PHP settings! Who can HELP!!! My system cannot progress!!! ------------------------------------------------------------------------ [2002-11-18 03:03:47] hofmann at isl dot org ok the solution to my problem is simple - I am using AddOutputFilter PHP;INCLUDES .php so the post variables are missing - thats because you need also to set AddInputFilter PHP .php otherwise Apache2 will not forward the POST vars! ------------------------------------------------------------------------ [2002-09-21 02:20:42] bote_basura_notthis at hotmail dot com Thanks [EMAIL PROTECTED] Adding "AddType application/x-httpd-php .php" to the conf file worked for me. PHP 4.2.3 APACHE 2.0.40 on WindowsXP ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/17897 -- Edit this bug report at http://bugs.php.net/?id=17897&edit=1