ID: 32375 Updated by: [EMAIL PROTECTED] Reported By: jnavratil at houston dot rr dot com -Status: Open +Status: Feedback Bug Type: Apache2 related Operating System: SuSE Linux 9.1 PHP Version: 5CVS-2005-03-19 (dev) New Comment:
I still can not reproduce this problem with using exactly same php.ini as you do. And you really need to put something more into httpd.conf to enable PHP than just that LoadModule line. So HOW have you configured PHP in there? Previous Comments: ------------------------------------------------------------------------ [2005-03-23 21:21:45] jnavratil at houston dot rr dot com Greetings, and thanks! I am travelling this week, so please forgive the reply latency. Note that I am running a compiled Apache 2.0.53, not a standard SuSE 9.1 distro and am using default file placements. I verified by using phpinfo() that the expected php.ini is being loaded and the build date of libphp5.so is also correct. The only change to httpd.conf for php5 was to add the.. LoadModule php5_module modules/libphp5.so My php.ini is based on a slightly older php.ini-recommended, but is diffed against the 3/19 snapshot of same. This server will be the production server, but errors are turned on, for the moment, to facilitate finding installation, configuration and porting problems. The differences are: --- php.ini-recommended 2005-02-28 19:30:02.000000000 -0600 +++ /usr/local/php5/lib/php.ini 2005-03-19 11:48:54.000000000 -0600 @@ -272,7 +272,7 @@ disable_classes = ; Colors for Syntax Highlighting mode. Anything that's acceptable in -; <span style="color: ???????"> would work. +; <font color="??????"> would work. ;highlight.string = #DD0000 ;highlight.comment = #FF9900 ;highlight.keyword = #007700 @@ -280,10 +280,6 @@ ;highlight.default = #0000BB ;highlight.html = #000000 -; If enabled, the request will be allowed to complete even if the user aborts -; the request. Consider enabling it if executing long request, which may end up -; being interrupted by the user or a browser timing out. -; ignore_user_abort = On ; ; Misc @@ -354,12 +350,12 @@ ; instead (see below). Keeping display_errors enabled on a production web site ; may reveal security information to end users, such as file paths on your Web ; server, your database schema or other information. -display_errors = Off +display_errors = On ; Even when display_errors is on, errors that occur during PHP's startup ; sequence are not displayed. It's strongly recommended to keep ; display_startup_errors off, except for when debugging. -display_startup_errors = Off +display_startup_errors = On ; Log errors into a log file (server-specific log, stderr, or error_log (below)) ; As stated above, you're strongly advised to use error logging in place of @@ -484,7 +480,7 @@ ;default_charset = "iso-8859-1" ; Always populate the $HTTP_RAW_POST_DATA variable. -;always_populate_raw_post_data = On +always_populate_raw_post_data = On ;;;;;;;;;;;;;;;;;;;;;;;;; @@ -492,7 +488,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;; ; UNIX: "/path1:/path2" -;include_path = ".:/php/includes" +include_path = ".:/usr/local/php5/lib/php:/usr/share/php" ; ; Windows: "\path1;\path2" ;include_path = ".;c:\php\includes" @@ -937,7 +933,7 @@ ; ; where MODE is the octal representation of the mode. Note that this ; does not overwrite the process's umask. -;session.save_path = "/tmp" +session.save_path = "/var/lib/php/session" ; Whether to use cookies. session.use_cookies = 1 @@ -1025,7 +1021,7 @@ ; in publically accessible computer. ; - User may access your site with the same session ID ; always using URL stored in browser's history or bookmarks. -session.use_trans_sid = 0 +session.use_trans_sid = 1 ; Select a hash function ; 0: MD5 (128 bits) @@ -1150,6 +1146,10 @@ ; Default proxy password. ;pfpro.proxypassword = +[Sockets] +; Use the system read() function instead of the php_read() wrapper. +sockets.use_system_read = On + [com] ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs ;com.typelib_file = ------------------------------------------------------------------------ [2005-03-20 23:06:37] [EMAIL PROTECTED] I can not reproduce this. Please give more information about your setup: How did you configure PHP in httpd.conf? What changes did you make into php.ini? (is the right php.ini loaded?) And DO NOT paste full php.ini here! Make a unified diff against php.ini-dist (or if you used php.ini-recommeded as basis, against that one) ------------------------------------------------------------------------ [2005-03-19 19:50:24] jnavratil at houston dot rr dot com Description: ------------ This bug is similar to, but not quite the same as bug #31417. Running Suse Linux 9.1, Apache 2.0.53 and latest snapshot of PHP, I do not have $_POST variables being set. $_GET superglobal seems to be fine. Additionally, even though phpinfo() shows 'always_populate_raw_post_data' on, $HTTP_RAW_POST_DATA is not defined. PHP configure line is: ./configure --prefix=/usr/local/php5 \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-libxml-dir=/usr/local/lib --with-zlib \ --with-zlib-dir=/usr/local/lib \ --with-mysql=/usr \ --with-gd \ --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib \ --enable-gd-native-ttf --with-freetype-dir=/usr/lib \ --enable-soap --enable-sockets \ --with-jpeg-dir=/usr --enable-exif Reproduce code: --------------- <html> <body> <?php echo '<!-- $_POST:'.print_r($_POST, TRUE)." -->\n"; echo '<!-- $_GET:'.print_r($_GET, TRUE)." -->\n"; echo '<!-- $_REQUEST:'.print_r($_REQUEST, TRUE)." -->\n"; // Next line generates 'Undefined variable: HTTP_RAW_POST_DATA' // even though phpinfo shows always_populate_raw_post_data On // echo '<!-- raw post data:'.$HTTP_RAW_POST_DATA." -->\n"; if (!isset($_POST['tableName']) or trim($_POST['tableName']) == '') { ?> <form method="post" action="post.php"> <p> Table Name: <input type="text" name="tableName" /> </p> <input type="submit" value="Submit" /> </form> <?php } else { ?> <p> You entered <?php echo $_POST['tableName']; ?> </p> <?php } ?> </body> </html> Expected result: ---------------- I expect the code to present a form to input a string, then display the string when the form is submitted. I expect to see comments in the page source displaying the $_POST, $_GET and $_REQUEST arrays. Actual result: -------------- The $_POST variables are not set when the form is submitted. If I attach variables to the URL (i.e. post.php?key=value), I see variables in the $_GET and $_REQUEST superglobals. Comments generated in the page source indicate that $_POST is an array, but it is empty. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32375&edit=1