LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   php won't load modules (http://www.linuxquestions.org/questions/red-hat-31/php-wont-load-modules-936157/)

kb2tfa 03-24-2012 04:47 AM

php won't load modules
 
hi guys i'm running centos 6 with nginx, and I can't get mysql.so or others to load.

i'm new to this distro coming from ubuntu. it's a dedicated server i'm learning on.

php and mysql work with apache but not with this setup, so i'm not sure where to look to fix this.

all tutorials on the web have resulted in nill, as most are for apache and/or windows.

when i run php -v i get:
Code:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/msql.so' - /usr/lib64/php/modules/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/etc/curl.so' - /etc/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/etc/fileinfo.so' - /etc/fileinfo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/etc/json.so' - /etc/json.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/etc/mysql.so' - /etc/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/etc/mysqli.so' - /etc/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/etc/pdo.so' - /etc/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/etc/pdo_mysql.so' - /etc/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/etc/pdo_sqlite.so' - /etc/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/etc/phar.so' - /etc/phar.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/etc/sqlite3.so' - /etc/sqlite3.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/etc/zip.so' - /etc/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.3.10 (cli) (built: Feb  4 2012 07:36:51)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

i've commented out the extention in php.ini even with a path to /usr/lib64/php/modules and nothing.

my modules director above has the following:
Code:

-rwxr-xr-x 1 root root  69328 Feb  3 22:44 curl.so
-rwxr-xr-x 1 root root 1843440 Feb  3 22:44 fileinfo.so
-rwxr-xr-x 1 root root  36200 Feb  3 22:44 json.so
-rwxr-xr-x 1 root root  137120 Feb  3 22:44 mysqli.so
-rwxr-xr-x 1 root root  54408 Feb  3 22:44 mysql.so
-rwxr-xr-x 1 root root  32800 Feb  3 22:44 pdo_mysql.so
-rwxr-xr-x 1 root root  102456 Feb  3 22:44 pdo.so
-rwxr-xr-x 1 root root  24640 Feb  3 22:44 pdo_sqlite.so
-rwxr-xr-x 1 root root  265712 Feb  3 22:44 phar.so
-rwxr-xr-x 1 root root  44656 Feb  3 22:44 sqlite3.so
-rwxr-xr-x 1 root root  87504 Feb  3 22:44 zip.so

so it appears that the modules exist, but just won't load. my webpage displays the following error:

Code:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
at a loss as to where to go from here. need a second set of eyes to look at this

bathory 03-24-2012 09:41 AM

Hi,

These extensions are loaded from the respective .ini files under /etc/php.d. Whatever extension you don't need, you have to (re)move its .ini file from that directory.
For the rest of the extensions you need, use the full path to them, like for mysql in /etc/php.d/mysql.ini use:
Code:

extension=/usr/lib64/php/modules/mysql.so
Regards

pbraconnot 04-07-2012 11:45 AM

php.ini typo
 
My php.ini file had a typo in the extensions directions, when I uncommented the line it did not work

/etc/php5/apache2/php.ini

was written msql.so instead of mysql.so

I just did not see the missing y, I am getting old...

bathory 04-07-2012 12:04 PM

Quote:

Originally Posted by pbraconnot (Post 4647198)
My php.ini file had a typo in the extensions directions, when I uncommented the line it did not work

/etc/php5/apache2/php.ini

was written msql.so instead of mysql.so

I just did not see the missing y, I am getting old...

Please note that there is no typo here. msql.so is the php extension for the M$ SQL server and it's completely different from mysql.so that it used for mysql.

Regards


All times are GMT -5. The time now is 05:33 AM.