note 63912 added to ref.mysql
| From: | NathanBrizzee at osu1 dot php dot net | Date: | Mon, 03 Apr 2006 17:42:45 +0000 |
| Subject: | note 63912 added to ref.mysql | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-107237@lists.php.net to get a copy of this message | ||
Hi,
For all those who may still be struggling to get PHP to work with Windows and IIS, I finally found
something that works.
If you are getting the error message that function mysql_connect could not be found and you're
sure you enabled php_mysql in php.ini this is what finally solved my problem.
The post from mmw_canada at yahoo dot com on 10-Jul-2005 06:15 pointed me in the right direction.
Thanks mmw_canada!
1.) If you are connected to your Windows box via Remote Desktop, there is a switch to Remote Desktop
that will connect you to the console session. This is important because when IIS starts up,
it's error messages go to the console. If you are sitting at the physical machine, you can
ignore this step.
Here is the command
mstsc -v:10.192.186.xxx /F -console
For a more complete list of supported commands, type this at a dos command window:
mstsc /?
2.) Add a registry entry that tells PHP where to find its php.ini file. Copy the following text and
paste it in a text file. Rename the text file to something like phpini.reg and double-click it to
add it to your registry.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\\SOFTWARE\\PHP]
"IniFilePath"="C:\\\\PHP"
2.) Add c:\\php; (or wherever you unzipped PHP to) to your environment variable "Path".
Here is the important part that caused me hours and hours of grief. When adding c:\\php; to the
PATH environment variable, make SURE you add it BEFORE the path to CVSNT or MYSQL. PHP, CVSNT, and
MYSQL all have a file called libmysql.dll. Search order is important for PHP to find its file
libmysql.dll first. PHP must come first in the search path. Otherwise you will get an error from
the DLL on the console screen when IIS starts up saying it can't find the specified function
call.
To see the order of your environment variables, open up a dos window and type "set" and
press enter. Look at what Path is equal to. c:\\php; better come before cvsnt and mysql or it will
never work properly.
Hope this helps!
----
Server IP: 216.194.113.175
Probable Submitter: 209.77.108.130 (proxied: 10.58.60.161)
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/ref.mysql.php
Edit -- http://master.php.net/note/edit/63912
Del: integrated -- http://master.php.net/note/delete/63912/integrated
Del: useless -- http://master.php.net/note/delete/63912/useless
Del: bad code -- http://master.php.net/note/delete/63912/bad+code
Del: spam -- http://master.php.net/note/delete/63912/spam
Del: non-english -- http://master.php.net/note/delete/63912/non-english
Del: in docs -- http://master.php.net/note/delete/63912/in+docs
Del: other reasons-- http://master.php.net/note/delete/63912
Reject -- http://master.php.net/note/reject/63912
Search -- http://master.php.net/manage/user-notes.php