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????

OK, so first off, this "outage" is apparently something confined to the XP laptop I'm currently sitting at. Remind me to go check for spyware after I send this...

That said, I was checking with the other guy who has root on the box before I rebooted the whole server, in case it was some bizarre caching issue, and he asked that I remove the following line from httpd.conf before I did so, since apparently he'd added it around the time that PHP had eaten itself:

LoadModule python_module libexec/apache22/mod_python.so

Strangely enough, after rebooting Apache, it worked like a charm. The only possible explanation that I can think of - since mod_python and libphp5 shouldn't conflict - is that this line was immediately preceded by:

LoadModule php5_module        libexec/apache22/libphp5.so

...and Apache did some sort of dumb parsing thing. Though I guess that wouldn't explain why PHP was only partially broken...

So at this point, I'd like to thank all of you for your extremely rapid and thorough responses, and say that if anyone cares to probe this further, I'm open to testing things out...but if we just want to chalk it up to random weirdness, I'm OK with that, too.

Alex


----------------------------------------------------------------
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

Reply via email to