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

Associate
Joined
18 Nov 2008
Posts
2,430
Location
Liverpool
Hey guys, first time using CentOS 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!
 
have u checked if theres a specific apache-php install ?

some distros have a seperate package you can use, and it usually works better.

im more used to apt that yum thou.

usually if i come accross problems like this, i just compile them manaually from sources.

but obvously this is not what u want to do. Im sure someone with more knowledge of yum could help you solve it
 
Probably missing some packages.

Install the php extensions (php in here anyway..):

yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml

Additional mysql (inc devel - ive put the mysql package in here anyway..)

yum install mysql mysql-server mysql-devel

And the devel for apache (apache package in here anyway..):

yum install httpd httpd-devel

Finally:

yum install phpmyadmin



Edit - my bet its the php-mysql package your missing:)
 
Last edited:
I've had this problem before,

uncomment the lines:

extension=mysql.so
extension=mysqli.so

in your php.ini file, under archlinux it is found in:

/etc/php/php.ini

EDIT: My bad, jumped in before I read the whole post :(

After a proper read I agree:

Edit - my bet its the php-mysql package your missing:)
 
Last edited:
Probably missing some packages.
snip

EDIT: IT WORKS, OH MY GOD IT WORKS THANK THE LORD! (If I were a religious man ^^).

Thank you so much man it is hugely appreciated. I don't know what fixed it because I did them all at once but I'm thinking probably the PHP as all the others were already done. Thank you so much!
 
EDIT: IT WORKS, OH MY GOD IT WORKS THANK THE LORD! (If I were a religious man ^^).

Thank you so much man it is hugely appreciated. I don't know what fixed it because I did them all at once but I'm thinking probably the PHP as all the others were already done. Thank you so much!

np. ;)

im 99% sure it was the php-mysql package, but you would have needed them all at one point so its goos theyre all installed.

Have fun!
 
Back
Top Bottom