Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

   
 

ss

Oracle Tips by Burleson 

Installing PHP5 on Windows

The installation of PHP5 on windows is a manual process and is a little bit simpler than one on Linux. It has four basic phases:

  • Create the target directory, D:\PHP.

  • Unpack the distribution into the target directory.

  • Fix the parameter files of both Apache and PHP.

  • Configure add-ons like Oracle OCI8 module and PEAR.

The first two steps are trivial and can be accomplished by using the Internet Explorer and WinZip or equivalent utilities. Here is what the d:\PHP directory should look like after unpacking the distribution from the PHP web site (http://www.php.net).

The next phase to complete is adjusting the Apache configuration files and making sure that the Apache server is aware of the PHP installation. The Apache configuration file is called httpd.conf and resides under the Apache2 directory. 

The Apache web server must be restarted for the changes to take effect. The changes to the httpd.conf are almost identical to the changes done in Linux; the user needs to load the PHP5 module and tell the server what to do with the files with the extension .PHP.  In addition, the web server needs to know that in the PHP directory all backslashes (“\”) are to be converted into forward slashes. These modifications are marked with gray color:

Add a test directory by adding the following into the httpd.conf:

Now, restart the web server. There are several ways to do this. The simplest way is to restart it as a service, from the standard control panel menu. To do so, invoke the Settings->Control Panel->Administrative Tools->Services menu. If everything is done correctly, the resulting menu should look like this:

Services are ordered alphabetically, and Apache2 should be among the first few. Right-clicking on the Apache2 service will bring up another menu with “Restart” as one of the options.  Choosing this option will restart Apache2.  Now, the “first.php” file containing the call to the phpinfo() function can be created and placed in the d:\testweb. The file looks like this:

<?php
   phpinfo
();
?>

If everything is correct and http://localhost/work/first.php  is entered as the URL into Internet Explorer, a picture like the one below should appear:

This process is almost complete. Yet, the OCI8 module is missing. If the user scrolls down the first PHP page, OCI8 will not be there. In order to make it available to the PHP,  d:\PHP\php.ini needs created and edited. As with the Linux installation, it is copied from the php.ini-dist file. The commands are entered from the DOS window:

C:\>d:
D:\>cd PHP
D:\PHP>copy php.ini-dist php.ini
        1 file(s) copied.
D:\PHP>

Now, php.ini can be edited by the notepad or a favorite text editor. Locate the following line and remove the starting semicolon:

;extension=php_oci8.dll

The resulting line should read:

extension=php_oci8.dll

When this is done, locate the line that tells PHP where to look for extensions and modify it to contain the full path of the directory with the PHP-extensions. In the case of this installation, the line in question should look like the following:

extension_dir = "D:\PHP\ext”

Do not replace the backslash characters with the forward slashes in php.ini, as was done in httpd.conf. To complete the PHP5 installation with the OCI8 module, restart the Apache web server. If it is successful, the user should try executing their first PHP script once again. The next picture shows the desired result:

All that is left to complete the installation is to install PEAR and ADOdb. 


See code depot for complete scripts


The above book excerpt is from:

Easy Oracle PHP

Create Dynamic Web Pages with Oracle Data

ISBN 0-9761573-0-6   

Mladen Gogala

http://www.rampant-books.com/book_2005_2_php_oracle.htm

 

Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

 Copyright © 1996 -2016 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks
 

Hit Counter