?
Solved

PHP4 Pages do not work with PHP5

Posted on 2006-07-08
5
Medium Priority
?
173 Views
Last Modified: 2010-04-22
Hi,

I have just migrated a website written with PHP 4.1.2 and MySQL 3.23.56 with RH 7.3 to a new platform that consists of Fedora Core 4, PHP 5.0.4 and MySQL 4.1.20. My website shows OK except for all the operations that involve database. I've heard that there is a compatibility issue between PHP 4 and 5. Which is the quickest solution to the problem (preferably without changing the code) ?

Thank you
0
Comment
Question by:agubaira
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 24

Expert Comment

by:fridom
ID: 17067099
removing PHP5 or installing a PHP4 side by side to you PHP5. Or checking the proper database libraries.

Regards
Friedrich
0
 

Author Comment

by:agubaira
ID: 17068178
Friedrich,

Thanks for your reply. How do I install PHP4 parallel to PHP5 and still have both functionalities ? What do you mean by checking database libraries ? I am sorry but I am new with PHP and MySQL.

Regards.
Antonio
0
 
LVL 24

Accepted Solution

by:
fridom earned 2000 total points
ID: 17070795
http://www.howtoforge.com/apache2_with_php5_and_php4

Shows an example

And checking the db library means exactly that. See how you can connect with PHP4 and then try to get connection with PHP5 maybe the proper librarry for 5 is not yet installed.

You can write cli-tools with PHP4 and PHP5 and so you can test the database connection also.

with something along the following lines:

#!/usr/local/bin/php4
  <?php
      $connection = @ mysql_connect("localhost", "user", "password");
      if (! $connection) {
        echo "Connected";
      } else {
        echo "No connection\n";
        mysql_close($connection);
      }
      ?>

Now you can try the php4 one time and php5 the other time.

If you do not have the knowledge doing that yourself it may be the right time to look for
some unix guy nearby ;)

Regards
Friedrich

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question