PHP5.3 on IIS6 with MySQLRSS

26 replies

Last post Sep 17, 2010 06:29 AM by hakerjack

  • PHP5.3 on IIS6 with MySQL

    Nov 11, 2009 11:10 AM|altjx|LINK

    Hello. I am trying to set up a forum but I am trying to get the basics first.

    I'm having a problem setting up PHP 5.3 on IIS6. All of the guides are still older than 5.3 and shows a "php5isapi.dll" file that doesn't come with 5.3. I can't find an updated guide to help me set up PHP 5.3 with IIS6 on server 2003..

    I'm in a big need of help :(. Can someone please point me in the right direction?
    I think I have MySQL set up correctly because I can connect to it in Navicat. When I was setting up PHPBB earlier, i got errors about the microsoft OBDDC driver or something and someone said that PHP wasn't configured correctly. So now I'm starting over and can't remember where I found working instructions =\

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 11, 2009 12:23 PM|don.raman|LINK

    Please follow my blog at http://blogs.iis.net/donraman/archive/2009/10/08/upgrading-to-php-5-3-an-easy-way.aspx. Let me know how it goes.

    Thanks,

    Don.

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 11, 2009 04:02 PM|altjx|LINK

    Thanks. going to try first thing in the morning.

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 11, 2009 04:02 PM|altjx|LINK

    Is there any easier step by step guides? Your blog has stuff like

    "Do the handler mapping for *.php files "
    "Set some of the INI directives for you in PHP.INI file which is considered as a good practice "

    I have no clue how to follow that exactly. I've followed many tutorials but I'm not experienced with this.

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 12, 2009 10:55 AM|altjx|LINK

    Hello??? Anyone? This sucks :(

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 12, 2009 11:08 AM|ksingla|LINK

    See if this article is what you need. You can also use Web Platform Installer which can do everything for you. Learn more about it here.

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 12, 2009 11:16 AM|altjx|LINK

     

    Thanks, gonna give it a shot now :)
  • Re: PHP5.3 on IIS6 with MySQL

    Nov 12, 2009 12:28 PM|altjx|LINK

    Even after using the Web Installer, it just installed it but it didn't configure IIS or anything like I'm trying to do. I didn't need an installer, I know how to install PHP, i'm trying to get help configuring. I'll check out that other link you gave me. thanks
  • Re: PHP5.3 on IIS6 with MySQL

    Nov 12, 2009 12:46 PM|altjx|LINK

    Sigh, even after the web installer finished, I created an index.php on my site, and used the php info code, it shows the page cannot be displayed, when I put an index.html, it shows... but everything is even configured automatically for me, and its still not working.. wtf? and i've followed the instructions on the other site u linked. idk what i could possibly be doing wrong, even the web installer configured everything for me and its not wrkin

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 12, 2009 01:05 PM|don.raman|LINK

    Hi,

    Please run both the commands below in a command window and paste the result here:

    cscript.exe C:\inetpub\AdminScripts\adsutil.vbs GET w3svc/DefaultDoc

    cscript.exe C:\inetpub\AdminScripts\adsutil.vbs GET w3svc/ScriptMaps | findstr php

    Can you look at directory 'C:\WINDOWS\system32\inetsrv' and ensure that you have:

    • <div>fcgiext.dll</div>
    • <div>fcgiext.ini</div>

    Also open the fcgiext.ini file and see if you have things set properly. A properly set INI file should ideally have:

    [Types]
    php=PHP

    [PHP]
    ExePath=C:\Program Files\PHP\php-cgi.exe
    InstanceMaxRequests=10000
    ActivityTimeout=600
    RequestTimeout=600
    EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000,PHPRC:C:\Program Files\PHP\

    Ensure that C:\Program Files\PHP\php-cgi.exe exists. and there is a valid php.ini file in the same directory.

    Can you run 'C:\Program Files\PHP\php-cgi.exe' <path to your index.php> and see what happens?

    If you are running 64 bit machine, php-cgi.exe will be there in 'C:\Program Files (x86)\PHP' folder.

    Disable IE friendly HTTP error and see if you get any other error in your browser.

    Thanks,

    Don.

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 12, 2009 01:36 PM|altjx|LINK

    K, i ran those two scripts.

    I have those 2 files in my C:\windows\system32\inetsrv. this is whats in my fcgiext.ini file

    [Types]
    php=PHP

    [PHP]
    ExePath=C:\PHP\php-cgi.exe
    InstanceMaxRequests=10000
    ActivityTimeout=300
    RequestTimeout=300
    EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000

    It says C:\PHP\php-cgi because I took the PHP folder from out of the C:\program files folder after it installed it. that's where all the tutorials tells me

     

    also, when i run the php-cgi.exe followed by the index.php, command prompt opens and starts scrolling a bunch of text, then goes away. this is also a 32 bit machine.

     

    let me know if have done everything u said, thanks for the reply btw

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 12, 2009 02:38 PM|don.raman|LINK

    Hi,

    What was the output of those two commands? Please paste it here.

    Can you change index.php to print something smaller like <?php echo 'Hello World'; ?> and see if 'Hello World' gets printed on the command prompt.

    Thanks,

    Don.

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 12, 2009 02:45 PM|altjx|LINK

    which two commands? the scripting commands or the one with php-cgi?

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 12, 2009 04:26 PM|don.raman|LINK

    don.raman

    cscript.exe C:\inetpub\AdminScripts\adsutil.vbs GET w3svc/DefaultDoc

    cscript.exe C:\inetpub\AdminScripts\adsutil.vbs GET w3svc/ScriptMaps | findstr php

    The above two commands.

    Thanks,

    Don.

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 11:01 AM|altjx|LINK

    The output of the first command is

    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    DefaultDoc                      : (STRING) "index.php,Default.aspx,Default.htm,D
    efault.asp,index.htm,index.html"

    The output of the second command is nothing. It just goes back to the directory line as if it worked.

     

    The only role I'm supposed to have on this server is application server correct?

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 12:36 PM|don.raman|LINK

    Hi,

    You do not have script mapping to handle PHP files and hence PHP is not working. To create script mapping do the below:Create script mapping

    1. Launch inetmgr.exe.
    2. Double click the machine icon for the local computer.
    3. Right click on "Web Sites" and pick "Properties."
    4. Click the "Home Directory" tab. 
    5. Click the "Configuration…" button.
    6. Click the "Add…" button.
    7. Browse to the fcgiext.dll located in %WINDIR%\system32\inetsrv.  

    Note: If you need to use FastCGI in 32 bit mode on a 64 bit machine, then browse to %WINDIR%\SysWOW64\inetsrv.

        8.  Enter .php as the Extension.

        9.  Enter Verbs as GET,HEAD,POST .

      10.  Ensure that "Script Engine" and "Verify that file exists" are checked.

    Thanks,

    Don.

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 12:43 PM|altjx|LINK

    I thought I did already. Earlier this morning though I started a new fresh installation of server, so I'm going to start fresh 'cause i don't want anything to be misconfigured mistakenly.

    So when Im back up and running, all I need to do is add Application Services role and launch microsoft webplatform installer and let it install PHP and FastCGI for me?

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 12:49 PM|don.raman|LINK

    Yes, you can use Web Platform Installer to configure everything. Please do not move PHP from Program Files folder to C:\PHP. Because if you do this and uninstall PHP available at Program files, the uninstall process will remove the script mapping.

    Good luck.

    Thanks,

    Don.

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 12:52 PM|altjx|LINK

    Thanks ALOT man. Can you check back on me later on to see if I got it working? I'll post if I run into any problems :D

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 01:16 PM|altjx|LINK

    Also, I need the "Application Services" role right? Do I need any others installed?

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 01:59 PM|don.raman|LINK

    You don't need anything. Whatever you need Web Platform Installer should install.

    Thanks,

    Don.

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 02:05 PM|altjx|LINK

     

    Oh okay, thanks.
  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 03:56 PM|altjx|LINK

    YESSSSSSSSSSS!!!!!!!!!!!!!! IT WORKS IT WORKS IT WORKS IT WORKS!!!!!!!!!!!

    thank you SO MUCH!! if i create a new website rather than the default, will the same settings be applied?

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 05:14 PM|don.raman|LINK

    Well, good to know that it is working for you. Ideally the handler mapping/script mapping and default document should be added globally. So if you create new web site it should still continue working.

    Again thanks for the patience.

    Don.

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 05:20 PM|altjx|LINK

    Thanks, I'm going to try PHPBB forums to see if i can get it working now. originally, we were going to get vbulletin.

     

    EDIT: kk, aftre the web platform finishes installing MySQL and everything,does it start it automtically? in the services, it shows SQL Server started, but there are other ones like SQL Server Agent and Browser are diabled and not running.

     

    PHBB says Can't connect to MySQL server on 'localhost' (10061)

  • Re: PHP5.3 on IIS6 with MySQL

    Nov 13, 2009 06:54 PM|altjx|LINK

    for some reason, SQL Server 08 isn't running on port 3306, any clue why? The service is started

  • Re: PHP5.3 on IIS6 with MySQL

    Sep 17, 2010 06:29 AM|hakerjack|LINK

    Hi, So I just dig out this topic and I found I'm having pretty the same problem that does this guy has. I followed your instruction as above, but I didn't find those 2 files (fcgiext.dll, fcgiext.ini) in the "inetsrv" folder. What is my problem? Thanks

    don.raman

    Hi,

    Please run both the commands below in a command window and paste the result here:

    cscript.exe C:\inetpub\AdminScripts\adsutil.vbs GET w3svc/DefaultDoc

    cscript.exe C:\inetpub\AdminScripts\adsutil.vbs GET w3svc/ScriptMaps | findstr php

    Can you look at directory 'C:\WINDOWS\system32\inetsrv' and ensure that you have:

    • <div>fcgiext.dll</div>
    • <div>fcgiext.ini</div>

    Also open the fcgiext.ini file and see if you have things set properly. A properly set INI file should ideally have:

    [Types]
    php=PHP

    [PHP]
    ExePath=C:\Program Files\PHP\php-cgi.exe
    InstanceMaxRequests=10000
    ActivityTimeout=600
    RequestTimeout=600
    EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000,PHPRC:C:\Program Files\PHP\

    Ensure that C:\Program Files\PHP\php-cgi.exe exists. and there is a valid php.ini file in the same directory.

    Can you run 'C:\Program Files\PHP\php-cgi.exe' <path to your index.php> and see what happens?

    If you are running 64 bit machine, php-cgi.exe will be there in 'C:\Program Files (x86)\PHP' folder.

    Disable IE friendly HTTP error and see if you get any other error in your browser.

    Thanks,

    Don.