0

/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/td-p/25734
Aug 12, 2006
Aug 12, 2006
Copy link to clipboard
Copied
I am working through the Training from the source Dreamweaver
8 with ASP, ColdFusion and PHP book and when I try to setup the
database connection it fails with an erro that says "Your PHP
server doesn't have the MySql module loaded or you can't use the
mysql_(p)connect functions".
I did some research and found some help on the MySqlForge Wiki site but even after uninstalling and re-installing PHP several times it still does not work.
I am running Windows XP sp2 PHP 5.1.4 (installed both using the Windows installer and manually) and MySql 5.
Thanks for the help
Bongo_Bob
I did some research and found some help on the MySqlForge Wiki site but even after uninstalling and re-installing PHP several times it still does not work.
I am running Windows XP sp2 PHP 5.1.4 (installed both using the Windows installer and manually) and MySql 5.
Thanks for the help
Bongo_Bob
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Aug 12, 2006
Aug 12, 2006
David -
Wow, thank you, thank you, thank you! That did it. I already tried a couple of those steps except for the php_mbstring.dll and I (and my colleague who was helping me) totally missed the quotes around the path to the ext folder, duh :(
Thanks again
Bongo_Bob
Wow, thank you, thank you, thank you! That did it. I already tried a couple of those steps except for the php_mbstring.dll and I (and my colleague who was helping me) totally missed the quotes around the path to the ext folder, duh :(
Thanks again
Bongo_Bob
LEGEND
,
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25735#M62436
Aug 12, 2006
Aug 12, 2006
Copy link to clipboard
Copied
Bongo_Bob wrote:
> I am working through the Training from the source Dreamweaver 8 with ASP,
> ColdFusion and PHP book and when I try to setup the database connection it
> fails with an erro that says "Your PHP server doesn't have the MySql module
> loaded or you can't use the mysql_(p)connect functions".
Pity you didn't use my book instead - it tells you what to do. Still,
I'm a nice guy, so...
You need to enable the MySQL and MySQLI extensions in PHP. Open php.ini,
and search for the section marked Windows extensions. Remove the
semicolon from the beginning of these lines:
;extension=php_mbstring.dll
;extension=php_mysql.dll
Add another line like this:
extension=php_mysqli.dll
Also make sure that the extension_dir setting in php.ini points to the
ext subfolder of your PHP folder. I have installed PHP in C:\php5, so
the setting looks like this:
extension_dir = "C:\php5\ext"
Save php.ini and restart Apache. Run phpinfo(), and check that mysql and
mysqli are listed in the PHP configuration (they're quite a long way down).
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
> I am working through the Training from the source Dreamweaver 8 with ASP,
> ColdFusion and PHP book and when I try to setup the database connection it
> fails with an erro that says "Your PHP server doesn't have the MySql module
> loaded or you can't use the mysql_(p)connect functions".
Pity you didn't use my book instead - it tells you what to do. Still,
I'm a nice guy, so...
You need to enable the MySQL and MySQLI extensions in PHP. Open php.ini,
and search for the section marked Windows extensions. Remove the
semicolon from the beginning of these lines:
;extension=php_mbstring.dll
;extension=php_mysql.dll
Add another line like this:
extension=php_mysqli.dll
Also make sure that the extension_dir setting in php.ini points to the
ext subfolder of your PHP folder. I have installed PHP in C:\php5, so
the setting looks like this:
extension_dir = "C:\php5\ext"
Save php.ini and restart Apache. Run phpinfo(), and check that mysql and
mysqli are listed in the PHP configuration (they're quite a long way down).
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25736#M62437
Aug 12, 2006
Aug 12, 2006
Copy link to clipboard
Copied
David -
Wow, thank you, thank you, thank you! That did it. I already tried a couple of those steps except for the php_mbstring.dll and I (and my colleague who was helping me) totally missed the quotes around the path to the ext folder, duh :(
Thanks again
Bongo_Bob
Wow, thank you, thank you, thank you! That did it. I already tried a couple of those steps except for the php_mbstring.dll and I (and my colleague who was helping me) totally missed the quotes around the path to the ext folder, duh :(
Thanks again
Bongo_Bob
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25737#M62438
Aug 12, 2006
Aug 12, 2006
Copy link to clipboard
Copied
Bongo_Bob wrote:
> Wow, thank you, thank you, thank you! That did it.
Glad to have sorted it out for you so quickly.
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
> Wow, thank you, thank you, thank you! That did it.
Glad to have sorted it out for you so quickly.
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25738#M62439
Aug 17, 2006
Aug 17, 2006
Copy link to clipboard
Copied
i wish i could say the say i get the same error but have
found that extension=php_mysqli.dll extension does not exist its
PHP Version 4.3.3 iom using at the moment and
mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.49
Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout -1 -1
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
I cannot find that part in the PHP info page but phpmyadmin connects just fine hope you can help 🙂
mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.49
Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout -1 -1
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
I cannot find that part in the PHP info page but phpmyadmin connects just fine hope you can help 🙂
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25739#M62440
Aug 18, 2006
Aug 18, 2006
Copy link to clipboard
Copied
whatsthepoint2005 wrote:
> i wish i could say the say i get the same error but have found that
> extension=php_mysqli.dll extension does not exist its PHP Version 4.3.3 iom
PHP 4 does not support MySQLI, so you don't need it. MySQL Improved is
available in PHP 5 only.
> I cannot find that part in the PHP info page but phpmyadmin connects just fine
> hope you can help :)
You don't say what help you need. I presume that the problem is
connecting from Dreamweaver. If you are using a recent version of MySQL,
the client libraries in your version of PHP are out of date. Try
downloading the new ones from the MySQL site:
http://dev.mysql.com/downloads/connector/php/
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
> i wish i could say the say i get the same error but have found that
> extension=php_mysqli.dll extension does not exist its PHP Version 4.3.3 iom
PHP 4 does not support MySQLI, so you don't need it. MySQL Improved is
available in PHP 5 only.
> I cannot find that part in the PHP info page but phpmyadmin connects just fine
> hope you can help :)
You don't say what help you need. I presume that the problem is
connecting from Dreamweaver. If you are using a recent version of MySQL,
the client libraries in your version of PHP are out of date. Try
downloading the new ones from the MySQL site:
http://dev.mysql.com/downloads/connector/php/
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25740#M62441
Aug 18, 2006
Aug 18, 2006
Copy link to clipboard
Copied
Ok so what about this server should i be able to connect to
it (ITS NOT LOCAL)
mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 1
Client API version 4.1.21
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient
Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
System Linux cupar.just4dns.com 2.6.9-22.ELsmp #1 SMP Sat Oct 8 19:11:43 CDT 2005 i686
Build Date Jun 6 2006 23:26:48
Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-imap=/usr/local/imap-2004g' '--with-mcrypt' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pspell' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20050606
as i get the same error with this and another linux LAN server upto date using yum php version 4.3 though
mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 1
Client API version 4.1.21
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient
Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
System Linux cupar.just4dns.com 2.6.9-22.ELsmp #1 SMP Sat Oct 8 19:11:43 CDT 2005 i686
Build Date Jun 6 2006 23:26:48
Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-imap=/usr/local/imap-2004g' '--with-mcrypt' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pspell' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20050606
as i get the same error with this and another linux LAN server upto date using yum php version 4.3 though
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25741#M62442
Aug 18, 2006
Aug 18, 2006
Copy link to clipboard
Copied
whatsthepoint2005 wrote:
> Ok so what about this server should i be able to connect to it (ITS NOT LOCAL)
>
> mysql
> MySQL Support enabled
> Active Persistent Links 0
> Active Links 1
> Client API version 4.1.21
Yes, you should be able to connect. However, it depends on the version
of MySQL that's running. It's possible that your remote version of MySQL
is 4.1 and the password authentication setup is wrong. See this
explanation in the MySQL documentation:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
> Ok so what about this server should i be able to connect to it (ITS NOT LOCAL)
>
> mysql
> MySQL Support enabled
> Active Persistent Links 0
> Active Links 1
> Client API version 4.1.21
Yes, you should be able to connect. However, it depends on the version
of MySQL that's running. It's possible that your remote version of MySQL
is 4.1 and the password authentication setup is wrong. See this
explanation in the MySQL documentation:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25742#M62443
Aug 19, 2006
Aug 19, 2006
Copy link to clipboard
Copied
david,
hope you are able to answer this. i am getting the same message as bongo_bob, and i followed your instructions you gave to him to try to fix the problem. unfortunately i still do not have mysql loaded (and using the phpinfo.php script to see, and mysql does not show up there). i am running on windoze xp, php 5.1.5, apache 2.0.59 , and mysql 5.0.24. any help would be most appreciated.
steve
hope you are able to answer this. i am getting the same message as bongo_bob, and i followed your instructions you gave to him to try to fix the problem. unfortunately i still do not have mysql loaded (and using the phpinfo.php script to see, and mysql does not show up there). i am running on windoze xp, php 5.1.5, apache 2.0.59 , and mysql 5.0.24. any help would be most appreciated.
steve
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25743#M62444
Aug 19, 2006
Aug 19, 2006
Copy link to clipboard
Copied
slw13 wrote:
> david,
> hope you are able to answer this. i am getting the same message as bongo_bob,
> and i followed your instructions you gave to him to try to fix the problem.
> unfortunately i still do not have mysql loaded
When you run phpinfo() what does it say in Configuration File (php.ini)
Path? It's about the sixth item from the top.
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
> david,
> hope you are able to answer this. i am getting the same message as bongo_bob,
> and i followed your instructions you gave to him to try to fix the problem.
> unfortunately i still do not have mysql loaded
When you run phpinfo() what does it say in Configuration File (php.ini)
Path? It's about the sixth item from the top.
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
LATEST
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25747#M62448
Jun 09, 2017
Jun 09, 2017
Copy link to clipboard
Copied
Thanks so much. it worked for me. thumbs up.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25744#M62445
Aug 19, 2006
Aug 19, 2006
Copy link to clipboard
Copied
C:/php/php.ini
that is where i have php installed and where the file is.
that is where i have php installed and where the file is.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25745#M62446
Aug 20, 2006
Aug 20, 2006
Copy link to clipboard
Copied
slw13 wrote:
> C:/php/php.ini
>
> that is where i have php installed and where the file is.
Good. That means that Windows is reading the correct configuration file.
In php.ini make sure that the value of extension_dir is set to this:
extension_dir = "C:\php\ext\"
In the Windows Extensions section, remove the semicolon from the
beginning of these lines:
;extension=php_mbstring.dll
;extension=php_mysql.dll
Add another line to the list like this:
extension=php_mysqli.dll
Save php.ini and restart your webserver. If you run phpinfo(), mysql and
mysqli should now appear in the list of extensions in the lower half of
the page.
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
> C:/php/php.ini
>
> that is where i have php installed and where the file is.
Good. That means that Windows is reading the correct configuration file.
In php.ini make sure that the value of extension_dir is set to this:
extension_dir = "C:\php\ext\"
In the Windows Extensions section, remove the semicolon from the
beginning of these lines:
;extension=php_mbstring.dll
;extension=php_mysql.dll
Add another line to the list like this:
extension=php_mysqli.dll
Save php.ini and restart your webserver. If you run phpinfo(), mysql and
mysqli should now appear in the list of extensions in the lower half of
the page.
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/dreamweaver-discussions/can-not-connect-to-mysql-with-php-in-dreamweaver/m-p/25746#M62447
Aug 30, 2006
Aug 30, 2006
Copy link to clipboard
Copied
i have no idea as to why the following change would have made
this work, but all of the above that you mentioned were already
done. the only other thing i ended up uncommenting in the windows
extentions was mssql.dll, and after that it worked. i know i
know...microsoft sql extensions should have nothing to do with
mysql extensions, so go figure. at least it worked finally and i
was able to test my code before moving it up to our production
server. thanks for the help.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

