[EMAIL PROTECTED] a écrit :

Look at the following setting, about the 6th entry down in phpinfo output:

Configuration File (php.ini) Path /usr/local/php-5.1.2/lib/php.ini That tells you where your current installation of php will look for it's configuration file, php.ini.

/usr/pkg/etc/php.ini



Make sure that your php.ini is in the correct location for your installation of php. You may need to copy php.ini or move it from another location to the one where your php looks for it.

yes php.ini is in the correct location


There are two settings you will need to alter in php.ini to load the mysql extension - assuming that the mysql extension exists on your sysyem.

If you are not sure where mysql.so is on your system, you could use something like mc (Midnight Commander) to do a search with:

F9->C->F (Function Key F9->Command->Find File)

Start at: /

Filename: mysql.so

Content: (leave empty)

[ ] case Sensitive

Then hit OK.

# find / -name mysql.so
/usr/pkgsrc/databases/php-mysql/work/php-4.4.1/ext/mysql/.libs/mysql.so
/usr/pkgsrc/databases/php-mysql/work/php-4.4.1/ext/mysql/modules/mysql.so
/usr/pkg/lib/php/20020429/mysql.so


Hopefully, this will tell you where mysql.so is on your system. If it does not show up, you may have to go into your Linux distro's setup program, and install the mysql.so php extension if it is available there.

Set the following directive to point to the directory where your php extensions are.

; Directory in which the loadable extensions (modules) reside.
;extension_dir = ./
extension_dir = /usr/local/php-5.1.2/lib/php/extensions/

extension_dir = /usr/pkg/lib/php/20020429/mysql.so


Further down in php.ini you you need to tell php to look in the above directory, and load the mysql.so extension with:

;extension=mime_magic.so
extension=mysql.so
;extension=ncurses.so

but there is something strange here , there is a lot of ;extension=....dll for windows , but there no ;extension=....so

anyway i add
extension=mysql.so



Don't forget to restart Apache server to make any changes to php.ini come into effect. The apache php module only reads php.ini at server startup time.

done

There should be a section for the mysql module appear in phpinfo output, when the mysql module has loaded.

still no mysql section :(

Hopefully, this will help you to get the mysql.so module loaded into php.

Regards

Keith

Reply via email to