4/4 Help PHP MySQL experts! I installed PHP5 and Pear and tried
/usr/bin/php mytest.php. It works, except it doesn't know where
to find mysql_connect(...). How do you tell the command line
how to invoke mysql commands? Thanks.
\_ I'm the op and I did install mysql and it works under apache2. I
figured out my problem. There are two files,
/etc/php5/apache2/php.ini and /etc/php5/cli/php.ini.
Pear (command line php) uses /etc/php5/cli/php.ini, in which
I need to uncomment "extension=mysql.so" the same way I did it
for /etc/php5/apache2/php.ini. Thanks for your help Dave!
By the way I don't this problem when I call the same PHP via HTTP.
\_ PEAR is just a set of written-in-PHP classes and modules; it doesn't
provide any library functionality. You need to install the mysql
extension, which ships w/ PHP. In your UNIX it may ship as a
separate package. --dbushong |