Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP 4.3 vs PHP 5.1 still "incompatable"?

Status
Not open for further replies.

irbk

MIS
Oct 20, 2004
578
US
I remember that, a year or so ago, there was some very important differences between PHP 4.X and PHP 5.X. Something about using a mysqli command vs using the mysql command. Anyway, from what I recall, if your web host was using PHP 4 (as most are) and you develop your site in PHP 5, you would run into incompatibaility issues. Does anyone know if issues still exist between PHP 5.1 and PHP 4.3? I'm trying to decide which one I want to install. If the incompatibality still exists, I'll go with what my web host uses (4.3). If that problem has been fixed, I'd like to go latest and greatest because I think the WAMP5 install package looks nicer then the PHPDEV package.

Thanks in advance!
 
It's not necessarily an incompatibility issue. It's an issue as to what function family you activate when you install PHP. PHP 4.x has the mysql_* family active by default, PHP 5.x has neither family.

Typically, if you're running older versions of MySQL, you use the mysql_* family of functions, and when you're running newer versions of MySQL, you use the mysqli_* family of functions.

Most user-defined PHP class- and function-libraries make the assumption that the mysql_* function family wil be active, so if you have the mysqli_* family available, these libraries don't work.


Apparently, it's not necessary that you use the mysqli_* family with newer versions of MySQL, nor is it apparently a requirement that you have only one family or the other active at a time.

I have on my development LAMP server an installation of PHP 5.1.1 with MySQL 5.0.15, and I have both the mysql_* and the mysqli_* function families both active. (This is installing from source.)


I'm using PHP 5.x and MySQL 5.x for all my new installations.



Want the best answers? Ask the best questions! TANSTAAFL!
 
So, if I do the WAMP5 install, how would I go about configuring PHP5.X to use the mysql_* family so that I don't run into issues?

Thanks for the post!
 
Sorry, but I may not be the best person to ask that. Nearly all my experience with PHP is on LAMP.

In general, though, to be able to tailor PHP most closely to your needs, you need to compile the software from source tarball.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top