<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>acloudtree &#187; PHP PHP5 Ubuntu oci8 oracle 10g 9 8 7.10</title>
	<atom:link href="http://www.acloudtree.com/tag/php-php5-ubuntu-oci8-oracle-10g-9-8-710/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.acloudtree.com</link>
	<description>Programming, Computers, Writing, Economics, and Life</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:03:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ubuntu 7.10 + oci8 + PHP5</title>
		<link>http://www.acloudtree.com/ubuntu-710-oci8-php5/</link>
		<comments>http://www.acloudtree.com/ubuntu-710-oci8-php5/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 17:16:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[PHP PHP5 Ubuntu oci8 oracle 10g 9 8 7.10]]></category>

		<guid isPermaLink="false">http://www.acloudtree.com/?p=17</guid>
		<description><![CDATA[A while ago I posted on the ubuntu forums a tutorial that I had written. This tutorial covers how to compile oci8 lib with php5 on Ubuntu 7.10. I figured I would post it on the site and get some feed back. For this edition it is assumed that you are issuing these commands from [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I posted on the ubuntu forums a tutorial that I had written. This tutorial covers how to compile oci8 lib with php5 on Ubuntu 7.10. I figured I would post it on the site and get some feed back.  For this edition it is assumed that you are issuing these commands from the command line.</p>
<p>Login to a Terminal and issue a sudo -i<code><br />
# sudo -i</code></p>
<p>Install Apache2<code><br />
# apt-get install apache2<br />
</code></p>
<p>Install required PHP5 modules and libraries<code><br />
# apt-get install php5-common php5 php5-dev libapache2-mod-php5 php5-cli<br />
</code></p>
<p>Install the build-essential and php-pear packages<code><br />
# apt-get install build-essential php-pear<br />
</code></p>
<p>IMPORTANT! Install libaio1 library. This is what I was having serious issues with originally.<code><br />
# apt-get install libaio1<br />
</code></p>
<p>Download the new Instantclient and SDK zip files from Oracle.<a href="http://www.oracle.com/technology/tech/oci/instantclient/index.html"></a></p>
<p><a href="http://www.oracle.com/technology/tech/oci/instantclient/index.html"><strong>link</strong></a></p>
<p>In my case the files are called Basic.zip and Sdk.zip Initially these files will be saved in my home directory under the Documents folder<code><br />
/home/ubuntu/Documents/</code></p>
<p>create a directory to house the zip files once they are uncompressed<code><br />
# mkdir /opt/oracle</code></p>
<p>move the .zip files in the “Documents” directory to the /opt/oracle directory<code><br />
# mv /home/ubuntu/Documents/*.zip /opt/oracle<br />
</code></p>
<p>Change to the /opt/oracle directory<code><br />
# cd /opt/oracle</code></p>
<p>Unzip the files<code><br />
# unzip \*.zip</code></p>
<p>rename instantclient directory<code><br />
# mv instantclient_11_1 instantclient</code></p>
<p>Change directory to instantclient, list the files<code><br />
# cd instantclient<br />
</code></p>
<p>Create symbolic links<code><br />
# ln –s libclntsh.so.11.1 libclntsh.so<br />
# ln –s libocci.so.11.1 libocci.so<br />
</code></p>
<p>Create a source directory under /opt/oracle . This is where we will house the oci8 libraries.<code><br />
# mkdir /opt/oracle/src</code></p>
<p>Change the directory to /opt/oracle/src and download the oci8 tar using pecl<code><br />
# cd /opt/oracle/src</code><code><br />
# pecl download oci8</code></p>
<p>Untar the oci8 libraries<code><br />
# tar xvf oci8-1.2.4.tgz</code></p>
<p>Change to the newly created oci8-1.2.4 directory and issue the following commands<code><br />
# cd oci8-1.2.4</code><code><br />
# phpize</code></p>
<p>Set the ORACLE_HOME  environment variable<code><br />
# export ORACLE_HOME=/opt/oracle/instantclient</code><code><br />
# echo $ORACLE_HOME<br />
/opt/oracle/instantclient</code></p>
<p>Configure oci8 to install with the necessary parameters<code><br />
# ./configure --with-oci8=share,instantclient,/opt/oracle/instantclient</code></p>
<p>run make to compile<code><br />
# make<br />
</code></p>
<p>install oci8<code><br />
# make install</code></p>
<p>insert the extension=oci8.so into the php.ini and cli.ini files<code><br />
# echo extension=oci8.so &gt;&gt; /etc/php5/apache2/php.ini<br />
# echo extension=oci8.so &gt;&gt; /etc/php5/cli/php.ini</code></p>
<p>restart apache<code><br />
# /etc/init.d/apache2 restart<br />
</code></p>
<p>create a phpinfo.php file in /var/www<code><br />
# vi /var/www/phpinfo.php</code></p>
<p>Now go to your browser and run the phpinfo file and look for the oci8 module<code></p>
<p>http://localhost/phpinfo.php</code></p>
<p>Download my <a href="http://acloudtree.com/wp-content/uploads/2008/02/oratestphp.template" title="oratest php template">oratest php template</a> file and configure it with the needed settings.</p>
<p>Test the connection<code><br />
# php /home/ubuntu/oratest.php<br />
Connection Succesful</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.acloudtree.com/ubuntu-710-oci8-php5/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

