NTS Forums

Please login or register.

Login with username, password and session length
 

News:

Welcome to the Newtek Technology Services Forum!


Author Topic: How do you enable MySQL support in PHP 5?  (Read 25349 times)

Offline ygagnon

  • Hosting Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
How do you enable MySQL support in PHP 5?
« on: September 01, 2008, 06:59:22 PM »
I've recently started leasing a linux-based dedicated server through Crystaltech.  I currently don't have MySQL support in my installation of PHP, and need to enable it somehow. Here's a link to my phpinfo() report:

http://63.134.253.164/

(note how "--without-mysql" is in the "Configure Command" section up at the top)

My understanding has always been that PHP has to be compiled with mysql support if mysql support is needed.  However, .. this forum thread that I came across recently seems to suggest that you can get around re-compiling / re-installing by simply adding some new lines to the httpd.conf file:

http://marc.info/?l=php-install&m=118046660208505&w=2

Would someone here please explain to me what I need to do to enable MySQL support in my PHP installation? I kinda/sorta understand what's being suggested in the forum tread (above), though I'm a bit fuzzy on the specifics. 

Thanks,
- Yvan


JoshF [CT]

  • Guest
Re: How do you enable MySQL support in PHP 5?
« Reply #1 on: September 04, 2008, 04:37:44 PM »
The easiest way to enable mysql support for php is to run the following command:
yum install php-mysql

Then restart apache:
service httpd restart

Offline ygagnon

  • Hosting Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: How do you enable MySQL support in PHP 5?
« Reply #2 on: September 05, 2008, 04:02:12 PM »
Josh - when I try to do that,.. it seems as though it's about to do the installation, ... bu then it ends with the following:

Error: Missing Dependency: php = 4.3.9-3.22.12 is needed by package php-mysql
Error: Missing Dependency: libmysqlclient.so.14 is needed by package php-mysql
Error: Missing Dependency: libmysqlclient.so.14(libmysqlclient_14) is needed by package php-mysql

Please advise.

Thanks,
- Yvan

Offline TMackie

  • Hero Member
  • *****
  • Posts: 1,359
  • Karma: +102/-4
    • Crystaltech Web Hosting
Re: How do you enable MySQL support in PHP 5?
« Reply #3 on: September 05, 2008, 07:17:22 PM »
Josh - when I try to do that,.. it seems as though it's about to do the installation, ... bu then it ends with the following:

Error: Missing Dependency: php = 4.3.9-3.22.12 is needed by package php-mysql
Error: Missing Dependency: libmysqlclient.so.14 is needed by package php-mysql
Error: Missing Dependency: libmysqlclient.so.14(libmysqlclient_14) is needed by package php-mysql

Please advise.

Thanks,
- Yvan



What's our CentOS version? (more /etc/redhat-release)

Offline ygagnon

  • Hosting Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: How do you enable MySQL support in PHP 5?
« Reply #4 on: September 06, 2008, 09:29:07 AM »
When I type that at the command line via SSH, .. it returns the following:

CentOS release 4.6 (Final)

- yg


Offline TMackie

  • Hero Member
  • *****
  • Posts: 1,359
  • Karma: +102/-4
    • Crystaltech Web Hosting
Re: How do you enable MySQL support in PHP 5?
« Reply #5 on: September 06, 2008, 07:33:44 PM »
When I type that at the command line via SSH, .. it returns the following:

CentOS release 4.6 (Final)

- yg




Give this a shot, "yum --enablerepo centosplus upgrade php php-mysql"

Offline ygagnon

  • Hosting Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: How do you enable MySQL support in PHP 5?
« Reply #6 on: September 08, 2008, 05:48:59 AM »
I tried what you suggested, and after starting to go through the install process, it ends with the following:

Could not find update match for php
Could not find update match for php-mysql
No Packages marked for Update/Obsoletion

- Yvan