Just a guess, as I have not tried a full stack in windows, but in any unix if 
you are connecting php and mysql, you need something in the middle like 
DBD::mysql

See if this helps: http://forums.mysql.com/read.php?51,189692,189856


-----Original Message-----
From: Adam Sonzogni [mailto:asonzo...@setfocus.com]
Sent: Wednesday, December 23, 2009 9:52 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Help for a beginner

Hi everyone, first thank you for ALL help and the understanding that I am new 
to PHP and MySQL. This is a long email and for that I apologize but I am trying 
to provide as much detail as possible. If this is the wrong list to ask for 
help, kindly direct me to the proper authority.

I am trying to learn and I have built the following environment.

Windows Server 2008 Standard 32bit service Pack 2 with IIS7
mysql-essential-5.1.41-win32
php-5.3.1-nts-Win32-VC9-x86.msi
phpMyAdmin-3.2.4-english.zip


I followed the steps as detailed below (I already had IIS7 and CGI installed)


1. Install CGI & PHP
   http://www.trainsignaltraining.com/iis-7-install-fastcgi-php/2008-09-04/

2. Install MySQL
   http://www.trainsignaltraining.com/install-mysql-on-iis7/2008-09-10/

3. Install PHPMyAdmin
   
http://www.trainsignaltraining.com/install-phpmyadmin-on-iis7-and-server-2008/2008-09-16/


After I completed the installations
1. If I navigate to the PHP directory and type php -info it spews a ton of data 
at me
   AND
   I created info.php which contains:     <?php phpinfo(); ?>
   When I browse this, it correctly produces a page with all the info about my 
PHP server. Although I do not understand much of it I believe this confirms PHP 
is working correctly with IIS

2. I open the MySQL CLI and perform the commands outlined in Step 23 at this 
page
   http://www.bicubica.com/apache-php-mysql/index.php
   This returns the expected results, confirming MySQL is working

3. PHP is configured to work with php_mysql.dll as per the steps in the 
trainsignal links above so I begin!
I go to the phpmyadmin page, enter root and my password and after a long time I 
get a FastCGI error. I am not ready to believe it because, in classic MS form, 
it has several VERY different potential causes, and I have covered all of 
those. Plus the error code is 0x00000000 which is like saying nothing... I 
start thinking maybe it is not connecting to the mYSQL server right, the 
instructions re: pma and the password made no sense to me so I fiddle with that 
with no change.


   I  write the mysql_test.php page in step 5 of 
http://www.bicubica.com/apache-php-mysql/index.php
   This fails with: A connection attempt failed because the connected party did 
not properly respond after a period of time, or established connection failed 
because connected host has failed to respond.

   Because the PHP failed I try with ASP...
   <%
   set conn=Server.CreateObject("ADODB.Connection")
   conn.ConnectionString="Driver={mySQL};Server=localhost;Database=test;User 
Id=root;Password=youwish"
   conn.open
   Response.write("Connected")
   conn.close
   %>

   This returns:
       Microsoft OLE DB Provider for ODBC Drivers error '80004005'
       [Microsoft][ODBC Driver Manager] Data source name not found and no 
default driver specified
       /test.asp, line 4

I believe I have established MySQL is working, but for some reason it appears 
that it cannot be "reached" This IS on the same server so firewall should not 
be an issue, PLUS I confirmed the installer did create a hole. I turn off the 
MS firewall to be safe, no change.... I try a "repair" of MySQL, I uninstall, 
reboot and reinstall with no change.

NOTE: at several points I have tried iisreset and/or rebooting the system with 
no change.

I start to research the matter and my mind is now unglued. I found something 
referencing using mcrypt with PHPMyAdmin to speed it up and wondered if maybe 
the long delay before the FastCGI error could be resolved so I tracked down the 
dll, put it in my ext directory and changed my php.ini to reflect this -- file 
found at http://files.edin.dk/php/win32/mcrypt/

I found quite a bit about using libmysql.dll but there was no such file in my 
install, I pulled down the .zip package and that also did not contain it, I 
eventually found it in a 5.2.x archive but that does not seem to have helped. I 
have tried enabling: only mysql, mysql AND mysqli, and only mysqli. None of 
this seems to have done anything to change my situation.

Again, I apologize for the lengthy message, I hope I have accurately described 
my issue in the right amount of detail.

Thank You!
Adam Sonzogni






--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to