Solved

PHP4 Pages do not work with PHP5

Posted on 2006-07-08
5
170 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
  • 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 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Trying to use two loops in a perl script but not getting results need. 10 100
what does getent do 3 55
generating rpm using noarch parameter 1 47
how does yum update work 2 68
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 demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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