Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> PHP-MySQL On IIS 5.1 Problem, A connection problem between PHP 5 and MySQL 5
Bananapicker
post Apr 13 2006, 05:14 PM
Post #1


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 4
Joined: 13-April 06
Member No.: 12,732



Hello, I am currently testing my site on my on PC which I am using as a testing server. I am experiencing problems with my database connection between PHP 5 and MySQL 5. Does anyone know how to solve this problem?

If you need any more info about my problem feel free to ask.

Thanks
Chris
Go to the top of the page
 
+Quote Post
nightfox
post Apr 13 2006, 11:47 PM
Post #2


NiGHTFoX - Hiding in the dark
Group Icon

Group: Members
Posts: 680
Joined: 3-April 05
Member No.: 3,584



QUOTE(Bananapicker @ Apr 13 2006, 01:14 PM) *

Hello, I am currently testing my site on my on PC which I am using as a testing server. I am experiencing problems with my database connection between PHP 5 and MySQL 5. Does anyone know how to solve this problem?

If you need any more info about my problem feel free to ask.

Thanks
Chris

Here's your problem, you're using Micro$oft's lame excuse for a server. For Windows, if you're going to run a test server, get XAMPP. It's PHP, MySQL, Apache all bundled into one happy package. I've NEVER had any problems using a pre-packaged bundle of PHP, MySQL and Apache. I've tried exactly the same thing you're doing a long time ago. I got so frustrated with it that I installed phpTriad and problem solved.

Just try XAMPP. It should work better for you.

[N]F
Go to the top of the page
 
+Quote Post
soleimanian
post Apr 16 2006, 04:51 PM
Post #3


End Of Computer
Group Icon

Group: Members
Posts: 346
Joined: 1-September 04
From: .:: MARS ::.
Member No.: 28



Hi
Please give more details about your system
have you installed PHP manually or with windows installer

you should edit your PHP.inf file (located in C:\windows)
find following line:
;extension=php_mysql.dll
and delete first character like below:
extension=php_mysql.dll

and then copy/paste "php_mysql.dll" from \ext directory to php directory
for example
c:\php\ext to c:\php

Go to the top of the page
 
+Quote Post
vhortex
post Apr 18 2006, 12:38 PM
Post #4


Guilty Until Proven Innocent
Group Icon

Group: Members
Posts: 372
Joined: 13-April 05
Member No.: 3,937



QUOTE(soleimanian @ Apr 17 2006, 12:51 AM) *

;extension=php_mysql.dll
and delete first character like below:
extension=php_mysql.dll

and then copy/paste "php_mysql.dll" from \ext directory to php directory
for example
c:\php\ext to c:\php


Tried that before, never worked for me.. dont know if there is a bug with regards to mySQL and php with windows.. anyway, i have apache2 running..

to end up everything, i downloaded the sources codes for apache. php and apache2 and compiled myself my own version in one pack.. messy but it worked.. no ftp hough, never figure out how to enable that in the compilation..

anyway, phptriad is the shortest way, much better xammp.. I am on xammp now

Go to the top of the page
 
+Quote Post
vicky99
post May 29 2006, 10:02 AM
Post #5


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 54
Joined: 28-May 06
Member No.: 13,691



I had similar problem when I tried to connect PHP 5 and MySQL 50.1. Then I switched to PHP 4.4.1.Now its running smoothly.
I used the following codes to connect to Mysql
<?php
$conn = mysql_connect('localhost', 'root', 'brother');
echo "successfully connected";
?>
At first I got this error message:
ERROR1251:Client does not support authentication protocol requested by server; consider upgrading MySQL client.
I then used the following syntax in mysql prompt.


Go to the top of the page
 
+Quote Post
CaptainRon
post May 29 2006, 04:32 PM
Post #6


Premium Member
Group Icon

Group: Members
Posts: 238
Joined: 9-September 05
Member No.: 8,400



common nightfox, that was a pretty lame attempt by urself at solving a problem by just bashing microsoft. the other responses came far intellectually dont u think? See, I know its easier to work in Linux with the open source tools but testing stuff on windows (and IIS 5.1) too does pay off at times.

i suppose the solution of soleimanian shall work. when i encountered the same problem with PHP 5, i did the same. In Linux usually installing the concerned modules does the deed.
Go to the top of the page
 
+Quote Post
Houdini
post May 29 2006, 06:46 PM
Post #7


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



PHP 5 comes with the mysql dlls disabled instead it uses mysqli (supposed to stand for MySQL improved), you will have to edit your php.ini (wherever it is located) and remove the semicolon from in front of the dll as shown below
HTML
;extension=php_mssql.dll
;extension=php_mysql.dll
extension=php_mysqli.dll
Now if this is a brand new install and your php is working then just do a phpinfo() on your server copy and paste the below code into your server root directory if I remember right it is inetpub/www but if not then you should know ehre it is.
HTML
<?php
phpinfo();
?>
If you are having problems then you might want to go to Chapter 6 of the PHP manual right here at Chapter 6. Installation on Windows systems. Being a regular contributor at PHP Builder this same question is a common one, and any more my answer, especially if the problem has lasted for more than two days is to get either Triad, or XAMPP (my choice) or Wamp and uninstall or disable IIS even though it is on your PC Apache is FREE and the most widely used webserver in the world (IIS or PWS aren't even close). If you have this problem after reading and following the instructions for PHP install using PHP's own manual then you might take my advice and just get an all in one package that does it all for you with no problems and you are ready to go with coding on your local machine then when your scripts are bug free then send them up to your active internet Web site.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. MySQL - Trouble With Bulk Insert Statements(3)
  2. MySQL Realtime Replication(4)
  3. Recover Tables From A MySQL .frm File(8)
  4. Mirror My MySQL Database To Another Mysql Server(4)
  5. How To Connect MySQL With Flash?(8)
  6. MySQL Output Database Question(18)
  7. MySQL, Multiple Tables(24)
  8. Navcat For MySQL(9)
  9. Permission Problem With Mysql Database Creation(8)
  10. Mysql And Php(15)
  11. Login System Using A Mysql Db(5)
  12. Oracle Vs. Mysql Vs. Postgresql(9)
  13. Subqueries In Mysql(1)
  14. Apache Php With Mysql On Windows [solved](9)
  15. Not Understanding Mysql(4)
  1. Mysql - So Hard(14)
  2. Mysql Problem(1)
  3. Sun Bought Mysql(6)
  4. Mysql Backup With Another Address?(4)
  5. I Have An Error With My Mysql Connection(7)
  6. Mysql And User File_priv(0)
  7. Mysql Database Management(1)
  8. Mysql Database Entry By Excel Sheets(2)
  9. Mysql On Computer(9)
  10. Any Website Provide Free Host Mysql Host?(4)
  11. Mysql Multiple Tables(1)
  12. Mysql Overhead(3)
  13. Login System(6)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 02:25 PM