You are not logged in.

#1 2014-03-02 08:19:20

AndrzejL
Member
Registered: 2012-12-07
Posts: 160

[SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

Hi guys.

I have bitten the bullet and upgraded to the Apache 2.4 and PHP from testing and solved a 10 tons of post-upgrade config nightmares just to figure out that MariaDB will not work with those versions until recompiled against them. Can we please have MariaDB added to testing repo after it was compiled against the Apache and PHP from testing?

Thanks in advance.

Kind regards.

Andrzej

Last edited by AndrzejL (2014-03-02 22:53:23)


The worst thing about censorship is ██████ ██ ████ ████████████ and ██████ ███████ ███ ███████████.

Offline

#2 2014-03-02 08:34:19

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,950
Website

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

How does MariaDB depend on Apache or even PHP? What problems did you have exactly?

Offline

#3 2014-03-02 08:44:58

AndrzejL
Member
Registered: 2012-12-07
Posts: 160

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

Pierre wrote:

How does MariaDB depend on Apache or even PHP? What problems did you have exactly?

Example:

[01-Mar-2014 20:37:04 Europe/Dublin] PHP Fatal error:  Class 'mysqli' not found in /var/www/html/images/include/dblayer/functions_mysqli.inc.php on line 61

Also Wordpress and Coppermine are screaming about missing MySQL plugins.

Cheers.

Andrzej

Last edited by AndrzejL (2014-03-02 08:46:44)


The worst thing about censorship is ██████ ██ ████ ████████████ and ██████ ███████ ███ ███████████.

Offline

#4 2014-03-02 08:56:39

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,950
Website

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

I don't see how that is related to Apache though. Are the mosql-modules enabled in php.ini? How are you using PHP?

Offline

#5 2014-03-02 09:12:27

Spider.007
Member
Registered: 2004-06-20
Posts: 1,143
Website

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

So after 10 tons of nightmares you didn't enable the mysql.so and mysqli.so extensions in your php.ini?

Offline

#6 2014-03-02 14:29:31

AndrzejL
Member
Registered: 2012-12-07
Posts: 160

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

Pierre wrote:

I don't see how that is related to Apache though. Are the mosql-modules enabled in php.ini?

Spider.007 wrote:

So after 10 tons of nightmares you didn't enable the mysql.so and mysqli.so extensions in your php.ini?

I am not an idiot guys wink (well maybe I am but...), I would not come here and complain about missing extensions for mysql if I didnt tripple checked they were enabled in php.ini.

[root@icsserver andrzejl]# cat /etc/php/php.ini | grep -v ';' | grep -i mysql | grep ext
extension=mysqli.so
extension=mysql.so
extension=pdo_mysql.so
[root@icsserver andrzejl]# 
Pierre wrote:

How are you using PHP?

FPM/FastCGI  / proxying all the php requests,

PHP is working fine from what I can see.

Andrzej_L_Arch_Linux_Screenshot_177.jpg

And Wordpress spits out:

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

Which I assumed meant that the mysqld (in this case MariaDB) should be recompiled against php to provide those extensions. Could be wrong. Wouldn't be the first time.

Cheers.

Andrzej

Last edited by AndrzejL (2014-03-02 15:01:43)


The worst thing about censorship is ██████ ██ ████ ████████████ and ██████ ███████ ███ ███████████.

Offline

#7 2014-03-02 14:43:50

Spider.007
Member
Registered: 2004-06-20
Posts: 1,143
Website

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

Well then it should just work. How would mariadb be 'recompiled against apache and php'? The php-modules are supplied by the php package; not mariadb or apache. What is the output of

<?php print_r(get_loaded_extensions());

?

Offline

#8 2014-03-02 14:48:24

AndrzejL
Member
Registered: 2012-12-07
Posts: 160

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

Spider.007 wrote:

Well then it should just work. How would mariadb be 'recompiled against apache and php'? The php-modules are supplied by the php package; not mariadb or apache. What is the output of

<?php print_r(get_loaded_extensions());

?

My mistake I thought that mysql extensions were provided by... mysql. Doesn't sound illogical if You really think about it wink.

The output:

Array ( [0] => Core [1] => date [2] => ereg [3] => libxml [4] => pcre [5] => zlib [6] => ctype [7] => dom [8] => fileinfo [9] => filter [10] => hash [11] => json [12] => mbstring [13] => SPL [14] => PDO [15] => Reflection [16] => session [17] => SimpleXML [18] => standard [19] => tokenizer [20] => xml [21] => xmlreader [22] => xmlwriter [23] => mysqlnd [24] => cgi-fcgi [25] => mhash ) 

Regards.

Andrzej

Last edited by AndrzejL (2014-03-02 15:00:50)


The worst thing about censorship is ██████ ██ ████ ████████████ and ██████ ███████ ███ ███████████.

Offline

#9 2014-03-02 17:38:15

Spider.007
Member
Registered: 2004-06-20
Posts: 1,143
Website

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

both mysql and mysqli are not in that array, that means the extensions are not loaded. You obviously restart fpm after changing the ini? Does php_ini_loaded_file() output /etc/php/php.ini? What does `php` say when you run it on the cli? Does it output any errors?

Offline

#10 2014-03-02 18:24:24

AndrzejL
Member
Registered: 2012-12-07
Posts: 160

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

Spider.007 wrote:

both mysql and mysqli are not in that array, that means the extensions are not loaded. You obviously restart fpm after changing the ini?

Yes several times.

Spider.007 wrote:

Does php_ini_loaded_file() output /etc/php/php.ini?

Yes the output of:

<?php print_r(php_ini_loaded_file());

is

/etc/php/php.ini
Spider.007 wrote:

What does `php` say when you run it on the cli? Does it output any errors?

No. It just waits there until I ^c it. Does not gives prompt back until I do so.

Kind regards.

Andrzej


The worst thing about censorship is ██████ ██ ████ ████████████ and ██████ ███████ ███ ███████████.

Offline

#11 2014-03-02 22:48:43

AndrzejL
Member
Registered: 2012-12-07
Posts: 160

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

Ok its my fault completely... I have not noticed /etc/php/php.ini.pacnew and I have never merged them...

Turns out I am an idiot after all. After opening the documents side by side, eyeballing for differences and changing several options in the pacnew version I have copied its content and pasted it in the php.ini file and restarted the php-pfm...

Array ( [0] => Core [1] => date [2] => ereg [3] => libxml [4] => pcre [5] => zlib [6] => ctype [7] => dom [8] => fileinfo [9] => filter [10] => hash [11] => json [12] => mbstring [13] => SPL [14] => PDO [15] => Reflection [16] => session [17] => SimpleXML [18] => standard [19] => tokenizer [20] => xml [21] => xmlreader [22] => xmlwriter [23] => mysqlnd [24] => cgi-fcgi [25] => curl [26] => exif [27] => gd [28] => gettext [29] => mcrypt [30] => mysqli [31] => mysql [32] => openssl [33] => pdo_mysql [34] => mhash )

Appologies for a false alarm. I know I should always merge the pacnew files - it just slipped past me without me noticing it.

Kind regards.

Thank You for Your help.

Andrzej

Last edited by AndrzejL (2014-03-02 22:56:38)


The worst thing about censorship is ██████ ██ ████ ████████████ and ██████ ███████ ███ ███████████.

Offline

#12 2016-06-12 19:54:40

su
Member
Registered: 2016-06-12
Posts: 1

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

AndrzejL wrote:
Pierre wrote:

How does MariaDB depend on Apache or even PHP? What problems did you have exactly?

Example:

[01-Mar-2014 20:37:04 Europe/Dublin] PHP Fatal error:  Class 'mysqli' not found in /var/www/html/images/include/dblayer/functions_mysqli.inc.php on line 61


Cheers.

Andrzej

Hi there
This is my first post
I have same condition
and same error

for

 print_r(php_ini_loaded_file());

I got

/etc/php/php.ini

and for :

print_r(get_loaded_extensions());

i got:

Array ( [0] => Core [1] => date [2] => libxml [3] => openssl [4] => pcre [5] => zlib [6] => ctype [7] => dom [8] => fileinfo [9] => filter [10] => hash [11] => json [12] => mbstring [13] => SPL [14] => PDO [15] => bz2 [16] => posix [17] => Reflection [18] => session [19] => SimpleXML [20] => standard [21] => tokenizer [22] => xml [23] => xmlreader [24] => xmlwriter [25] => mysqlnd [26] => apache2handler [27] => Phar [28] => calendar [29] => curl [30] => exif [31] => ftp [32] => mysqli [33] => zip [34] => xdebug ) 

my php.ini :

http://13x.ir/Or

but for phpmyadmin i see this error :

phpMyAdmin - Error

The mysqli extension is missing. Please check your PHP configuration. See our documentation for more information.

Offline

#13 2016-06-13 15:35:49

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,580
Website

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

1. Don't necro-bump.

2, Have you done what the error message told you to do?

3. Are there any information in the logs?


Matt

"It is very difficult to educate the educated."

Offline

#14 2016-06-13 15:39:13

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,843
Website

Re: [SOLVED] Php not loading mysql extensions [Merge php.ini.pacnew file].

Closed for reason #1 noted by mrunion.

su, welcome to the forums.  Feel free to start a new thread to get help with your issue.  Please first try #2 from above, and if you still have a problem, start the new thread (you can link back to this one as reference if you want) and be sure to include #3 from above.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

Board footer

Powered by FluxBB