Thursday, 13 November 2008

PHP and Oracle Setting up the Environment

Operating system
I've gone with windows rather than linux for my development environment ( mainly because i can't get dual monitors to work on ubuntu at the moment ) but everything I discuss in this blog should be easily transferable to Linux and i'll create a parallel post for more linux specific stuff where it requires it.

Database Distro
I've decided to go with oracle XE for this, for a couple of reasons
  • It costs nothing
  • It has a smallish footprint
  • Its easy to install
  • It has a nice gui interface
So download and install oracleXE
http://www.oracle.com/technology/products/database/xe/index.html


Application Server
I've also chosen xampp as my application server
  • Its free
  • Its easy to install
  • It appears to have everything I need it to have
  • This may change later, but i means i can get up and running quickly
So download and install xampp
http://www.apachefriends.org/en/xampp.html

Install a browser - you're viewing this so i guess you've got one already, If you've not, then firefox would be a good start.

Once you've installed oracle XE you may need to add the following entry to the PATH system environment variable

C:\oraclexe\app\oracle\product\10.2.0\server\BIN



Before you can start using Php to connect to oracle, you'll need to edit php.ini ( its not the file you think it will be )
Edit c:\xampp\apache\bin\php.ini
not c:\xampp\php
and remove the semi colon before these two lines.

extension=php_oracle.dll
extension=php_oci8.dll


Once you've changed these restart xampp by double clicking on this executable.

C:\xampp\xampp_restart.exe

Then visit
http://localhost/xampp/
and
http://127.0.0.1:8080/apex/


You should see the xampp and oracle start pages.


You should be good to go, Watch out for the next post when I'll have a sample application ( hopefully) connecting to the default HR oracle XE schema.

Starting out with PHP and Oracle

I'm an oracle developer , have been for years. Today I stared to learn PHP too, this blog will cover the ups and downs pitfalls and gotchas of developing a website in PHP with Oracle as a back end.

I won't cover much Oracle technical stuff, at least to begin with, there are some excellent resources available online already, asktom.oracle.com being top of that tree.

There are probably loads of useful PHP resources too and i'll link to them as i find them.

In the mean time the next thing to do is design this blog and to set up my Oracle and PHP programming environment, watch out for the next post where i'll discuss what tools i've chosen to begin my quest for PHP enlightenment.