Code Examples
  Home arrow Code Examples arrow Run PHP4b4 on IIS5
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
CODE EXAMPLES

Run PHP4b4 on IIS5
By: Patrick Quinn-Graham
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating:  stars stars stars stars stars / 0
    2001-04-05

    Table of Contents:

    Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Discussion on installing PHP on Win2k.[bold]Question:[/bold]Personally, I don't know what Edwin is talking about tags for.My little example: Cold Fusion:


    <CFIF variable1=variable2>
    <!--- Do 
    something --->
    <
    CFELSE>
    <!--- DO 
    something if it isnt a match --->
    </
    CFIF>

    Now, in PHP it would be


    <?
    if (
    $variable1==$variable2)

    // Do something
    } else

    // Do something if it isnt a match!
    }



    In ASP:


    <%
    IF (
    variable1 variable2then
    ' Do something
    Else
    Do something if it isnt a match
    End 
    If
    %>

    Now tell me that PHP is a tag based system!And its hard to add a "tag"? In CF each tag is a seperate "template".In PHP:


    <?
    function 
    newTag($NewTagVariable1) {
    // do whatever with $NewTagVariable1.
    // Anything you like.
    }


    In ASP:


    <%
    Sub newtag(NewTagVariable1)
    ' Do whatever with NewTagVariable1.
    Anything you like.
    End Sub
    %>

    PHP4 b4 comes with instruction in the readme file for setting up under PWS: You add it as a filter, and as a script engine.Here's what I did, In short:Copy PHP4TS.dll to %SystemRoot%\System32On a fresh install of Win2k the other required dll, msvcrt.dll is allreadythereand is newer so I wouldn't risk overwriting it :).Copy PHP.INI-DIST to %SystemRoot%\PHP.INI--> It should work straight out of the box, if you follow the guidelinesbelow.In Internet Services Manager,Expand the server you want, then right click on the WWW site you want PHP towork on: you can do this for more than one site of course.>From the right click menu, choose Properties.In the window that comes up, choose the ISAPI Filters tab, click Add...In the little dialog, tell it the path to PHP4ISAPI.DLL, which will bewherever you unpacked PHP to. (this ONLY applys to version 4.0 and above.There is no ISAPI mode of v3 as far as I know).Give it the name of PHP.Once you've done that, and clicked OK, change to the tab "Home Directory",Look around the "Application Settings" label. Around that area you will seea button labeled "Configuration". Click it!In the window that pops up, click add. In the executable field, tell itwhere the PHP4ISAPI.dll file is. (if you have v3, and not v4, point it tophp.exe at this stage).Tell it what extension to use. PHP or PHTML are common. (You do NOT need the. before the extension).Verbs: All Verbs.Script Engine: Yes.Check that file exsists: Up to you, I guess. Will either let IIS generatethe 404, or PHP give users a "No Input File Specified".... I urge you chooseyes :)Click ok. You will need to repeat this step for each file extension you wantPHP to work with!You then need to completely stop IIS. You can do this by "net stop iissvc"from the command prompt (under win2k I get this by running cmd.exe).>From the command prompt type "net start w3svc".Now return to Internet Services Manager, and start each of the servicesagain.Now make a page like page.php in the root of your site (of course replacethe .php with an extension that setup to work with PHP!), and just putsomething simple likeIn the file. This also tells you what you are telling every site you visit:).This is a bit more wordy than the PHP readme, but hey it worked onIIS5/WIN2k, and IIS4/WinNT4Server.[bold]PHP AND IIS(Internet Information Server).[/bold][bold]We posted an article on PHP and IIS: Received some good emails on this so this was too good of information not to share with our users. Here is the article that showed on 1/5/2000PHP Beta 4.0 is out[/bold]PHP is available for free from:http://www.php.net/downloads/ Currently the ver.4 beta is out and i've downloaded it.PHP is just like ASP-the server side language(?) with a lot of tags.Though it is occasionally creating errors while using in win NT,it is being tuned to avoid them.An SQL Server called MySQL also acts as a parallel thing ,available at http://www.mysql.com/downloads. After answering a few questions,you can get a trial version for it.[bold]Running PHP under IIS link[/bold]Received a post in the Forum asking this question. Not knowing PHP too well, went searching and didn't find anything. The old faithful hotbot.com pointed me to the link below! Thought we'd share it with our fellow developers!. Came up with a link to check out. Anyone that has or know of anyone that has run PHP under IIS let us know. webmaster@aspfree.com. Glad to share this information further! [italic][bold]The disclaimer I've never tried PHP under IIS but it these links show what to do! We take no responsiblity though if something breaks! :))[/bold][/italic]Here is the link to check out! Installing PHP on Windows95/NThttp://udb.feld.cvut.cz/docs/php3.old/installation02.htmlHere are the emails and responses. If you have one let us know. soundoffbbs@aspfree.comReceived an Email 1/11/2000Hi there,I am currently running PHP on Windows NT with IIS 4 installed. We use it on our Intranet server. I am also running MySQL database with IIS without any problems so far.The following is an extract of the readme.txt file, which gives the correct procedure (located in the php directory). I followed the procedure, configured IIS the same way as you would for ASP and have been playing around without any hassle!Basically you need to put your ini file (which you have to rename yourself into the correct directory for Win 95/98 or NT:(typicaly c:\windows or c:\winnt) <> rename the file php_iis_reg.inf for thisAfter that you need only to configure IIS.registry entries for PWS & IIS:HKEY_LOCAL_MACHINE:System\CurrentControlSet\Services\W3Svc\Parameters\Scri pt Map.php3 "c:\php3\php.exe %s %s"******************************************************************* If you have used the setup program, and have IIS or PWS, you are almostready to go. You must first decide which directories in your web serverwill contain php scripts, and make those directories executable. You will need to manualy edit configurations for other web servers. Otherwise, you can follow the instructions below for installation. ----------------------------------------------------------------------An INF file (php_iis_reg.inf) has been included that will automaticaly add registry settings forIIS 3 and PWS.registry entries for PWS & IIS:HKEY_LOCAL_MACHINE:System\CurrentControlSet\Services\W3Svc\Parameters\Scri pt Map.php3 "c:\php3\php.exe %s %s"As more server specific information is gathered, more registry entries maybe added.NOTE: I have not been able to get php to work correctly with PWS 4 ----------------------------------------------------------------------INSTALLATIONMake a directory, such as c:\php3, and place all the rest of the dlls there.If you are not using Apache NT server, you can set an environmentvariable in your autoexec.bat file, add this line:SET PHPRC=\windows\php3.iniand place your php3.ini file in whatever directory you specify.Otherwise, be sure to place php3.ini in your os directory(typicaly c:\windows or c:\winnt).msql1.dll, calendar.dll and msql2.dll must be located in thesame directory as php3.exe, or you must specify where these filesare located either in your php3.ini file, or in the php3 script.Notes on IIS4 --------------------Start Internet Service ManagerRight click on the website you are installing php inSelect propertiesClick on the TAB "Home Directory"Select 'Script' under permisionsClick on button 'Configuration'Click on button 'Add'Executable should be c:\php3\php.exe %s %s (Yes, TWO %s's acording to M$ docs)Extension .php (or whatever you use)Check 'Script Engine'Click on OKClick on OK again.Stop then Start the web server.PHP should now work. If it doesn't verify the 'everyone' has full access to thedirectory c:\php3 and everything within it.Try running a simple script such as *********************************************************************Hope this was what you were looking for.Kind regards,MariMari.Bester@ixchange.com Received from EmailPHP is more like ColdFusion where you have a lot of TAGS (Server Side)instead of using components.There is no clear advantage of using PHP over ASP. In the future, when PHPgains more ground on NT this may be different (in term of cross-platformdevelopment).PHP is very popular in APACHE environments. While it does run under otherWebservers, it is cleary made to fit with this Webserver. You have even tagsspecially for APACHE.At this moment PHP includes support for ODBC databases, MSQL (I believe theydon't mean the Microsoft SQL), MYSQL (open source database popular underUNIX), PDF, XML, LDAP, IMAP, SMTP and file objects. In total some 300 tags(a lot of the tags go into the PDF support). Creating your own tags (e.g.fileupload, authentication, encryption etc) is hard to do.PHP lacks the full range of development tools you have for ASP.If this is the right moment to start a message board on PHP I don't know. Ithink, if you start one, you benefit more the Linux/UNIX developers usingAPACHE and PHP than NT developers. Don't think there is much deployment ofPHP under NT at this moment.
    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Code Examples Articles
    More By Patrick Quinn-Graham

     

    IBM® developerWorks developerWorks - FREE Tools!


    NEW! Achieving True Agility -- How process can change the behavior of your tools

    Achieving true agility is a never-ending effort. We will showcase how you can become agile incrementally, a few practices at the time.Which practices should any agile team strive to adopt? What additional practices should you consider based on your needs to scale? Adopting practices are however made much easier with the right tool support. What about if your tools adapt to your practices? We will take a look at how the Jazz technology can be leveraged to make your process change the behavior of your tools.
    FREE! Go There Now!


    NEW! Best Practices in Integrated Requirements Management

    Poor Requirements Management capabilities in an Enterprise have been linked to excessive project failures, escalating IT costs, and failure to deliver competitive advantage into the marketplace. Join Brianna M Smith from IBM Rational and learn about how successful organizations align IT and Business stakeholders through collaborative processes and tools for effective requirements management, and how an integrated approach across the IT lifecycle can provide unparalleled visibility and traceability to ensure that project teams are delivering on the business vision by "doing the right things" and "doing things right."
    FREE! Go There Now!


    NEW! Cook up Web sites fast with CakePHP, Part 4: Use CakePHP&apos;s Session and Request Handler components

    CakePHP is a stable production-ready, rapid-development aid for building Web sites in PHP. This "Cook up Web sites fast with CakePHP" series shows you how to build an online product catalog using CakePHP.
    FREE! Go There Now!


    NEW! Discovering the value of WebSphere Process Server

    WebSphere Process Server delivers a unique integration framework that simplifies existing IT resources. Often, as IT assets grow to support business demand, so too does their complexity and manageability. In this webcast, we’ll discuss how WebSphere Process Server helps deliver an SOA infrastructure that provides a common model to orchestrate, mediate, connect, map, and execute the underlying IT functions. Discover how WebSphere Process Server simplifies integration of business processes by leveraging existing IT assets as reusable services without the complexities of traditional integration methodologies.
    FREE! Go There Now!


    NEW! Rational Asset Manager eKit

    Learn how to do more with your reusable assets with the free Rational Asset Manager eKit. The eKit includes demos on how Rational Asset Manager tracks and audits your assets in order to utilize them for reuse. Plus you’ll find white papers and a Webcast that discuss the challenges of a Service Oriented Architecture and how Rational Asset Manager can provide quick and effective solutions.
    FREE! Go There Now!


    NEW! Rational Talks to You: Manage RUP-based CMMI initiatives

    Join this Rational Talks to You teleconference on December 4 at 1:00 pm ET to discuss how Rational Method Composer can help meet your compliance objectives. Get your questions answered!
    FREE! Go There Now!


    NEW! Test terminal-based applications with Rational Functional Tester

    Regression testing -- in which code is thoroughly tested to ensure that changes have not produced unexpected results -- is an important part of any development process. But many testing environments neglect the terminal-based applications that still form the backbone of many industries. In this tutorial, you'll learn how the Rational Functional Tester Extension for Terminal-Based Applications works with other Rational Functional Tester to help test terminal-based applications quickly and easily.
    FREE! Go There Now!


    NEW! Trial download: IBM Lotus Forms V3.0

    Get a free trial download of IBM Lotus Forms V3.0 (formerly Workplace Forms), which provides a zero-footprint eForms solution to help you automate and move forms-based business processes off the desktop and onto the Web. With Lotus Forms, you can extend applications beyond the firewall by creating a single electronic form document ready for use in both thick and Web 2.0 thin client format.
    FREE! Go There Now!


    NEW! Try IBM Rational Asset Manager V7.0 online!

    You can now evaluate IBM Rational Asset Manager V7.0 online without installing or configuring it on your own system! Rational Asset Manager helps create, modify, govern, find, and reuse any type of development assets, including SOA and systems development assets. Rational Asset Manager helps you reduce software development costs and improve quality by facilitating the reuse of all types of software development-related assets. Visit developerWorks to learn more about this product and register to explore its capabilities online.
    FREE! Go There Now!


    NEW! Using Rational Business Developer to enhance your developer productivity

    Join this Rational Talks to You teleconference, to hear how Enterprise Generation Language (EGL) eliminates the need for tedious and error-prone low level coding, so developers can focus on business requirements. EGL extends the Rational software development platform with a simplified programming language that enables developers who have little or no experience with Java, Web technologies or Service Oriented Architecture, to create enterprise-class applications and services quickly and easily. It also allows developers who may have little or no mainframe programming experience to quickly create traditional mainframe components.
    FREE! Go There Now!



    All FREE IBM® developerWorks Tools!

    CODE EXAMPLES ARTICLES

    - Bipartite Graphs
    - Connectivity in Graphs
    - The Ford-Fulkerson Algorithm
    - Critical Paths
    - The Bellman-Ford and Roy-Floyd Algorithms
    - Shortest Path Algorithms in Graphs
    - Minimum Spanning Tree
    - Articulation Edges and Vertexes
    - Circles and Connectivity in Graphs
    - Depth-First Search in Graphs
    - Breadth-First Search in Graphs
    - The Prufer Code and the Floyd-Warshall Algor...
    - An Insight into Graphs
    - Coding a Custom Object with WSC
    - Creating a Custom Object with WSC





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek