473,388 Members | 1,286 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

php-cli no mysql module for non-root

So far I've been unable to find anything that addresses this one...

Basically, if I am logged in as root and issue a "php -m", mysql is in the
list of installed modules. If I log in or su to a normal user and do the
same then mysql is *not* in the list and I cannot use mysql_connect (or any
other mysql function)...

Any ideas on why this is or how to fix it?
Notes:

# php -v
PHP 4.3.3 (cgi-fcgi) (built: Nov 4 2003 14:05:47)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

Module list as root:
bcmath,bz2,calendar,ctype,dba,dbase,ftp,gd,gmp,ima p,mysql,openssl,overload,pcre,
posix,session,shmop,sockets,standard,sysvsem,sysvs hm,tokenizer,xml,yp,zlib

Module list as non-root:
bcmath,bz2,calendar,ctype,dba,dbase,ftp,gd,gmp,ima p,openssl,overload,pcre,posix,
session,shmop,sockets,standard,sysvsem,sysvshm,tok enizer,xml,yp,zlib
Thanks,
DBenson
Jul 17 '05 #1
2 6794
DBenson wrote:
So far I've been unable to find anything that addresses this one...

Basically, if I am logged in as root and issue a "php -m", mysql is in the
list of installed modules. If I log in or su to a normal user and do the
same then mysql is *not* in the list and I cannot use mysql_connect (or any
other mysql function)...

Any ideas on why this is or how to fix it?
Maybe doing a diff between two "php -i"s will reveal why that happens.
For me both root and normal user have the same modules installed.

Can't you

<?php dl('mysql.so') ?>

load the mysql extension at runtime?
Notes:

# php -v
PHP 4.3.3 (cgi-fcgi) (built: Nov 4 2003 14:05:47)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies


$ php -v
PHP 4.3.3 (cli) (built: Jan 25 2004 23:17:16)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #2
Pedro Graca wrote:
DBenson wrote:
So far I've been unable to find anything that addresses this one...

Basically, if I am logged in as root and issue a "php -m", mysql is in
the
list of installed modules. If I log in or su to a normal user and do the
same then mysql is *not* in the list and I cannot use mysql_connect (or
any other mysql function)...

Any ideas on why this is or how to fix it?


Maybe doing a diff between two "php -i"s will reveal why that happens.
For me both root and normal user have the same modules installed.

Can't you

<?php dl('mysql.so') ?>

load the mysql extension at runtime?
Notes:

# php -v
PHP 4.3.3 (cgi-fcgi) (built: Nov 4 2003 14:05:47)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies


$ php -v
PHP 4.3.3 (cli) (built: Jan 25 2004 23:17:16)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies


dl('mysql.so') wasn't allowed but did provide another clue...**I*think*that
php is running is safe_mode for non-root but I can't figure out why (all
the related options in php.ini are off)...
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: the wonderer | last post by:
This is an elementary question, but I've not been able to find the answer, so here goes: I am developing a site using php. I have the html header information in a file that I include in all the...
4
by: Krista | last post by:
Hi everybody, I think my confi has some problems. Can you guys help me to see what is going on? i install Apache2.0.48 and Php4.3.4 in WinXP. I add some codes in httpd(inside apache...
43
by: grz02 | last post by:
Hi, Im an experienced database+software designer and developer, but, unfortunately, anything to do with web-programming and web-systems designs is still a pretty new area to me... (been working...
0
by: 356523600 | last post by:
HTML To PHP Converter 4.2.1.8 Free download Get more for less ... HTML To PHP Converter 4.2.1.8 Get more for less! With a new version of HTML To PHP Converter 4, we've dropped the price and given...
8
by: Marcel | last post by:
I have a problem with a PHP page that seems to get executed twice. I am running PHP5 ISAPI on 2003 server. The script is a PHP page with a form. When the form is submitted one record have to...
1
by: ansc1 | last post by:
Hello, I'm new to using php coding. I need help with the following: 1. There is a submit button on the form and is saves information to my database. After clicking on "Save Measurement" it...
26
by: webrod | last post by:
Hi, I have some php pages with a lot of HTML code. I am looking for a HTML validator tool (like TIDY). TIDY is not good enough with PHP tags (it removes a lot of php code). Do you have any...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
0
by: Patriot89 | last post by:
I have a quick question in reference to php file extenstions... I have code for example like this... This is all located on this site www.ixalliance.com/BHS/Default (This is my nav.php file) ...
1
by: gnawz | last post by:
Hi guys, I have a couple of php files that perform various tasks. I will use fields in my system and provide code as well I need help as follows: My database contains the fields Category...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.