PDA

View Full Version : Wordpress / PHP



0N3
February 24th, 2016, 07:11 PM
When I open my http://localhost/wordpress I get the error

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

I have checked my PHP.ini file and unchecked the extension=mysql & extension=mysqli I have also tried uncheck each one individually and restart apache and still this problem persists. I have installed lamp-server^, apache and mysql.Every forum I hav checked is saying it's my PHP.ini file but I have followed the instructions by unchecking the extension=mysql & extension=mysqli and I still can't access my wordpress.

SeijiSensei
February 24th, 2016, 07:22 PM
Try this:

sudo apt-get install php5-mysql
Then restart Apache.

0N3
February 24th, 2016, 07:23 PM
I have that installed it says it's the newest version

SeijiSensei
February 25th, 2016, 04:02 PM
I'm assuming that MySQL is running. You can check quickly by running the command

telnet localhost 3306
You should see

Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

followed by some gibberish.

Let's also make sure that Apache is loading the MySQL extension. Create a file called info.php in the website's root directory that contains the line:

<?php phpinfo() ?>

Now view that file from a browser. Scroll down the page and make sure you see the mysql and mysqli sections of the report.

0N3
February 25th, 2016, 07:50 PM
I was on 16.04 when this error occurred (clean install) I went back to 14.04 (clean install) and followed exact same procedures and it works as it always did perfectly fine. Maybe it's a bug in 16.04 that apache isn't loading the extensions of MYSQL. I am going to install 16.04 (clean install) again and double check this and thanks for your help SeijiSensei. I will post back later with the output of
telnet localhost 3306 I'll create the php file too and post back the information. Many thanks again!

0N3
February 25th, 2016, 07:57 PM
Is this post posted in the wrong section of the forum or if it is a 16.04 issue report it in the 16.04 sub forum?

howefield
February 25th, 2016, 07:59 PM
Is this post posted in the wrong section of the forum or if it is a 16.04 issue report it in the 16.04 sub forum?

If you are dealing with 16.04, then yes, the development forum (http://ubuntuforums.org/forumdisplay.php?f=427). Otherwise here is fine.

QIII
February 25th, 2016, 08:01 PM
Moved to Ubuntu Development Version

0N3
February 25th, 2016, 08:02 PM
Go raibh mile maith agat :)

howefield
February 25th, 2016, 08:04 PM
Go raibh mile maith agat :)

tá fáilte romhat

I believe :)

QIII
February 25th, 2016, 08:04 PM
Yes...

Tá fáilte romhat!

(Most of the rest of the Irish I know is from my grandfather swearing and from dirty pub songs, so don't ask me for more!)

0N3
February 25th, 2016, 08:05 PM
Yes / or as gaeilge "sea" pronounced sha

0N3
February 25th, 2016, 10:24 PM
All is working now after a fresh install I have disabled some PPA's I use maybe that was an issue I will enable them and try reproduce the issue and take it from there. Thanks all for your help! Should I mark this as solved or wait and try reproduce the issue? This is my 3rd time installing wordpress on Ubuntu 16.04 and the only time successful so I am not sure if it is successful or not due to the PPA's so should I mark this solved?