faqts : Computers : Programming : Languages : PHP : Database Backed Sites : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

108 of 143 people (76%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

After getting:..undefined function mysql_connect(), i learned i needed php_mysql.so modules etc. How add this without reinstall apache and so on.

Jul 13th, 2000 14:48
Ferdinando Simonetti, Henrik Hansen, Adam Dixon,


Try using the following code in the top of your php script (only one
time in every and every script)
dl("mysql.so");
Which loads the mysql functions for you to use.
--- New part ---
On other hand, you can softly recompile PHP...
cd /path/to/php/sources
make distclean (only if you compiled PHP by yourself in the past)
./configure --with-apxs=/path/to/apache/bin/apxs --with-
mysql=/path/to/basedir/of/mysql ... --whatever-you-want
make && make install
Et voilą