Installing PHP


  1. You need to download PHP. Go to www.php.net, click on downloads, and then choose the zipped binaries (version tested was php-4.3.0-Win32.zip). Note: this is not the “installer.”

  2. Go to the directory named Inetpub\wwwroot and create a subfolder named php. Create another folder named phpstuff. Invoke WinZip and extract the files to the php folder.

  3. Copy the file named php.ini-dist into Windows and rename it php.ini. To use the short style for form input as is done in the examples in this text, you need to make a change to the php.ini file. Open the file in Notepad, search for registers_global, and change the line to registers_global = on. Be sure to remove any semicolon in front of the line. A semicolon marks the line as a comment. You also might want to change the designation for the include_path. This path indicates two possible places where “include/require” files go. One of the default options is the same folder as the calling file, which would work for all the examples in the text. Keep in mind that if you change the ini file, you need to shut down and restart the computer for the changes to take effect.

  4. Copy the file named php4ts.dll into the Windows/system32 folder.

  5. Click on Start and then Control Panel (Classic view). Click on Administrative Tools and then Internet Information Services. Click on the plus sign next to your computer (local computer), and then click on the plus sign next to Web Sites. Left-click, and then click on Properties. You will see a panel with several tabs. You will be using three of these tabs. Click on the tab labeled ISAPI Filters. Click Add. Enter php as the Filter name and then use the Browse feature to enter Inetpub\wwwroot\php\php4isapi.dll as the Executable. Click OK.

  6. (Still under Properties for the Default Web site): Click on the Home Directory tab. Click on Configuration. Click Add. Under Application Mappings, click Browse to find Inetpub\wwwroot\php\sapi\php4isapi.dll. You might need to change the type of file being searched from exe to dll. Enter .php as the Extension (be sure to include the dot). Click to select All Verbs, Script Engine and Check that File Exists.

  7. (Still under Properties for the Default Web site): Click on the Documents tab. Add the default document “index.php.”

  8. Shut down and restart your computer.

  9. Open Notepad and create the following to test your installation:

        <html><head><title>PHP info </title> </head>     <body>     <?php phpinfo();?>     </body>     </html>
  10. Save it as phpinfo.php (change type of file to All files from Text) in the phpstuff folder. Invoke a browser, type in the address http://localhost/phpstuff/phpinfo.php.

  11. You should see several screens of information on your PHP installation.




Creating Database Web Applications with PHP and ASP
Creating Database Web Applications with PHP and ASP (Charles River Media Internet & Web Design)
ISBN: 1584502649
EAN: 2147483647
Year: 2005
Pages: 125
Authors: Jeanine Meyer

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net