|Recent server re-install broke scripts, php 4.3 or 4.4 moved to 4.7|
php script broke with php upgrade
| 6:50 pm on Dec 13, 2009 (gmt 0)|
Recently had to upgrade to php 4.7 due to server crash and re-install of OS and infrastructure services.
Now php form(s) do not work. have fixed many issues but still form does not work and can't seem to find reason why.
Have added to php script
and I get nothing, I use:
$form_block = <<<_BLOCK_
<FORM Method="Post" Action="$PHP_SELF">
--- Form fields ---
I use this base form on several sites which worked perfectly prior to php migration.
trying to find solution I am no where, ideas? suggestions?
| 8:16 pm on Dec 13, 2009 (gmt 0)|
Chances are this problem is caused by differences in your php.ini. register_globals is probably turned off in your new setup. If your php.ini's are the same, there are other mechanisms for changing the PHP configuration, e.g. .htaccess, httpd.conf, vhost.conf &c depending on what server and management software you're running.
| 10:02 pm on Dec 13, 2009 (gmt 0)|
Yea, I thought about the register_globals too but I changed those pretty much when setting up the firewall because they are always considered a risk and turned off... just checked and they are on.
I run CentOS 4.8 php 4.7, also have 5.2 installed but default is the 4.7
Thanks for responding so quickly. Ayy other suggestions?
| 2:08 pm on Dec 15, 2009 (gmt 0)|
Just phpinfo() and see what your local and master values are for register_globals. I presume $PHP_SELF is not printing anything and that's why your form isn't working, i.e. your output is <form ... action=""> If your action attribute isn't blank (and it prints the value of your current page), it might be a different problem. Also, if you have a 'funny' request URL like /form.php/contact-us/, Apache will drop the /contact-us/ bit as it would a query string.