Skip to main content
Inspiring
Aug 18, 2019 7:27 PM UTC
Question

Trying to work with old mysql database connections format.

Hi,

I'm on a Mac with High Sierra and have MAMP v5.4

I have some old legacy php code that uses mysql database connections format.

I would like to get it working again for a while - so I can review it and later do updates to PDO.

Is there a way I could set it up so it can use my old legacy mysql database connections format.?

Thanks Dave

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

sinious
Legend
Sep 13, 2019 3:02 PM UTC

Not everything is for business! I have dozens of older projects creating things for myself that have useful old data in them.

revdave~ Did you get your code working? And do take notice to what was said he regarding old code and security if this is something publicly accessible. 

Translate
BenPleysier
Community Expert
Community Expert
Aug 18, 2019 10:54 PM UTC

You need to server PHP 5 to use MySQL, albeit in versions >5.5 you will receive a warning about deprecated MySQL and to start using MySQLi or PDO.

Translate
Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Liam Dilley
Inspiring
Aug 20, 2019 11:54 PM UTC

This is not accurate though.

Depending on when the project was created it could be on a variety of PHP 4 versions and the relevant SQL that was setup at the time.

MAMP offers you the ability to install multiple versions of both for different projects.

If you have a php.ini file you will be able to establish what the project in question was using Rev.

From there you can just install and setup the versions you need, make sure you link up the SQL data tables which you can do through PHPMYADMIN to help out and configure the PHP.ini

Your post is very broad without much details so outside of these basics no one can really advise you too much more unfortunately.

Translate
BenPleysier
Community Expert
Community Expert
Aug 21, 2019 2:15 AM UTC

You are joking I of course. PHP 5 was released on July 14, 2004. It would be most irresponsible to be using versions prior to that. Version 5.6 was released 5 years ago giving web developers plenty of time to head the warnings.

Translate
Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!