LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 03-24-2012, 04:47 AM   #1
kb2tfa
Member
 
Registered: Oct 2006
Location: Philadelphia PA
Distribution: Ubuntu 14.04
Posts: 48

Rep: Reputation: 7
Question 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
 
Old 03-24-2012, 09:41 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,907

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
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
 
1 members found this post helpful.
Old 04-07-2012, 11:45 AM   #3
pbraconnot
LQ Newbie
 
Registered: Apr 2012
Posts: 1

Rep: Reputation: Disabled
Cool 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...
 
Old 04-07-2012, 12:04 PM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,907

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Quote:
Originally Posted by pbraconnot View Post
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
 
  


Reply

Tags
centos, php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Xorg won't load GLcore and other modules daboost Debian 4 11-01-2006 08:41 AM
Some Modules Won't Load. Upgraded From 2.4 To 2.6 messiahnet Linux - Software 0 02-10-2005 08:31 PM
Why won't my modules load? redss Linux - Hardware 2 01-17-2005 02:30 PM
modules won't load huntz Slackware 2 10-03-2004 10:37 PM
SuSE 9.1 YaST2 won't load modules sykikchimp Linux - Distributions 11 09-28-2004 06:45 PM


All times are GMT -5. The time now is 09:06 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration