Linking php and mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

in your php.ini

find the line that says

;extension=php_mysql.dll

if there's a ; in front of the line, remove it
and put the dll in your extensions directory

same with libmysql.dll

[[this is what i do on windows, probably differs on linux]]
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

[[this is what i do on windows, probably differs on linux]]
correct, the .dll file will throw an error that its an invalid extension most likely
User avatar
Cheeseboy
Forum Commoner
Posts: 67
Joined: Thu Mar 23, 2006 2:43 pm

Post by Cheeseboy »

Man this is a pain. :? Well if anyone has that extension and post it here i would appreciate it.
User avatar
Cheeseboy
Forum Commoner
Posts: 67
Joined: Thu Mar 23, 2006 2:43 pm

Post by Cheeseboy »

and put the dll in your extensions directory
what do you mean?

Heres what my extensions look like:

Code: Select all

;extension=php_mbstring.dll
;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_crack.dll
;extension=php_curl.dll
;extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_domxml.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_hyperwave.dll
;extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_printer.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_w32api.dll
;extension=php_xmlrpc.dll
;extension=php_xslt.dll
;extension=php_yaz.dll
;extension=php_zip.dll
;extension=php_mysql.dll
;extension=php_mysqli.dll
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

Worst case scenario all you have to do is compile PHP, just download the source from http://www.php.net and read the docs...
jrd
Forum Commoner
Posts: 53
Joined: Tue Mar 14, 2006 1:30 am

Post by jrd »

Cheeseboy wrote:The only reason i asked how to link them is best i get this error on phpbb:
The PHP configuration on your server doesn't support the database type that you chose
and people tell me that there not linked properly. How can i fix this error its driving me crazy! 8O is there some kind of file like php.ini and httpd for mysql?
are you running php5?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

taken from http://us2.php.net/mysql
PHP 5+
MySQL is not enabled by default, nor is the MySQL library bundled with PHP. Read this FAQ for details on why. Use the --with-mysql[=DIR] configure option to include MySQL support. You can download headers and libraries from MySQL.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
Cheeseboy
Forum Commoner
Posts: 67
Joined: Thu Mar 23, 2006 2:43 pm

Post by Cheeseboy »

Becasue of that problem i down grade to 4.xx and i have the php_mysql.dll and other extensions now.
Post Reply