Re: what the php guys need to do
| From: | Christopher Jones | Date: | Tue, 18 Nov 2008 21:36:37 +0000 |
| Subject: | Re: what the php guys need to do | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45650@lists.php.net to get a copy of this message | ||
I'm CCing the php-db list.
Fred Silsbee wrote:
install Zend?...never! I have Fedora 9 and 11g1 Enterprise I have Apache working and Oracle 11g1 installed and working! Zend installs both of these and could screw up my working system.Zend Core for Oracle will use your existing Apache. It installs Instant Client 10gR2 in its own subdirectory and that should not affect any DB.
Here is what I get from a browser for phpinfo.php:
oci8 OCI8 Support enabledGreat, you have PHP OCI8 installed correctly. I assume your 11g DB is running fine too. Now use SQL*Plus to connect to your database (from the machine where Apache/PHP is installed) and record: (i) the various Oracle-related environment variables set (ii) the connection string used Then, set those environment variables before starting Apache. Run a script <?php phpinfo(); ?> and check in the "Environment" section that they are all there. In your PHP oci_connect() command, use the same connection details as you did in SQL*Plus. For example if you connect as:
sqlplus hr/hrpwdthen use
$c = oci_connect("hr", "hrpwd");
Or if you connect like:
sqlplus hr/hrpwd@LMKIIIGDNSIDthen use
$c = oci_connect("hr", "hrpwd", "LMKIIIGDNSID");
Chris
--
Email: christopher.jones@oracle.com Tel: +1 650 506 8630
Twitter: http://twitter.com/ghrd Free PHP Book: http://tinyurl.com/f8jad