Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 131,528 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 2,080 people online right now. Registration is fast and FREE... Join Now!




I just upgraded to PHP5 and having major compatiblity issues

 
Reply to this topicStart new topic

I just upgraded to PHP5 and having major compatiblity issues, PLEASE HELP! I'm in a major pickle!

gadgetsguru
post 8 Oct, 2008 - 02:57 AM
Post #1


New D.I.C Head

*
Joined: 7 Oct, 2006
Posts: 16


My Contributions


I just made a major booboo! Let me explain: I finished upgrading to PHP version 5.2.6 from PHP 4.2.1, and in my code I use a lot of include() and require() functions to create the page templates. Well, as soon as I restarted my server, those functions stopped working. Even worse is I have literally thousands of pages on my site and practically all of them use these functions in one way or another; these pages are no longer rendering... Is there some sort of setting I need to change or fix in php.ini, or something else, or is there a way to fix this globally? If not, how can I downgrade back to PHP 4.2.1?

Also, I have a MySQL database and for some reason, I can't connect to the database using this code:
CODE
$con = mysql_connect('localhost', 'mysql_user', 'mysql_password');
It just flat out doesn't return anything. Am I doing something wrong here, too?

Please, please, please help me fix my mess catastrophe!! stupid.gif

This post has been edited by gadgetsguru: 8 Oct, 2008 - 03:01 AM
User is offlineProfile CardPM

Go to the top of the page


William_Wilson
post 8 Oct, 2008 - 03:21 AM
Post #2


lost in compilation

Group Icon
Joined: 23 Dec, 2005
Posts: 3,951



Thanked 13 times

Dream Kudos: 3275

Expert In: Java, C, Javascript

My Contributions


the mysql code looks fine.

Without some idea of what is in the files, it is really hard to know what isn't working. You may want to check your php.ini file and make sure it is setup to use mysql. Installing a new version will overwrite many old values.
User is offlineProfile CardPM

Go to the top of the page

pemcconnell
post 8 Oct, 2008 - 03:42 AM
Post #3


D.I.C Regular

Group Icon
Joined: 5 Aug, 2008
Posts: 392



Thanked 35 times

Dream Kudos: 75
My Contributions


All those functions should work fine in PHP 5.x - I would review your php setup and see if you have configured everything correctly, or just uninstall the lot and install a package like WAMP or XAMPP.

User is online!Profile CardPM

Go to the top of the page

AdaHacker
post 8 Oct, 2008 - 06:55 AM
Post #4


D.I.C Head

**
Joined: 17 Jun, 2008
Posts: 162



Thanked 23 times
My Contributions


What error messages are you seeing? If you're not getting anything on screen or in your logs, then make you have error_reporting cranked up and display_errors or log_errors turned on in your php.ini. Once we know what the actual error is, it'll be easier to provide a meaningful response.

As for the MySQL, the only compatibility issue that springs to mind is that PHP5 no longer ships with the MySQL extension by default, so you may have to install/enable it separately.
User is offlineProfile CardPM

Go to the top of the page

gadgetsguru
post 8 Oct, 2008 - 04:19 PM
Post #5


New D.I.C Head

*
Joined: 7 Oct, 2006
Posts: 16


My Contributions


Hi there!

I turned on full E_ALL debugging, but where would I find the error messages? Is there a file on my server that is written to whenever an error happens or something? Where would I find this if there is?

Thanks for your help! biggrin.gif
QUOTE(AdaHacker @ 8 Oct, 2008 - 08:55 AM) *
What error messages are you seeing? If you're not getting anything on screen or in your logs, then make you have error_reporting cranked up and display_errors or log_errors turned on in your php.ini. Once we know what the actual error is, it'll be easier to provide a meaningful response.

As for the MySQL, the only compatibility issue that springs to mind is that PHP5 no longer ships with the MySQL extension by default, so you may have to install/enable it separately.

User is offlineProfile CardPM

Go to the top of the page

JackOfAllTrades
post 8 Oct, 2008 - 06:36 PM
Post #6


D.I.C Regular

Group Icon
Joined: 23 Aug, 2008
Posts: 491



Thanked 42 times

Dream Kudos: 25
My Contributions


The logfile would be specified in your php.ini file.

This post has been edited by JackOfAllTrades: 8 Oct, 2008 - 06:36 PM
User is offlineProfile CardPM

Go to the top of the page

AdaHacker
post 8 Oct, 2008 - 07:49 PM
Post #7


D.I.C Head

**
Joined: 17 Jun, 2008
Posts: 162



Thanked 23 times
My Contributions


QUOTE(JackOfAllTrades @ 8 Oct, 2008 - 09:36 PM) *

The logfile would be specified in your php.ini file.

Specifically, the error_log setting would indicate the path to the error logs. If error_log is not set, then the errors are probably being sent to the web server's error log.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/20/08 01:28AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month