![]() |
Connecting MySQL and PHP
Hi,
I installed PHP 5 and MySQL separately on my mac. However, it seems the folks behind PHP decided to disable MySQL by default, and no longer bundle the MySQL library with PHP. See here. As I have already installed MySQL, it would seem all I need to do is configure PHP with the --with-mysql=/path/to/mysql option. However, I have already installed PHP and would like to avoid having to reinstall it. Is there any way to modify my existing PHP 5 installation to recognize MySQL, or do I need to reinstall it? If I must reinstall it, is it necessary to delete the current installation first, and how would I go about doing that? Thanks for your help. |
There is a file for PHP that has a list of all the modules/Libraries, and there is one line that is about MySQL and you just have to uncomment it I believe, possibly providing that location (or placing the library/module in a certain directory). I'd look in the php directory where php is installed for something like Conf or Config, etc. From the php site you will need to download the library.
Quote:
|
Thanks for the input. I couldn't figure out how to do what you suggested, so I ended up reinstalling PHP with the --with-mysql option. It works fine now.
By the way, is anyone familiar with mysqli (MySQL Improved Extension) and is it worth installing? |
sorry what I said couldn't help. I haven't installed PHP on a Mac and I don't know how the server is setup for it.
|
Mysqli was designed for PHP 4.1 and later, I believe. It's what I used when I installed a couple years ago. I have no idea what the details are regarding the difference.
|
I'd recommend MacPorts. Just type sudo port install php5 +apache2+mysql5 (if you want to add/remove functionality from this, type port variants php5 and change as needed), and sit back and wait.
|
Re: Connecting MySQL and PHP
|
Re: Connecting MySQL and PHP
Dude. It's been a year since anyone has replied to this topic. Such threads are considered "dead", and shouldn't be revived, unless the conversation isn't yet over.
|
Re: Connecting MySQL and PHP
dont look at the fault;
ı want to help |
Re: Connecting MySQL and PHP
Well, you are definitely not helping by digging up year-old threads.
|
| All times are GMT -5. The time now is 9:17 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC