I've got an Apache 2.2.3 server running PHP 5.2.6 on top of FreeBSD
6.2. It's worked quite well for over a year now. However, as of some
time last night, phpBB broke; upon investigation, I realized that the
problem was that $_POST was never getting populated, even on properly
formed HTML forms.
Testing this to try to find the issue, I used the following script:
<?php
print "Testvar: " . $_POST['testvar'] . "<br/>\n";
?>
<form method="POST" action=http://www.newmars.com/test.php
name=formname enctype="multipart/form-data">
<input type=text name=testvar><br/>
<input type=submit value=Submit><br/>
</form>
looks like you already fixed it.. works fine for me on your server:
array(1) { ["testvar"]=> string(2) "er" } NULL
(then all the phpinfo())
i posted "er" on the form at bottom..
Seems to be working for me also.
I wish it were a real fix. I had switched the print statement back
to use $_REQUEST after I pasted the code in my message, just to be
100% certain that I wasn't losing it, and didn't think to switch it
back before I left work for the evening - somehow I didn't
anticipate you guys actually using the live form. :-P
Did you check the apache logs or the php error logs?
Apache logs show no errors at all. The PHP error log is more
interesting - I turned on logging to /var/log/php.err once I
started trying to diagnose this, and that file has yet to be
created. At one point today, I intentionally wrote in a syntax
error to a PHP script, and the error message printed out into the
Apache log, so at this point I'm assuming that if PHP were going to
give me a relevant error, it'd be there.
How about disk space on the server location where it is storing it's temp
files for the server?
I've seen something similar when disk space was nil after some scripts ran
amok.
Temp files should be on /, which is only at 41% of capacity. Even
if it's /usr, that's at 90%, not 100%.
Alex
and if you remove the multipart/form-data from the form?
I actually added it in during my testing, since I'd seen some bugs
from 2005 or so related to that. I hadn't specified an encoding
previously.
any includes in that script that script?
None.
any .htaccess rewrites?
Hmmm, that's interesting: this is present in the docroot for www.newmars.com:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
mod_rewrite is indeed enabled in the main HTTP config (we use it on
other domains hosted on the box). /wordpress does exist on that
virtual host, but I admit, this is one area that I'm not super-well
versed on. Are there known issues with POST data and rewrites? It
seems sort of odd, since that .htaccess hasn't changed since 3/8/08,
but at this point I'll accept just about any solution. :-)
error_reporting(E_ALL | E_STRICT) set?
It is now...but the whole damn domain went down. WTF????
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php