locked
PHP5.3 on IIS6 with MySQL RRS feed

  • Question

  • User-1665358950 posted

    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 =\

    Wednesday, November 11, 2009 11:10 AM

All replies

  • User-1405480850 posted

    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.

    Wednesday, November 11, 2009 12:23 PM
  • User-1665358950 posted

    Thanks. going to try first thing in the morning.

    Wednesday, November 11, 2009 4:02 PM
  • User-1665358950 posted

    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.

    Wednesday, November 11, 2009 4:02 PM
  • User-1665358950 posted

    Hello??? Anyone? This sucks :(

    Thursday, November 12, 2009 10:55 AM
  • User-1653247517 posted

    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.

    Thursday, November 12, 2009 11:08 AM
  • User-1665358950 posted

     

    Thanks, gonna give it a shot now :)
    Thursday, November 12, 2009 11:16 AM
  • User-1665358950 posted
    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
    Thursday, November 12, 2009 12:28 PM
  • User-1665358950 posted

    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

    Thursday, November 12, 2009 12:46 PM
  • User-1405480850 posted

    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:

    • fcgiext.dll
    • fcgiext.ini

    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.

    Thursday, November 12, 2009 1:05 PM
  • User-1665358950 posted

    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

    Thursday, November 12, 2009 1:36 PM
  • User-1405480850 posted

    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.

    Thursday, November 12, 2009 2:38 PM
  • User-1665358950 posted

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

    Thursday, November 12, 2009 2:45 PM
  • User-1405480850 posted

    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.

    Thursday, November 12, 2009 4:26 PM
  • User-1665358950 posted

    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?

    Friday, November 13, 2009 11:01 AM
  • User-1405480850 posted

    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.

    Friday, November 13, 2009 12:36 PM
  • User-1665358950 posted

    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?

    Friday, November 13, 2009 12:43 PM
  • User-1405480850 posted

    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.

    Friday, November 13, 2009 12:49 PM
  • User-1665358950 posted

    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

    Friday, November 13, 2009 12:52 PM
  • User-1665358950 posted

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

    Friday, November 13, 2009 1:16 PM
  • User-1405480850 posted

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

    Thanks,

    Don.

    Friday, November 13, 2009 1:59 PM
  • User-1665358950 posted

     

    Oh okay, thanks.
    Friday, November 13, 2009 2:05 PM
  • User-1665358950 posted

    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?

    Friday, November 13, 2009 3:56 PM
  • User-1405480850 posted

    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.

    Friday, November 13, 2009 5:14 PM
  • User-1665358950 posted

    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)

    Friday, November 13, 2009 5:20 PM
  • User-1665358950 posted

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

    Friday, November 13, 2009 6:54 PM
  • User-1713670993 posted
    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

    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:

    • fcgiext.dll
    • fcgiext.ini

    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.

    Friday, September 17, 2010 6:29 AM