V 4.3.11 vs. 5.2.1

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
retrodog
Forum Newbie
Posts: 10
Joined: Sun Mar 04, 2007 12:00 am

V 4.3.11 vs. 5.2.1

Post by retrodog »

I have a simple contact form that works on a server that supports PHP 4.3.11 but when i move the file to a server that support PHP 5.2.1, the form no longer works. In fact, it looks like the PHP is getting read as HTML and displays on the page. Has anyone ever had that experience or know what I need to do to correct this?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Check your php configuration on the new server.

Code: Select all

<?php
phpinfo();
?>
Save that as phpinfo.php and run it... if you can.

There are several things it could be

Apache not recognizing the php extension
PHP errors are not displaying to show you any errors such as:
-short tags on/off
-register globals on/off
-magic quotes on/off
Even the use of deprecated superglobals like $HTTP_POST_VARS
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Many hosts have chosen to use .php5 as the extension for PHP 5 installations to parse.
retrodog
Forum Newbie
Posts: 10
Joined: Sun Mar 04, 2007 12:00 am

PHP Configuration

Post by retrodog »

Thanks. i already have a test page that tells me that info but I didn't think to look at it thoroughly...I'm not all that familiar with what could be throwing it off...any chance you can take a look?

http://www.christchurchlife.com/staging/test.php
scottayy wrote:Check your php configuration on the new server.

Code: Select all

<?php
phpinfo();
?>
Save that as phpinfo.php and run it... if you can.

There are several things it could be

Apache not recognizing the php extension
PHP errors are not displaying to show you any errors such as:
-short tags on/off
-register globals on/off
-magic quotes on/off
Even the use of deprecated superglobals like $HTTP_POST_VARS
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The directives scottayy pointed out are all off. That's a good thing.

Have you read this and this?
retrodog
Forum Newbie
Posts: 10
Joined: Sun Mar 04, 2007 12:00 am

Post by retrodog »

thanks, I'll take a look. I use a hosting service so I have no idea what/how they configured everything or if I can even have them change whatever is causing the issue. Its been a while since I looked at PHP, so I am having to dig alot to find answers and I am trying to help out a friend with troubleshooting their page.
Post Reply