Ubuntu, PHP ori8 problem
558397Dec 28 2007 — edited Jan 3 2008Hi,
I've just done a clean install of Ubuntu (7.10) and have got to the final stages of installing Oracle and PHP. Everything has run smoothly untill I get to the point where I need to install the oci8 file.
When I enter: 'sudo pecl install oci8' I'm prompted for the location of the "instantclient, path/to/instant/client" (which I have downloaded and extracted etc). When I enter 'instantclient, /opt/oracle/instantlcient/instantclient_11_1' and hit enter I'm prompted for the same information again.
So I've tried just about every variation to this that I can think of.
I can get this to install if I just hit enter without entering any text whatsover. However, while OCI details show up in phpinfo, I get a ocilogon failed message indicating that "...There is something wrong with your system..." when I try to connect, so I'm back to the oci8 thing as I think that is the problem.
I'm beginning to wonder if I have downloaded the right drivers from the Oracle web site:
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
I downloaded the basic.zip file and the sdk.zip file!.
The following is the exact sequence of steps I have taken, from scratch (I know, I've got to get a life):
Thanks in advance,
====================================================
Access terminal mode by Windows>Accessories>Terminal
Set up "Root" Password
- sudo passwd
Add references to /etc/environment
- NLS_LANG="AMERICAN"
close file and from command line type the following
- source environment
- echo $NLS_LANG 'output is AMERICAN
Update source list for apt-get
- emacs /etc/apt/sources.list
add the following line at the end of the file:
- deb http://oss.oracle.com/debian unstable main non-free
Download GPG key for the repository and add to apt-get:
-wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -
no errors reported, last line responds with "OK"
Update the list of software available to apt-get
-sudo apt-get update
no errors reports
Install the oracle-xe package
- sudo apt-get install oracle-xe
do you want to continue
- y
This will take some time to download (221 mg) and run
no errors reported,
Execute the Oracle XE configure script as the root user
- sudo /etc/init.d/oracle-xe configure
- Accept default HTTP port (8080)
- Accept default port for DB listener (1521)
- Nominate SYS/SYSTEM password and confirm
- Accept start on boot (y)
no errors reported
goto web browser and navigate to http://127.0.0.1:8080/apex and log in as SYSTEM with the password nominated above
can log in successfully
Performed a system shut down and restart at this point
...back to the command line
Check environment vars
echo $ORACLE_HOME
""
need to set ORACLE_HOME - add references to /etc/environment
- ORACLE_HOME="/usr/lib/oracle/xe/app/oracle/product/10.2.0/server"
close file and from command line type the following
- source environment
- echo $ORACLE_HOME 'output is path above
Install the php5 package from the Ubuntu repositories
- sudo apt-get install php5
do you want to continue
- y
No errors reported
Download Basic and SDK clients from Oracle Website:
select link "Instant Client for Linux x86"
accept agreement
log in
under version 11.1.0.6.0 select "basic.zip" and save to desktop
then downloaded "sdk.zip" to desktop
Under /opt create the following directory structure:
oracle/instantclient
change to this directory e.g. /opt/oracle/instantclient
- sudo unzip /home/peter/Desktop/basic.zip
- sudo unzip /home/peter/Desktop/sdk.zip
??structure now looks like /opt/oracle/instantclient/instantclient_11_1/etc. etc. ?? is this right ??
Create symbolic links to two libraries so they can be more easily found
- sudo ln -s libclntsh.so.10.1 libclntsh.so
- sudo ln -s libocci.so.10.1 libocci.so
check for instance of new shortcuts, they exist
Install the php5-dev and php-pear packages
- sudo apt-get install php5-dev
are you sure ?
- y
no errors reported
- sudo apt-get install php-pear
no errors reported
Build and install PHP files
- sudo pecl install oci8
- enter "instantclient,/opt/oracle/instantclient" and a thousand other variations but system keeps prompting for location of this directory
====================================================