Activate Oracle on XAMPP for Windows : OCI8

If you want to connect with Oracle database using PHP script you will have to do some effort. Because with the default installation of XAMPP for Windows, we don’t get PHP Oracle connectivity enabled. This can be enabled easily when you need to connect to a Oracle Database from your PHP application/script. PHP has got the OCI8 extension, which provides Oracle connectivity to PHP application, and OCI8 uses Oracle Instant Client Package to get Oracle specific functions.

I had the need to connect to a Oracle Database from a PHP script in one of my recent projects, the following is what I did to enable Oracle connectivity in XAMPP for Windows.

1. In your XAMPP Start Page, go to phpinfo, look for string oci8. If string found it indicate that connection to oracle is available, otherwise to activate connection do the following steps:
2. Open the currently used php.ini file by looking at the phpinfo, from the XAMPP folder.
3. Find string ;extension=php_oci8.dll. Remove the semicolon (;) ahead of the string to activate the oracle extension.
4. Save the php.ini file.
5. Download the “Instant Client Package – Basic” for Windows from the OTN Instant Client page. Unzip it to c:\instantclient_11_1
6. Edit the PATH environment setting and add c:\instantclient_11_1 before any other Oracle directories. For example, on Windows XP, follow Start -> Control Panel -> System -> Advanced -> Environment Variables and edit PATH in the System variables list.
7. Set desired Oracle globalization language environment variables such as NLS_LANG. If nothing is set, a default local environment will be assumed. See An Overview on Globalizing Oracle PHP Applications for more details.
8. Unset Oracle variables such as ORACLE_HOME and ORACLE_SID, which are unnecessary with Instant Client (if they are set previously).
9. Restart XAMPP (or Start if its not already started).
10. To make sure that connection to oracle database has successfully activated, go to phpinfo. Find string: oci8. If found, then XAMPP can now communicate with Oracle Database.

The steps to do the same on Linux are almost similar, except there you will use the Linux versions of the packages and setting PATH variables would be different.

To test the connection you can use this script

$conn = oci_connect('username', 'password', 'host:port/servicename');
$query = 'select table_name from user_tables';
$stid = oci_parse($conn, $query);
oci_execute($stid, OCI_DEFAULT);
while ($row = oci_fetch_array($stid, OCI_ASSOC)) {
foreach ($row as $item) {
echo $item." | ";
echo "


Flex Air Application install/update Error

Hi Friends,

I am releasing an another version of my AIR application so I thought I can use updater class provided by AIR. I have developed the new version but when I try to install the new version, It prompts me a error

“This application cannot be installed because this installer has been mis-configured. Please contact the application author for assistance.”

Now what to do? It had been a couple weeks since I had done a build, during which time I had cleaned off my desktop including the certificate I had made for previous installs. When I ran through the installer this time I had just created a new one thinking nothing of it. Then I come to know that certificate is only the issue.

I suppose it makes sense in the end, that is the whole purpose of the certificate, it disables somebody else from hijacking your application. So rule of thumb, don’t switch the Certificates!

I thought I’d share the problem with everyone in case you are having the same issue. Just to inform you that never delete the certificate using which you are building your AIR application.