note 109871 added to oci8.installation

From: Date: Wed, 29 Aug 2012 21:48:10 +0000
Subject: note 109871 added to oci8.installation
Groups: php.notes 
Request: Send a blank email to php-notes+get-190263@lists.php.net to get a copy of this message
Windows Server 2008 Standard Edition Service Pack 2 i586 PHP Version 5.4.4 XAMPP 1.8.0 This is what finally got it working for me: Downloading win32_11gR2_client.zip from the Oracle website. It was really hard to find, but I got there by choosing Downloads > Oracle Database 11g Release 2 then clicked the "See All" link on the far right of the Microsoft Windows (32-bit) download links under (11.2.0.1.0) On this page the second option down is a link to download just the client libraries. I unzipped it, and ran setup.exe I chose Runtime, I couldn't get InstantClient to work. I used the defaults for Oracle Base and Oracle Home, make sure to write these down you need them. Oracle Base: "D:/app/Administrator" Oracle Home: "D:/app/Administrator/product/11.2.0/client_1" I chose just English as the language. Next'd through the rest of the installer... The nice thing about this full install is that it sets the Windows Path variable for you, and it has the required library files. In my php.ini file located in /xampp/php/php.ini Remove the semicolon from the front of the line: extension=php_oci8_11g.dll In my apache httpd.conf file in /xampp/apache/conf/httpd.conf Add the following SetEnv lines to the end of the <Directory "C:/xampp/htdocs"> This is where you use the oracle base and home paths you wrote down earlier while installing the oracle client ;) This is what mine looks like without all the comments. <Directory "C:/xampp/htdocs"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all SetEnv ORACLE_BASE "D:/app/Administrator" SetEnv ORACLE_HOME "D:/app/Administrator/product/11.2.0/client_1" SetEnv ORACLE_SID "" SetEnv NLS_LANG "AMERICAN_AMERICA.WE8MSWIN1252" </Directory> I then created a php file and attempted a connection like this: $db = "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = TCSDB07)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = IPROD)))"; $conn = oci_connect('username', 'password', $db); if(!$conn){ $e = oci_error(); trigger_error(htmlentities($e['message'], ENT_QUTOES), E_USER_ERROR); } ---- Server IP: 69.147.83.197 Probable Submitter: 96.50.224.254 ---- Manual Page -- http://www.php.net/manual/en/oci8.installation.php Edit -- https://master.php.net/note/edit/109871 Del: integrated -- https://master.php.net/note/delete/109871/integrated Del: useless -- https://master.php.net/note/delete/109871/useless Del: bad code -- https://master.php.net/note/delete/109871/bad+code Del: spam -- https://master.php.net/note/delete/109871/spam Del: non-english -- https://master.php.net/note/delete/109871/non-english Del: in docs -- https://master.php.net/note/delete/109871/in+docs Del: other reasons-- https://master.php.net/note/delete/109871 Reject -- https://master.php.net/note/reject/109871 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#190263) next »