Subscribe to my full feed.

Friday, August 03, 2007

Web Server Blunders: Oracle, Apache, and PHP on Windows

I recently had the task of upgrading a production webserver to the latest Apache, PHP and Oracle Instant Client. This webserver was a 6 year old Compaq 3u server running Windows 2000 server. The server was running WebServ 1.13 I believe, which is basically a LAMP install for Windows (would it then be a WAMP?) Apache was version 1.x I believe, PHP - 4.3.x, and I do not know what version MySql was. Oracle client was version 9.0.

So, i began on a late Saturday evening. I uninstalled webserv, i used the installer to remove the Oracle Client, and I began copying files over for the new setup.

Now, I had setup a testbox that was a fresh install of Win2k server. I set it up with Apache 2.2, PHP 5, MySql 5, and the Oracle Instant Client. It worked perfect! (well it did after a bunch of tinkering and downloading extra dlls and placing them all over the place.)

Once I had the webserver all setup, it was time to test it. Load the local website. It loaded...good. Attempt to login to the site (accessing the Oracle Database), error. I could not connect to the DB no matter what I tried.

The strangest part, was that it did not provide me with an error being unable to locate a dll, or use an undefined function... nothing.

So I began troubleshooting. After quite a few hours, I began to strip the machine down again. Then i realized my mistake, there were footprints of both the Oracle Client and Webserv all over the machine. The installers did an awful job of cleaning it all up (no surprise coming off a Windows box). I checked the registry, wiped anything that stated Oracle or webserv. I cleaned out any files left in the file system that had to do with Oracle or Webserv. After a thorough cleaning I tried my setup again.

It worked. I knew I wasn't crazy.

Lesson learned: When dealing with Oracle on a Windows box, wipe it clean, completely clean. Clean out the file system, registry, and services before attempting to install the instant client. And do not use the installer to uninstal the Client.

I will post later on the steps to cleaning out an Oracle Client installation and how to setup Apache, PHP, MySQL and Oracle Client on a Windows box.

Chris

1 comment:

DubLiMan said...

Thank you for the kind words you left on my site. I am pleased to announce that I have added you to my blogroll.