Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  yordan : (14 April 2014 - 05:28 PM) By The Way, This Could Be An Interesting Subject For A Topic, What About Posting This Question? Let's See If Other People Have The Same Feeling Concerning Bootlists!
@  yordan : (13 April 2014 - 09:36 AM) Boot Order : Cd, [Usb,] Hard Drive :D
@  yordan : (11 April 2014 - 07:23 PM) I Simply Let The Bios Do That
@  Ritesh : (11 April 2014 - 10:23 AM) Is It Possible To Launch Fedora Live Cd Or Installation Disk From Hard Drive On Windows Platform Using Grub Mbr File.
@  Ritesh : (11 April 2014 - 10:21 AM) No U Are Not.. Btw.. I Have Question For You.
@  yordan : (10 April 2014 - 08:02 AM) You Are Partially Right.
I Was Not.
Nevertheless, I Am Again :)
@  Ritesh : (09 April 2014 - 07:33 PM) :P
@  Ritesh : (09 April 2014 - 07:33 PM) I Think U R Not..
@  yordan : (09 April 2014 - 09:28 AM) I'm The Master Of The Shoutbox!
@  yordan : (05 April 2014 - 10:32 PM) He-He
@  Ritesh : (04 April 2014 - 06:59 PM) Ha Ha Ha ....
@  yordan : (04 April 2014 - 11:15 AM) Welcome Back, Starscream!
@  yordan : (03 April 2014 - 02:31 PM) And I Hope That He Will Come Back Soon :)
@  yordan : (01 April 2014 - 02:53 PM) Nice, Ritesh Came, I'm Not Home Alone Today.
@  Ritesh : (01 April 2014 - 08:51 AM) Oh!!! Poor Dear Yordan..
@  yordan : (31 March 2014 - 10:02 AM) I'm A Poor Lonesome Cow-Boy
@  yordan : (27 March 2014 - 02:22 PM) He Is Unpatient Due To His Patients!
@  Ritesh : (27 March 2014 - 10:46 AM) :(
@  Ritesh : (27 March 2014 - 10:46 AM) He Is Busy With His Patients.
@  yordan : (26 March 2014 - 08:12 PM) Ahsani, Where Are You?

Photo
- - - - -

PHP-MySQL On IIS 5.1 Problem A connection problem between PHP 5 and MySQL 5


6 replies to this topic

#1 Bananapicker

Bananapicker

    Newbie [ Level 1 ]

  • Members
  • 4 posts

Posted 13 April 2006 - 05: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

#2 nightfox

nightfox

    NiGHTFoX - Hiding in the dark

  • Members
  • 680 posts

Posted 13 April 2006 - 11:47 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

#3 soleimanian

soleimanian

    End Of Computer

  • Members
  • 346 posts
  • Location:.:: MARS ::.
  • Interests:smoking, drinking, gambling

Posted 16 April 2006 - 04:51 PM

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

#4 vhortex

vhortex

    Guilty Until Proven Innocent

  • Members
  • 513 posts
  • Gender:Male
  • myCENTs:32.25

Posted 18 April 2006 - 12:38 PM

;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

#5 vicky99

vicky99

    Member [ Level 2 ]

  • Members
  • 54 posts

Posted 29 May 2006 - 10:02 AM

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.

#6 CaptainRon

CaptainRon

    Premium Member

  • Members
  • 238 posts

Posted 29 May 2006 - 04:32 PM

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.

#7 Houdini

Houdini

    Super Member

  • Members
  • 572 posts
  • Location:Nashville Tennessee

Posted 29 May 2006 - 06:46 PM

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
;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.
<?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.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users