|
Posted by Alan Silver on 08/21/07 10:01
Hello,
Sorry for the newbie question, but I've been searching and searching and
haven't found an answer to this one yet.
I installed PHP and MySql (both latest versions) yesterday on a machine
running Windows 2003 Server with IIS6. I followed the instructions at:
http://www.tjitjing.com/blog//2006/05/php5-with-iis6-on-windows-server-2003.html
to install PHP, and all seemed to go fine. I can run PHP pages through
IIS. Installation of MySql also went OK, and that seems to be running. I
can use the command line to create databases, create users, run select
statements, etc.
I then configured PHP to be able to use MySql. I uncommented the two
extension line in php.ini, and set the extension_dir to be the folder
where the DLLs live. This is where things started to go wrong ;-)
If I open a command prompt and run php_info(), then MySql is shown as a
loaded extension. I can use mysql_connect() and it will open a
connection to MySql fine.
However, if I run php_info() from a page loaded under IIS, then MySql is
NOT shown as loaded. If I try to use mysql_connect(), then I get an
error telling me that mysql_connect() is undefined - presumably because
IIS does not think the extension is loaded.
I have stopped and restarted IIS, and even rebooted the machine, but it
didn't make any difference. When called from IIS, PHP doesn't think that
MySql is loaded, even though it works fine when run from a command line.
All required DLLs are present, and the extension folder is referenced
both in the php.ini file and in the system PATH variable. The fact that
it works from a command line confirms that this is OK.
Any ideas? I have been searching for ages, but not found an answer to
this one. TIA for any help you can give.
--
Alan Silver
(anything added below this line is nothing to do with me)
Navigation:
[Reply to this message]
|