[PHP] $_POST suddenly empty; $_GET and _$REQUEST fine

2008-12-03 Thread Alex Kirk
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=testvarbr/
input type=submit value=Submitbr/
/form

It works like a charm on a different machine with an essentially  
identical config (it's a newer version of FreeBSD, but that's about  
it); however, it never displays the contents of $_POST['testvar'] on  
the machine that suddenly quit functioning right last night.


Meanwhile, the rest of PHP seems to be working fine, as the phpBB  
forum is accessible in a read-only fashion.


I've searched all over, and done things like restarting Apache;  
checking phpinfo() for the POST data (it's not there on the broken  
server, but it is on the functional one); writting a quick Perl script  
that took POST input to verify that my browser was sending such data  
properly (it is); and scouring the Apache/PHP error logs. The worst  
part is, I didn't touch the config at all between when it worked and  
when it didn't. So now I'm at a total loss as to what could be causing  
this, or how I should go about troubleshooting.


Any thoughts on this would be greatly appreciated.

Alex Kirk



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



Re: [PHP] Re: $_POST suddenly empty; $_GET and _$REQUEST fine

2008-12-03 Thread Alex Kirk

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=testvarbr/
input type=submit value=Submitbr/
/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



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



Re: [PHP] $_POST suddenly empty; $_GET and _$REQUEST fine

2008-12-03 Thread Alex Kirk

Quoting Daniel P. Brown [EMAIL PROTECTED]:


On Wed, Dec 3, 2008 at 6:03 PM, Alex Kirk [EMAIL PROTECTED] wrote:


It works like a charm on a different machine with an essentially identical
config (it's a newer version of FreeBSD, but that's about it); however, it
never displays the contents of $_POST['testvar'] on the machine that
suddenly quit functioning right last night.


Check your php.ini and make sure your EGPCS (variables_order) is okay.



It is. In fact, my config is virtually default:

[EMAIL PROTECTED] /usr/local/etc]$ diff -u php.ini php.ini-dist
--- php.ini Wed Dec  3 16:08:31 2008
+++ php.ini-distTue Jul 22 11:00:49 2008
@@ -328,7 +328,7 @@
 ;
 ; stdout (On) - Display errors to STDOUT
 ;
-;display_errors = On
+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
@@ -338,7 +338,7 @@
 ; 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
 ; error displaying on production web sites.
-log_errors = On
+log_errors = Off

 ; Set maximum length of log_errors. In error_log information about  
the source is
 ; added. The default is 1024 and 0 allows to not apply any maximum  
length at all.

@@ -384,7 +384,7 @@
 ;error_append_string = /font

 ; Log errors to specified file.
-error_log = /var/log/php.err
+;error_log = filename

 ; Log errors to syslog (Event Log on NT, not valid in Windows 95).
 ;error_log = syslog




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



Re: [PHP] Re: $_POST suddenly empty; $_GET and _$REQUEST fine

2008-12-03 Thread Alex Kirk

touch /var/log/php.err
chown apache:apache /var/log/php.err

adjust apache with your webserver user/group (check httpd.conf)

though I doubt anything will show up there.


Well, done anyway, just in case.

Do you have mod_security enabled in apache? Maybe it's catching  
something it shouldn't.


Nope, unless grep -iIR security * in /usr/local/etc/apache22 is  
lying to me. ;-)


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



Re: [PHP] Re: $_POST suddenly empty; $_GET and _$REQUEST fine

2008-12-03 Thread Alex Kirk

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=testvarbr/
input type=submit value=Submitbr/
/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



Re: [PHP] [RESOLVED] Re: $_POST suddenly empty; $_GET and _$REQUEST fine

2008-12-03 Thread Alex Kirk

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=testvarbr/
input type=submit value=Submitbr/
/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_modulelibexec/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



[PHP] Re: HTML E-Mail

2002-07-21 Thread Alex Kirk

Damn, what a flame war I've started! I had no idea... 

In any case, Richard: I agree that HTML e-mails, generally speaking, suck. 
The most HTML I **personally** think should be in an e-mail is a quick link 
to a web page, maybe a bit of text coloration/sizing for emphasis. 

However, **professionally**, I'm looking at something completely different. 
I run a small web services business looking for any form of cash possible, 
and a local portal site has offered to promote on their site an HTML 
e-mailing system that we create -- and they have customers *begging* for it. 
While I as an individual may despise HTML e-mail, I as a businessman cannot 
turn down such an obvious revenue-generation stream, especially in today's 
economy. 

I came to the list looking for technical help because it's something that I 
need to do, not something I want to promote. Whatever my motives may have 
been, though, there's no reason to launch such a tirade on the subject 
on-list -- if you want to bitch and moan and flame, it's just as easy to do 
off-list. 

Please, please, let's kill this thread and all the animosity going with it 
 -- *especially* since I've been kindly pointed in all the directions needed 
for technical help. 

Alex Kirk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php