Trouble installing LAMP (Linux, Apache, MySQL, PHP)

Support for webhosts that use CentOS
Post Reply
Redgie
Posts: 3
Joined: 2010/08/11 18:38:00

Trouble installing LAMP (Linux, Apache, MySQL, PHP)

Post by Redgie » 2010/08/11 18:42:37

Hey guys, first time posting on the CentOS forums and first time trying out any OS other than Windows! It's also my first Dedi (I know I know, I'm not doing well so far...)

Here's the problem, I can install the basics easily using:

yum install httpd
yum install php
yum install mysql
yum install mysql-server
yum install mysql-devel

And they all run fine, but when I install PHPMyAdmin, I get the same error every time: Cannot load mysql extension. Please check your PHP configuration. - Documentation

Now this is a commonly known problem, and the fix is simple, uncomment a line in php.ini. Which of course doesn't work for me! I've been at this for 2 days now and can't get anywhere, I really want to use the yum stuff as it's incredibly simple to install and maintain.

PLEASE can anybody help?

Much appreciated and thanks for taking the time to read!

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Trouble installing LAMP (Linux, Apache, MySQL, PHP)

Post by pschaff » 2010/08/11 20:21:34

Welcome to the CentOS fora. The following reading is recommended for new users:
[url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14274&forum=47]Readme First[/url]
[url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14408&forum=47]Installing Software[/url]
[url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14273&forum=47]Where to Find Answers[/url]
[url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47]How to provide information about your system[/url]

A quick forum search turns up [url=https://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=3087&forum=33]this thread[/url] that recommends[code]yum install php-mysql[/code]

Redgie
Posts: 3
Joined: 2010/08/11 18:38:00

Re: Trouble installing LAMP (Linux, Apache, MySQL, PHP)

Post by Redgie » 2010/08/11 20:23:18

Thanks for the reply, but I have already tried that, as well as most other obvious fixes :(

logan
Posts: 64
Joined: 2008/08/01 16:40:34

Re: Trouble installing LAMP (Linux, Apache, MySQL, PHP)

Post by logan » 2010/08/11 20:26:01

Did you [i]"/etc/init.d/httpd restart"[/i] (or 'graceful') after installing php-mysql? PHP won't know the extension has been added otherwise.

Redgie
Posts: 3
Joined: 2010/08/11 18:38:00

Re: Trouble installing LAMP (Linux, Apache, MySQL, PHP)

Post by Redgie » 2010/08/11 20:34:47

Yes I have done that, sadly it has had no effect.

Should there be a file called php_mysql.so or anything in the modules folder after installing it? Because there isn't...

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Trouble installing LAMP (Linux, Apache, MySQL, PHP)

Post by pschaff » 2010/08/11 20:38:33

# rpm -qlp php-mysql-5.1.6-27.el5.i386.rpm
/etc/php.d/mysql.ini
/etc/php.d/mysqli.ini
/etc/php.d/pdo_mysql.ini
/usr/lib/php/modules/mysql.so
/usr/lib/php/modules/mysqli.so
/usr/lib/php/modules/pdo_mysql.so

logan
Posts: 64
Joined: 2008/08/01 16:40:34

Re: Trouble installing LAMP (Linux, Apache, MySQL, PHP)

Post by logan » 2010/08/12 19:20:05

Anything in /var/log/httpd/error_log (or PHP's configured 'error_log')? Running the php cli may show some additional information as well.

Post Reply

Return to “CentOS 5 - Webhosting Support”