homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Recent server re-install broke scripts, php 4.3 or 4.4 moved to 4.7
php script broke with php upgrade

Msg#: 4042392 posted 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?




10+ Year Member

Msg#: 4042392 posted 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.


Msg#: 4042392 posted 10:02 pm on Dec 13, 2009 (gmt 0)

Hey dublinmike,

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?


10+ Year Member

Msg#: 4042392 posted 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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved