473,503 Members | 11,435 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot connect to MySQL through php on WindowsXP

I can conntect to mySQL thouth the mySQL monitor, but I cannot access
it thorugh php script.

After PHP5 installation I had uncommented "extention_php_mysql.dll" in
php.ini file.
I copied libmysql.dll from MySQL installation file to php directory
overriding the pre-installed file.
I also Edit the PATH in the system path = ;c:/php

I still cannot access mySQL!

Please, help
THank you
Vera

Aug 19 '06 #1
5 2334
Hi,

On 2006-08-19 22:27:41 +0200, "php-newbe" <ve*********@verizon.netsaid:
I still cannot access mySQL
can you post the error message you get from PHP while trying to connect
to your database?
You might have to set "display_errors" to "on" and "error_reporting" to
"E_ALL & ~E_NOTICE" if you don't see any error messages.

Patrick

Aug 19 '06 #2

Patrick Schlangen wrote:
Hi,

On 2006-08-19 22:27:41 +0200, "php-newbe" <ve*********@verizon.netsaid:
I still cannot access mySQL

can you post the error message you get from PHP while trying to connect
to your database?
You might have to set "display_errors" to "on" and "error_reporting" to
"E_ALL & ~E_NOTICE" if you don't see any error messages.

Patrick
Thank you, Patrick
The error says: "Call undefined function mysql_connect()".
I undertand that something wrong with the php_mysql.dll file.

Vera

Aug 19 '06 #3
php-newbe wrote:
I can conntect to mySQL thouth the mySQL monitor, but I cannot access
it thorugh php script.

After PHP5 installation I had uncommented "extention_php_mysql.dll" in
php.ini file.
I copied libmysql.dll from MySQL installation file to php directory
overriding the pre-installed file.
I also Edit the PATH in the system path = ;c:/php

I still cannot access mySQL!

Please, help
THank you
Vera
What does phpinfo() show? And does it show you're using the php.ini
file you think you're using?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Aug 20 '06 #4

php-newbe wrote:
I can conntect to mySQL thouth the mySQL monitor, but I cannot access
it thorugh php script.

After PHP5 installation I had uncommented "extention_php_mysql.dll" in
php.ini file.
I copied libmysql.dll from MySQL installation file to php directory
overriding the pre-installed file.
I also Edit the PATH in the system path = ;c:/php

I still cannot access mySQL!

Please, help
THank you
Vera
Some quick suggestions:

1. you commented "extension_php_mysql.dll". that doesn't help with
PHP5. version 5 utilizes the msyqli.dll. you need to create a line in
php.ini that says "extenstion_php_mysqli.dll".

2. make sure the path to php 'extensions' is correct in the php.ini
file.

3. if you downloaded php5 from php.net, there are two dlls for mysql.
one is the the 'mysql.dll' and the other is 'mysqli.dll'. make sure
you have a copy of the mysqli.dll in your C:/windows/system directory.
just some ideas

Aug 21 '06 #5
On 21 Aug 2006 09:27:04 -0700, "chrisv" <ni*************@gmail.comwrote:
>php-newbe wrote:
>I can conntect to mySQL thouth the mySQL monitor, but I cannot access
it thorugh php script.

After PHP5 installation I had uncommented "extention_php_mysql.dll" in
php.ini file.
I copied libmysql.dll from MySQL installation file to php directory
overriding the pre-installed file.
I also Edit the PATH in the system path = ;c:/php

I still cannot access mySQL!

Some quick suggestions:

1. you commented "extension_php_mysql.dll". that doesn't help with
PHP5. version 5 utilizes the msyqli.dll. you need to create a line in
php.ini that says "extenstion_php_mysqli.dll".
That's misinformation; the "old" mysql extension works fine on PHP5. You are
not forced to use mysqli.

You also have to spell extension correctly, and use an equals sign, not more
underscores.

extension=php_mysql.dll

Or:

extension=php_mysqli.dll
>2. make sure the path to php 'extensions' is correct in the php.ini
file.

3. if you downloaded php5 from php.net, there are two dlls for mysql.
one is the the 'mysql.dll' and the other is 'mysqli.dll'. make sure
you have a copy of the mysqli.dll in your C:/windows/system directory.
No, don't copy things to windows/system, use the PATH environment variable.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Aug 22 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5328
by: bettina | last post by:
Hello, My domain: www.coaster.ch My database: coasters User: bettina In the programm I wrote: <?php $db_server = "www.coaster.ch";
9
2001
by: Lad | last post by:
I use XP windows and Python 2.3. How can I install MYSQL on my computer? I could not find any installer for MYSQL and Python 2.3 Thanks for help Lad.
0
8314
by: Kyle Goetz | last post by:
hey, i'm new to mySQL...this meaning that i have tried ~10000 times to install it and get it working over the past few weeks...and it always gives me the same error (scroll further down to see it)...
5
4286
by: MLH | last post by:
I'm supposed to set a password for the MySQL root user. The output of mysql_install_db instructed me to run the following commands... /usr/bin/mysqladmin -u root -h appserver password mynwewpasswd...
8
5451
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
5
5072
by: smatta | last post by:
I have just installed MySql version 5.0-18 on Red Hat Fedora Core 4. It is running but I cant connect to it using MySql Query Browser running on my pc. >From my pc, I can telnet to the sql...
2
10482
by: zMisc | last post by:
I am using VB.NET 1.1 and cannot connect to a MySQL (v5) database. I've done the following: 1) Create a DSN for MyODBC. 2) Connect using: Driver=MySQL ODBC 3.51 Driver; Server=localhost; Data...
5
3830
by: Ike | last post by:
Through Java, I am attempting to connect to a MySQL 4.12 server on a remote computer. I can connect fine via php. I cann connect fine via Java, through a servlet, when the servlet is on the same...
1
2471
by: sganeshsvk | last post by:
sir, Suppose we want to share the two Linux system in mysql database then we using GRANT ALL PRIVILEGES query for access permission between two System Databases. Likely i want to share the...
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.