01hanstu Posted August 16, 2010 Posted August 16, 2010 Hi, This is driving me insane! I have the task of installing PHP on a Windows 2003 Server with IIS. I have read quite a few tutorials and just keep getting the same result. The error i keep getting is "Fatal error: Call to undefined function mysql_connect()" I just cannot get PHP / MySql & IIS to work. Does anyone know a tutorial that will work? Regards - Stu
localzuk Posted August 16, 2010 Posted August 16, 2010 That means that the php you have installed doesn't have the phpmysql modules installed. See the PHP5 section under Windows here PHP: Installation - Manual
Dos_Box Posted August 16, 2010 Posted August 16, 2010 Are you using a PHP\MySQL (WAMP) package or just installing them as individual components?
localzuk Posted August 16, 2010 Posted August 16, 2010 Are you using a PHP\MySQL (WAMP) package or just installing them as individual components? He'll be doing it separately, as he's using IIS.
01hanstu Posted August 16, 2010 Author Posted August 16, 2010 Hi, Thanks for the reply. I am installing everything individually. Regards,
JoeyH Posted August 17, 2010 Posted August 17, 2010 Did you install PHP via the zip package? If so, there should be a file called php_mysql.dll in the /ext directory. Make sure it is there, and if it isn't, I'd download the zip package and get the file from there. Next open up your php.ini file and look for this line: ;extension=php_mysql.dll And remove the semicolon from the front: extension=php_mysql.dll
Hightower Posted August 17, 2010 Posted August 17, 2010 Also, I think you need to restart the web service for the above to take effect.
01hanstu Posted August 17, 2010 Author Posted August 17, 2010 Thanks again for the replies. I have done all of that. I have enable mysql extension. I always restart the service after making changes. Thanks - Stuart
01hanstu Posted August 17, 2010 Author Posted August 17, 2010 May have found the issue, but im just getting more confused! I set the ext direcectory to C:\php\ext in the php ini file. when i load up my phpinfo page it says the directory is C:\php5??? Any ideas - Stuart
localzuk Posted August 19, 2010 Posted August 19, 2010 May have found the issue, but im just getting more confused! I set the ext direcectory to C:\php\ext in the php ini file. when i load up my phpinfo page it says the directory is C:\php5??? Any ideas - Stuart That makes me think that either the IIS service hasn't been restarted or you've made a typo in your php.ini? Where's your php.ini file stored?
Arthur Posted August 19, 2010 Posted August 19, 2010 Stu. Have you done everything listed in this tutorial? http://sysadmingeek.com/articles/how-to-install-php-on-iis-6-for-windows-server-2003/
01hanstu Posted September 4, 2010 Author Posted September 4, 2010 Arthur, Firstly appologies with the delay in getting back to you. I have not set it up using CGI, i set it up using ISAPI. Is CGI needed for Windows Server 2003? I set it up on an XP workstation and it worked perfectly. Finally my PHP.ini file is in 'C:\Windows\' Regards, - Stuart
Arthur Posted September 4, 2010 Posted September 4, 2010 (edited) Arthur, Firstly appologies with the delay in getting back to you. I have not set it up using CGI, I set it up using ISAPI. Is CGI needed for Windows Server 2003?Starting with PHP v5.3, FastCGI is the recommended interface on Windows since ISAPI is no longer supported. However, if the ISAPI module is working perfectly for you then there is no reason to switch just yet. Don't even bother with CGI as it is a lot slower than FastCGI. When installing PHP on Windows, I normally use the IIS Aid PHP installer since this sets everything up for you, so saves a bit of time. Did you manage to get MySQL working in the end? Edited September 4, 2010 by Arthur
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now