Welcome to Dream.In.Code
Become a PHP Expert!

Join 137,387 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 2,099 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
8 Oct, 2008 - 02:57 AM
Post #1

New D.I.C Head
*

Joined: 7 Oct, 2006
Posts: 18


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
+Quote Post

William_Wilson
RE: I Just Upgraded To PHP5 And Having Major Compatiblity Issues
8 Oct, 2008 - 03:21 AM
Post #2

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 4,013



Thanked: 18 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
+Quote Post

pemcconnell
RE: I Just Upgraded To PHP5 And Having Major Compatiblity Issues
8 Oct, 2008 - 03:42 AM
Post #3

D.I.C Regular
Group Icon

Joined: 5 Aug, 2008
Posts: 396



Thanked: 37 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 offlineProfile CardPM
+Quote Post

AdaHacker
RE: I Just Upgraded To PHP5 And Having Major Compatiblity Issues
8 Oct, 2008 - 06:55 AM
Post #4

D.I.C Head
**

Joined: 17 Jun, 2008
Posts: 178



Thanked: 28 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
+Quote Post

gadgetsguru
RE: I Just Upgraded To PHP5 And Having Major Compatiblity Issues
8 Oct, 2008 - 04:19 PM
Post #5

New D.I.C Head
*

Joined: 7 Oct, 2006
Posts: 18


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
+Quote Post

JackOfAllTrades
RE: I Just Upgraded To PHP5 And Having Major Compatiblity Issues
8 Oct, 2008 - 06:36 PM
Post #6

Cantankerous Old Fart
Group Icon

Joined: 23 Aug, 2008
Posts: 609



Thanked: 63 times
Dream Kudos: 50
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
+Quote Post

AdaHacker
RE: I Just Upgraded To PHP5 And Having Major Compatiblity Issues
8 Oct, 2008 - 07:49 PM
Post #7

D.I.C Head
**

Joined: 17 Jun, 2008
Posts: 178



Thanked: 28 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
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/5/08 02:10AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month