?
Solved

PHP4 Pages do not work with PHP5

Posted on 2006-07-08
5
Medium Priority
?
175 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

649 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