PHP4 scripts don't work in PHP5

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
shirokuma
Forum Newbie
Posts: 8
Joined: Fri Jun 13, 2003 4:45 am
Location: Japan

PHP4 scripts don't work in PHP5

Post by shirokuma »

I have been using PHP4 in my application for a long time. When I tried to run the application under PHP5 many of the scripts do not work. For the most part, I don't use any fancy or unusual features. My application does hit a MySQL database quite frequently. Also, many of my forms call themselves many times (like a wizard in Windows). I made a few test pages with these two features but there was no problem. I combined my test pages but there was still no problem.

I also noticed that PHP5 doesn't supply any feedback when I make coding mistakes. Is there some site that can provide guidance to people migrating to PHP5. I looked on the PHP site and the page regarding migration wasn't helpful because I wasn't using any of the functions and features they said were different in PHP5.

Thanks in advance,
Shirokuma
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

start your scripts with:

Code: Select all

error_reporting(E_ALL);
and tell us what it says.....
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

just to make sure, also turn on error display (it may be off in your install, for whatever reason)

Code: Select all

ini_set('display_errors','1');
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

also, a cool addition to php5 was this
:)

Code: Select all

error_reporting(E_STRICT);
Post Reply