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 = variable2) then ' 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 like echo($HTTP_USER_AGENT); ?>In 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 phpinfo(); ?>*********************************************************************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 developerWorks - FREE Tools! | This demonstration gives you an overview of IBM® Rational® Build Forge Express Edition, a global offering that provides a framework to automate and execute software processes. Rational Build Forge provides a software assembly line that can support all of your tools, technologies, and platforms so you can achieve a repeatable, reliable, and traceable build and release process. FREE! Go There Now!
| | | | David Barnes, Lead Evangelist for IBM Emerging Internet Technologies will discuss aspects of Web 2.0 that bring value to corporations, academia, and government. He'll also discuss IBM's vision around Web 2.0, including the importance of remixability and consumability. The discussion will culminate with examples of various IBM Software Group solutions you can use to get ahead of the Web 2.0 adoption curve. FREE! Go There Now!
| | | | Effective governance for lean development isn’t about command and control. Instead, the focus is on enabling the right behaviors and practices through collaborative and supportive techniques. Hear from Scott Ambler on how it is far more effective to motivate people to do the right thing than it is to force them to do so. Learn how to form a lightweight, collaboration-based framework that reflects the realities of modern IT organizations. FREE! Go There Now!
| | | | 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!
| | | | Visit IBM developerWorks to download the latest trial version of IBM Data Studio V1.1 at no cost. IBM Data Studio is a comprehensive data management solution that helps you effectively design, develop, deploy and manage your data, databases, and database applications throughout the data management life cycle utilizing a consistent and integrated user interface. Unlike other client-side data management solutions that focus on only one aspect of the application lifecycle or database administration, Data Studio complements the Rational Software Delivery platform, providing unparalleled flexibility for a heterogeneous data server environment across platforms. FREE! Go There Now!
| | | | Discover how IBM Rational AppScan Standard Edition can help you detext vulnerabilities in your web applications in the Web Application Security eKit. IBM Rational AppScan is a leading suite of automated web application security solutions that scan and test for common Web application vulnerabilities. The new Web Application Security eKit provides you with valuable resources, including white papers, demos, and additional information on the benefits of testing your Web applications. FREE! Go There Now!
| | | | This Fall, IBM Rational talks to you directly through a special teleconference series giving you access to the best minds in IBM Rational - product experts and market thought leaders who will answer your questions during these pre-scheduled telephone conference calls. Register today! FREE! Go There Now!
| | | | Rational Modeling Extension for Microsoft .NET enhances usability for code generation supporting a more intelligent refactoring. The latest enhancements enable organizations with Java and .NET systems and software development maintain architectural integrity across heterogeneous platforms. FREE! Go There Now!
| | | | Discover how Rational tools and best practices for testing can make your job easier. The new Rational Testing eKits provide you with valuable resources – including demos, webcasts, tutorials, and articles – that help you address your specific testing needs across the software lifecycle. Five new eKits are available covering the topics of Requirements and Test Management, Functional Testing, Performance Testing, Code Quality and Embedded Systems, and SOA and Web Services Testing. FREE! Go There Now!
| | | | Whether you are creating new applications or modifying existing ones, managing integration of new components with traditional z/OS elements is a critical part of building and deploying modern applications. Listen to this webcast to see how IBM can help you optimize your development process using an IDE like Rational Developer for System z that integrates with management tools, such as ClearCase to manage your application development on mainframes. FREE! Go There Now!
| | | | All FREE IBM® developerWorks Tools! | |