Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-09-2010, 08:10 PM
|
#1
|
|
LQ Newbie
Registered: Sep 2010
Location: Austin, TX
Distribution: slackware
Posts: 4
Rep:
|
cli php missing modules as regular user but not as root
My cli php is missing modules as regular user but not as root. In particular, mysql is missing... which is how I came across this issue.
I'm running Slack 12.2 w/ php 5.2.14, standard Slack packages.
As a normal unprivileged user:
-> whoami ; php -v ; php -m |wc -l ; php -m |grep mysql
jerry
PHP 5.2.14 (cli) (built: Aug 25 2010 15:17:31)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
26
As root:
-> whoami ; php -v ; php -m |wc -l ; php -m | grep mysql
root
PHP 5.2.14 (cli) (built: Aug 25 2010 15:17:31)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
58
mysql
mysqli
pdo_mysql
I've tried reinstalling php and it made no difference. php.ini is not to blame. I've Google'd this to death, no luck. Anyone have a shove in the right direction or a clue to share for this problem?
TIA
Jerry
|
|
|
|
09-09-2010, 08:41 PM
|
#2
|
|
Senior Member
Registered: Aug 2009
Posts: 3,497
|
Root's PATH will usually be different to standard users.. can you run 'which php' as both users to see if it's actually the same executable ?
cheers
|
|
|
|
09-09-2010, 09:08 PM
|
#3
|
|
LQ Newbie
Registered: Sep 2010
Location: Austin, TX
Distribution: slackware
Posts: 4
Original Poster
Rep:
|
They're exactly the same. /usr/bin/php
I have 3 other Slack 12.2 installs very similar to this one. Only one of them does not have this problem. I compared the installed packages & php configurations between all of the servers. The only differences are packages unrelated to php... proftp, jdk, and some X libraries. I use the same Slack mirror for all of these servers. Very bizarre.
Jerry
|
|
|
|
09-09-2010, 09:36 PM
|
#4
|
|
Senior Member
Registered: Aug 2009
Posts: 3,497
|
Maybe permissions on the actual module binaries ?
|
|
|
|
09-09-2010, 10:37 PM
|
#5
|
|
LQ Newbie
Registered: Sep 2010
Location: Austin, TX
Distribution: slackware
Posts: 4
Original Poster
Rep:
|
donut think so...
-> ls -al /usr/lib/php/extensions/
total 4244K
drwxr-xr-x 2 root root 4096 2010-08-25 15:22 .
drwxr-xr-x 14 root root 4096 2010-08-25 15:13 ..
-rwxr-xr-x 1 root root 29896 2010-08-25 15:22 bcmath.so
-rwxr-xr-x 1 root root 19268 2010-08-25 15:22 bz2.so
-rwxr-xr-x 1 root root 24804 2010-08-25 15:22 calendar.so
-rwxr-xr-x 1 root root 10780 2010-08-25 15:22 ctype.so
-rwxr-xr-x 1 root root 57240 2010-08-25 15:22 curl.so
-rwxr-xr-x 1 root root 49532 2010-08-25 15:22 dba.so
-rwxr-xr-x 1 root root 27844 2010-08-25 15:22 dbase.so
-rwxr-xr-x 1 root root 47488 2010-08-25 15:22 exif.so
-rwxr-xr-x 1 root root 43152 2010-08-25 15:22 ftp.so
-rwxr-xr-x 1 root root 360716 2010-08-25 15:22 gd.so
-rwxr-xr-x 1 root root 8596 2010-08-25 15:22 gettext.so
-rwxr-xr-x 1 root root 39708 2010-08-25 15:22 gmp.so
-rwxr-xr-x 1 root root 32140 2010-08-25 15:22 iconv.so
-rwxr-xr-x 1 root root 40028 2010-08-25 15:22 ldap.so
-rwxr-xr-x 1 root root 1847224 2010-08-25 15:22 mbstring.so
-rwxr-xr-x 1 root root 6980 2010-08-25 15:22 mhash.so
-rwxr-xr-x 1 root root 44884 2010-08-25 15:22 mysql.so
-rwxr-xr-x 1 root root 98288 2010-08-25 15:22 mysqli.so
-rwxr-xr-x 1 root root 81732 2010-08-25 15:22 openssl.so
-rwxr-xr-x 1 root root 86164 2010-08-25 15:22 pdo.so
-rwxr-xr-x 1 root root 23004 2010-08-25 15:22 pdo_mysql.so
-rwxr-xr-x 1 root root 394048 2010-08-25 15:22 pdo_sqlite.so
-rwxr-xr-x 1 root root 19484 2010-08-25 15:22 pspell.so
-rwxr-xr-x 1 root root 7524 2010-08-25 15:22 shmop.so
-rwxr-xr-x 1 root root 23012 2010-08-25 15:22 snmp.so
-rwxr-xr-x 1 root root 314920 2010-08-25 15:22 soap.so
-rwxr-xr-x 1 root root 336796 2010-08-25 15:22 sqlite.so
-rwxr-xr-x 1 root root 14072 2010-08-25 15:22 tokenizer.so
-rwxr-xr-x 1 root root 29124 2010-08-25 15:22 wddx.so
-rwxr-xr-x 1 root root 24208 2010-08-25 15:22 xsl.so
-rwxr-xr-x 1 root root 65876 2010-08-25 15:22 zip.so
-rwxr-xr-x 1 root root 25620 2010-08-25 15:22 zlib.so
|
|
|
|
09-10-2010, 01:36 AM
|
#6
|
|
Senior Member
Registered: Aug 2009
Posts: 3,497
|
Can you create/visit a phpinfo page ?
|
|
|
|
09-10-2010, 01:40 AM
|
#7
|
|
Senior Member
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 1,933
|
I've tried on my installs, creating another generic user and it can see all the modules, extensions included.
Then I saw in "man php" the -n option, that starts php without reading the .ini file and launching it like this it shows only the builtin modules.
I think in your case is not finding/reading that file (so he doesn't activate extensions): maybe you have to launch it specifying with the -c option the location of the php.ini.
obviously, I would check also if your user can read it making him issue a
Code:
cat /path/to/php.ini
can be also some directory permission are changed from the default (you tell us on one machine it works ok: I think a clean slack 12.2 don't behave like that -I tried on -current).
Last edited by ponce; 09-10-2010 at 01:50 AM.
|
|
|
1 members found this post helpful.
|
09-10-2010, 07:18 AM
|
#8
|
|
LQ Newbie
Registered: Sep 2010
Location: Austin, TX
Distribution: slackware
Posts: 4
Original Poster
Rep:
|
A fresh day with a fresh set of eyes (and a few cups of coffee) revealed that it was the permissions on the php.ini file. /etc/httpd/php.ini was missing +r for all users. Running the command "php -c /etc/httpd/php.ini -m" didn't throw a "Permission denied" error so I didn't think to check the read permissions of the file. *slaps forehead*
Many thanks to everyone that chimed in with suggestions, much appreciated!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:26 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|