 <p>I already figured it out! Here's my solution:</p> <ol> <li>Install Oracle XE in your PC this will give you the latest oci.dll (not php_oci8.dll)</li> <li>Create a link between your user and the user you will need in connecting to your database.</li> <li>Restart your PC then try running your code if it's not working copy the oci.dll of your Oracle XE (C:\Oracle\OUIHome\bin\oci.dll) then paste it in 9i replacing the old one (make sure to have a backup). then restart your PC.</li> </ol> <p>Works fine on me. Thanks for those who help me in solving this one.</p>