RE: Opensuse 11.4 - PHP returned as text?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I'm trying to debug an issue which I think is more to do with Apache than
> PHP, but perhaps someone else has experience with this. Using opensuse
> 11.4, custom compile of kernel 2.6.38, custom compile of Apache httpd
> 2.2.17, and PHP 3.3.6. phpinfo() page works correctly so my httpd.conf is
> configured to deal with PHP.
> 
> Using a plain .php file which contains a form with only a submit button,
at first
> the browser loads the .php correctly. Then click submit in the form, and
the
> browser asks me if I want to open or download and save locally the .php
file I
> have requested. This is disturbing since it is potentially a security
issue.
> 
> 1. This only happens with method=POST. method=GET works correctly.
> 2. Using the same form as an .html file, same failure, so it is not
directly
> connected to PHP. I have posted an issue with Apache (50978) but no
> response yet.

Can you post a link; if not:
Can you show the contents of the php file being downloaded or at least the
first and last 15 lines?
Not sure why the method would make the diff yet here we are. You could check
the variables_order string in your php.ini file.
And have you tried adding 
    enctype="multipart/form-data" or
    enctype="application/x-www-form-urlencoded" (more suited for GET)
to the FORM tag ie <FORM id="formID" action="some_action.php" method="POST"
enctype="multipart/form-data">

The reason I asked the last part is because you stated that it works fine if
you pass via GET and not when you use POST and because they are both encoded
differently and it could be that the server isn't set correctly to decode
$_POST data and so does the download instead. 

More details about how you are collecting the form data and how the data is
then processed would be helpful.

Thank you,
Marc Hall
HallMarc Websites
610.446.3346
http://www.hallmarcwebsites.com/ 

Spread the word about my services and earn money! 
Contact me for details.



 



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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux