Forum Moderators: coopster
I have a defualt installation of Redhat 8 with PHP4/Apache etc.
My PHP is working okay I guess, as when I put in the command to see if it is working, and access the webpage, it displays all of the PHP variables and etcetera.
However, I have tried about ten different PHP scripts, and end up with some of the code working, and the other code just displaying as text on the page.
Does anyone know of what this problem may be?
Cheers!
The problem is posting form results to a script. If I change to a "get" it works. When using a post the variable is not parsed properly ie.
if I echo $variablename;
it returns.. variablename=stuff
If I use a "get" for the form
it returns... stuff
It seems to be either a bug with Apache 2.0 and php or a change in how variables are handled, or a config issue.?
This might be what you are having a problem with
register globals is on here is my test post form
<form action ="script.phtml" method="post">
<select name="test">
<option value="red">red</option>
<option value="blue">blue</option>
<option value="green">green</option>
</select>
<input type ="submit" value ="Go">
</form>
script.phtml ..
<?
echo $_POST['test'];
?>
the on screen results ..
redtest=red
I am confused, there are other scripts that use post data that work and I haven't been able to find the diiference.
maybe there is more info on it here
[bugs.php.net...]
With apache 2.0 you include conf.d/*.conf. One of the configs is php.conf. The new way you addType is in the php.conf like this
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
</Files>
<Files *.phtml>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
I had had added the old way to the httpd.conf
AddType application/x-httpd-php .php .php4 .php3 .phtml .html
Once I removed that line all seems to be fine. :)