<?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>Danilo Vizzarro &#187; Oracle on Unix Server</title>
	<atom:link href="http://www.danilovizzarro.it/category/oracle-unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danilovizzarro.it</link>
	<description>the Blog of</description>
	<lastBuildDate>Sat, 29 May 2010 14:36:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Troubleshooting: LD_LIBRARY_PATH&#8230; Warning: ocilogon() http://function.ocilogon: OCIEnvNlsCreate() failed.</title>
		<link>http://www.danilovizzarro.it/2009/02/troubleshooting-ld_library_path-warning-ocilogon-httpfunctionocilogon-ocienvnlscreate-failed/</link>
		<comments>http://www.danilovizzarro.it/2009/02/troubleshooting-ld_library_path-warning-ocilogon-httpfunctionocilogon-ocienvnlscreate-failed/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 04:00:05 +0000</pubDate>
		<dc:creator>Danilo Vizzarro</dc:creator>
				<category><![CDATA[Oracle on Unix Server]]></category>
		<category><![CDATA[oci8]]></category>
		<category><![CDATA[Oracle Client]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.danilovizzarro.it/?p=110</guid>
		<description><![CDATA[If you are connecting an Oracle Database using an Apache2 webserver that runs on an Ubuntu machine, you might randomly have this error.

Warning: ocilogon() http://function.ocilogon: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries.



It can be solved setting properly the environment variable [...]]]></description>
			<content:encoded><![CDATA[<p>If you are connecting an Oracle Database using an Apache2 webserver that runs on an Ubuntu machine, you might randomly have this error.<br />
<code><br />
Warning: ocilogon() http://function.ocilogon: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries.<br />
</code></p>
<p><img src="http://www.danilovizzarro.it/images/troubleshooting-ld_library_path-warning-ocilogon-httpfunctionocilogon-ocienvnlscreate-failed_01.jpg" alt="troubleshooting ld library path warning ocilogon httpfunctionocilogon ocienvnlscreate failed 01 Troubleshooting: LD LIBRARY PATH... Warning: ocilogon() http://function.ocilogon: OCIEnvNlsCreate() failed. " width="100%" title="Troubleshooting: LD LIBRARY PATH... Warning: ocilogon() http://function.ocilogon: OCIEnvNlsCreate() failed. " /><br />
<img src="http://www.danilovizzarro.it/images/space.gif" alt="space Troubleshooting: LD LIBRARY PATH... Warning: ocilogon() http://function.ocilogon: OCIEnvNlsCreate() failed. " width="100%" title="Troubleshooting: LD LIBRARY PATH... Warning: ocilogon() http://function.ocilogon: OCIEnvNlsCreate() failed. " /></p>
<p>It can be solved setting properly the environment variable LD_LIBRARY_PATH in the configuration file /etc/apache2/apache2.conf</p>
<p>Add below the ServerRoot path:<code><br />
ServerRoot "/etc/apache2"<br />
</code></p>
<p>the following line:<code><br />
SetEnv LD_LIBRARY_PATH="/opt/oracle/instantclient_10_2"<br />
</code></p>
<p>Don&#8217;t forget to let us know if the solution is working also for you ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danilovizzarro.it/2009/02/troubleshooting-ld_library_path-warning-ocilogon-httpfunctionocilogon-ocienvnlscreate-failed/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>HOW-TO: Install PHP5, OCI8, the Oracle Client v10.2 and SqlPlus on Mac OS X Leopard 10.5.4</title>
		<link>http://www.danilovizzarro.it/2008/07/how-to-install-php5-oci8-the-oracle-client-v102-and-sqlplus-on-macos-x-leopard-1054/</link>
		<comments>http://www.danilovizzarro.it/2008/07/how-to-install-php5-oci8-the-oracle-client-v102-and-sqlplus-on-macos-x-leopard-1054/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 20:42:52 +0000</pubDate>
		<dc:creator>Danilo Vizzarro</dc:creator>
				<category><![CDATA[Oracle on Unix Server]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[oci8]]></category>
		<category><![CDATA[Oracle Client]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[sqlplus]]></category>
		<category><![CDATA[tns]]></category>

		<guid isPermaLink="false">http://www.danilovizzarro.it/?p=11</guid>
		<description><![CDATA[ 
  Download the High Resolution Video
Get the OCI8 module working on a Mac require several settings. I wrote a script to automate the procedure that install and configure SqlPlus, the Oracle Client v10.2, Apache2, PHP5 and the OCI8 on a Mac OS X running Leopard. The script was tested on a Leopard 10.5.4 machine. I have [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;"><object width="425" height="350" data="http://www.youtube.com/v/50yOZ-U_GrY" type="application/x-shockwave-flash"><param name="src" value="http://www.youtube.com/v/50yOZ-U_GrY" /></object> <br />
  <a href="http://www.danilovizzarro.it/video/demo011.mov">Download</a> the High Resolution Video</div>
<p>Get the OCI8 module working on a <a href="http://www.danilovizzarro.it/tag/macos/">Mac</a> require several settings. I wrote a <a href="http://www.danilovizzarro.it/scripts/">script</a> to automate the procedure that install and configure <a href="http://www.danilovizzarro.it/tag/sqlplus/">SqlPlus</a>, the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> v10.2, Apache2, PHP5 and the OCI8 on a <a href="http://www.danilovizzarro.it/tag/macos/">Mac</a> OS X running Leopard. The <a href="http://www.danilovizzarro.it/scripts/">script</a> was tested on a Leopard 10.5.4 machine. I have never tested it on Tiger but I don&#8217;t recommend to test it there without having an idea of how to backup and restore all the Apache configuration files.</p>
<p><strong>Pre-installation:</strong><br />
1. Download from the <a href="http://www.oracle.com/technology/software/tech/oci/instantclient/index.html" target="_blank">Oracle website</a> the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> for <a href="http://www.danilovizzarro.it/tag/macos/">Mac</a> OS X (Intel x86) Version 10.2.0.4 and the <a href="http://www.danilovizzarro.it/tag/sqlplus/">SqlPlus</a>:<br />
- the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> &#8216;Instant Package &#8211; Basic&#8217; [instantclient-basic-macosx-10.2.0.4.0.zip]<br />
- the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> &#8216;Instant Package &#8211; SDK&#8217; [instantclient-sdk-macosx-10.2.0.4.0.zip]<br />
- the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> &#8216;Instant Package &#8211; <a href="http://www.danilovizzarro.it/tag/sqlplus/">SqlPlus</a>&#8216; [instantclient-sqlplus-macosx-10.2.0.4.0.zip]<br />
2. Download the bash <a href="http://www.danilovizzarro.it/scripts/">script</a> MacOracleViaPHP.sh. Last version can be found in the <a href="http://www.danilovizzarro.it/scripts/">script</a> page.<br />
3. Download the last version of the following programs respecting the file format<br />
- <a href="http://httpd.apache.org/download.cgi" target="_blank">Apache2</a> [httpd-X.X.X.tar.gz]<br />
- <a href="http://www.php.net/downloads.php" target="_blank">PHP5</a> [php-5.X.X.tar.gz]<br />
- <a href="http://pecl.php.net/package/oci8" target="_blank">OCI8</a> [oci8-X.X.X.tgz]</p>
<p><strong>Installation:</strong><br />
1. Copy all these files in your <a href="http://www.danilovizzarro.it/tag/macos/">Mac</a> directory /var/root in the following way<br />
- Create a folder on the desktop and move all the files in this folder<br />
- Open the terminal<br />
- If you don&#8217;t have a root password set you will need to set one<br />
# sudo passwd<br />
- Log in as root<br />
# su -<br />
- Copy the files inside the folder you created into the root directory /var/www<br />
cp /Users/YOUR_MAC_USERNAME/Desktop/FOLDER_YOU_CREATED/* .<br />
(don&#8217;t forget the dot &#8216;.&#8217; at the end of the command)<br />
- Check that the files are in the right place<br />
# cd /var/root<br />
# ls<br />
2. Enter the home directory of the user root, change the permissions of the installation <a href="http://www.danilovizzarro.it/scripts/">script</a> and execute it.<br />
# cd<br />
# chmod 755 MacOracleViaPHP.sh<br />
# ./MacOracleViaPHP.sh<br />
3. Type: Oracle SID, Oracle Server, Oracle Server Port, Oracle Database Username, Oracle Database Password.</p>
<p><strong>Installation Check:</strong><br />
1. To connect the Oracle DB via <a href="http://www.danilovizzarro.it/tag/sqlplus/">SqlPlus</a> you can run the following command:<br />
# sqlplus DB_USER/DB_PASS@//DB_SERVER:DB_PORT/DB_SID<br />
2. To check that PHP can connect Oracle, opening the page http://localhost/info.php you could see the OCI8 module enabled, and opening the page http://localhost/test.php you could connect the Oracle DB.</p>
<p>Your comment, error reports and improvement requests are always welcome ;D</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danilovizzarro.it/2008/07/how-to-install-php5-oci8-the-oracle-client-v102-and-sqlplus-on-macos-x-leopard-1054/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
<enclosure url="http://www.danilovizzarro.it/video/demo011.mov" length="80927639" type="video/quicktime" />
		</item>
		<item>
		<title>HOW-TO: Install SqlPlus and the Oracle Client v10.2 on Mac OS X Leopard 10.5.4</title>
		<link>http://www.danilovizzarro.it/2008/07/how-to-install-sqlplus-and-the-oracle-client-v102-on-a-mac-os-x-leopard-1054/</link>
		<comments>http://www.danilovizzarro.it/2008/07/how-to-install-sqlplus-and-the-oracle-client-v102-on-a-mac-os-x-leopard-1054/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 20:19:55 +0000</pubDate>
		<dc:creator>Danilo Vizzarro</dc:creator>
				<category><![CDATA[Oracle on Unix Server]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Oracle Client]]></category>
		<category><![CDATA[sqlplus]]></category>
		<category><![CDATA[tns]]></category>

		<guid isPermaLink="false">http://www.danilovizzarro.it/?p=10</guid>
		<description><![CDATA[Today I wrote this script that can be used to install and configure SqlPlus on a Mac OS X. It was tested on a Leopard 10.5.4 machine.
Pre-installation:
1. Download from the Oracle website the Oracle Client for Mac OS X (Intel x86) Version 10.2.0.4 and the SqlPlus:
- the Oracle Client &#8216;Instant Package &#8211; Basic&#8217; [instantclient-basic-macosx-10.2.0.4.0.zip]
- the [...]]]></description>
			<content:encoded><![CDATA[<p>Today I wrote this <a href="http://www.danilovizzarro.it/scripts/">script</a> that can be used to install and configure <a href="http://www.danilovizzarro.it/tag/sqlplus/">SqlPlus</a> on a <a href="http://www.danilovizzarro.it/tag/macos/">Mac</a> OS X. It was tested on a Leopard 10.5.4 machine.</p>
<p><strong>Pre-installation:</strong><br />
1. Download from the <a href="http://www.oracle.com/technology/software/tech/oci/instantclient/index.html" target="_blank">Oracle website</a> the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> for <a href="http://www.danilovizzarro.it/tag/macos/">Mac</a> OS X (Intel x86) Version 10.2.0.4 and the <a href="http://www.danilovizzarro.it/tag/sqlplus/">SqlPlus</a>:<br />
- the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> &#8216;Instant Package &#8211; Basic&#8217; [instantclient-basic-macosx-10.2.0.4.0.zip]<br />
- the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> &#8216;Instant Package &#8211; <a href="http://www.danilovizzarro.it/tag/sqlplus/">SqlPlus</a>&#8216; [instantclient-sqlplus-macosx-10.2.0.4.0.zip]<span> </span><br />
2. Download the bash <a href="http://www.danilovizzarro.it/scripts/">scripts</a> MacSqlPlus.sh and TNSconnectMac.sh. Last version can be found in the <a href="http://www.danilovizzarro.it/scripts/">script</a> page.</p>
<p><strong>Installation:<br />
</strong>1. Set a root password and log in as root<br />
# sudo passwd<br />
# su -<br />
2. Copy the files instantclient-basic-macosx-10.2.0.4.0.zip, instantclient-sqlplus-macosx-10.2.0.4.0.zip, MacSqlPlus.sh and TNSconnectMac.sh into the directory /var/root.<br />
3. Enter the home directory of the user root, change the permissions of the <a href="http://www.danilovizzarro.it/scripts/">scripts</a> and execute the installation <a href="http://www.danilovizzarro.it/scripts/">script</a>.<br />
# cd<br />
# chmod 755 MacSqlPlus.sh TNSconnectMac.sh<br />
# ./MacSqlPlus.sh</p>
<p><strong>Post-Installation: [Steps Required]<br />
</strong>1. Make sure you know SID, SERVER and PORT of the server you want to connect.<br />
2. Execute the <a href="http://www.danilovizzarro.it/scripts/">script</a> TNSconnectMac.sh<br />
# cd<br />
# ./TNSconnectMac.sh<br />
3. Type: Oracle SID, Oracle Server, Oracle Server Port, Oracle Database Username, Oracle Database Password.</p>
<p><strong>Installation Check:</strong><br />
1. To connect the Oracle DB via <a href="http://www.danilovizzarro.it/tag/sqlplus/">SqlPlus</a> you can run the following command:<br />
# sqlplus DB_USER/DB_PASS@//DB_SERVER:DB_PORT/DB_SID</p>
<p>Your comment, error reports and improvement requests are always welcome ;D</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danilovizzarro.it/2008/07/how-to-install-sqlplus-and-the-oracle-client-v102-on-a-mac-os-x-leopard-1054/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>HOW-TO: Install PHP5, Oracle Client v10.2 and OCI8 on Ubuntu Server Linux</title>
		<link>http://www.danilovizzarro.it/2008/07/how-to-install-php5-the-oracle-client-v102-and-oci8-on-server-linux-ubuntu-8041/</link>
		<comments>http://www.danilovizzarro.it/2008/07/how-to-install-php5-the-oracle-client-v102-and-oci8-on-server-linux-ubuntu-8041/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 10:04:06 +0000</pubDate>
		<dc:creator>Danilo Vizzarro</dc:creator>
				<category><![CDATA[Oracle on Unix Server]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[oci8]]></category>
		<category><![CDATA[Oracle Client]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tns]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.danilovizzarro.it/?p=7</guid>
		<description><![CDATA[
Download the High Resolution Video
Connecting an Oracle Database via PHP, requires a not easy procedure. The bash scripts OracleViaPHP.sh and TNSconnect.sh will automate the set up process for you.
The scripts are tested on a virtual machine running OS Linux Ubuntu Server 8.04.1 i386 created on a Mac OS X running Leopard 10.5.3. OracleViaPHP.sh will install and configure Apache2, PHP5, the [...]]]></description>
			<content:encoded><![CDATA[<div><object width="425" height="350" data="http://www.youtube.com/v/0A2WfY1eoew" type="application/x-shockwave-flash"><param name="src" value="http://www.youtube.com/v/0A2WfY1eoew" /></object></p>
<p><a href="http://www.danilovizzarro.it/video/demo007.mov">Download</a> the High Resolution Video</div>
<p>Connecting an Oracle Database via PHP, requires a not easy procedure. The bash <a href="http://www.danilovizzarro.it/scripts/">scripts</a> OracleViaPHP.sh and TNSconnect.sh will automate the set up process for you.<br />
The <a href="http://www.danilovizzarro.it/scripts/">scripts</a> are tested on a virtual machine running OS Linux Ubuntu Server 8.04.1 i386 created on a Mac OS X running Leopard 10.5.3. OracleViaPHP.sh will install and configure Apache2, PHP5, the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> v10.2 and the OCI8 and TNSconnect.sh will create the file tnsnames.ora to connect the Oracle DB. The scripts should also work on Ubuntu 9.x.</p>
<p><strong>Pre-installation:<br />
</strong>1. Download Ubuntu Server 8.04.1 from <a href="http://www.ubuntu.com" target="_blank">www.ubuntu.com</a><br />
2. Download from the <a href="http://www.oracle.com/technology/software/tech/oci/instantclient/index.html" target="_blank">Oracle website</a> the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> for Linux x86 Version 10.2.0.4 and the SDK:<br />
- the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> &#8216;Instant Package &#8211; Basic Lite&#8217; [oracle-instantclient-basiclite-10.2.0.4-1.i386.zip]<br />
- the <a href="http://www.danilovizzarro.it/tag/oracle-client/">Oracle Client</a> &#8216;Instant Package &#8211; SDK&#8217; [oracle-instantclient-devel-10.2.0.4-1.i386.zip]<span> </span> <br />
3. Download the bash <a href="http://www.danilovizzarro.it/scripts/">scripts</a> OracleViaPHP.sh and TNSconnect.sh. Last version can be found in the <a href="http://www.danilovizzarro.it/scripts/">script</a> page.<br />
4. Install Ubuntu Server 8.04.1 </p>
<p><strong>Installation:<br />
</strong>1. Set a root password and log in as root<br />
# sudo passwd<br />
# su -<br />
2. Copy the files oracle-instantclient-basiclite-10.2.0.4-1.i386.zip, oracle-instantclient-devel-10.2.0.4-1.i386.zip, OracleViaPHP.sh and TNSconnect.sh into the /root directory.<br />
3. Enter the /root directory and execute the installation <a href="http://www.danilovizzarro.it/scripts/">script</a>.<br />
# cd /root<br />
# ./OracleViaPHP.sh </p>
<p><strong>Post-Installation: [Steps Required]<br />
</strong>1. Make sure you know SID, SERVER and PORT of the server you want to connect.<br />
2. Execute the <a href="http://www.danilovizzarro.it/scripts/">script</a> TNSconnect.sh<br />
# cd /root<br />
# ./TNSconnect.sh<br />
3. Type: Oracle SID, Oracle Server, Oracle Server Port, Oracle Database Username, Oracle Database Password.</p>
<p><strong>Installation Check:<br />
<span style="font-weight: normal;">1. Connecting http://your_ip_address/info.php you should get the PHP info page showing the module oci8 installed.<br />
2. Connecting http://your_ip_address/test.php you should be able to connect the Oracle DB you defined.</span></strong></p>
<p><strong><span style="font-weight: normal;"><strong>Trouble Shooting<br />
<span style="font-weight: normal;">If you get the error:<br />
<code>Warning: ocilogon() [function.ocilogon]: ORA-12154: TNS:could not resolve the connect identifier specified in /var/www/test.php on line 2<br />
Could not connect to Oracle database!</code></span></strong></span></strong></p>
<p><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;"><em><span style="font-style: normal;">It is possible that: <br />
1. You typed the Oracle Server details in a wrong way. You can edit manually this information in the files /opt/oracle/tns/tnsnames.ora and /var/www/test.php<br />
2. The permission to the file /opt/oracle/tns/tnsnames.ora are not right. You can to execute the following command:<br />
# chmod 777 /opt/oracle/tns/tnsnames.ora<br />
3. The environment variables in the file /etc/init.d/apache2 are not defined properly. Make sure that the file /etc/init.d/apache2 contains at the beginning the following string:<br />
ENV=&#8221;env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin <br />
ORACLE_HOME=/opt/oracle/instantclient_10_2 <br />
TNS_ADMIN=/opt/oracle/tns <br />
LD_LIBRARY_PATH=/opt/oracle/instantclient_10_2&#8243;</span></em></span></strong></span></strong></p>
<p><span style="font-weight: normal;">If you get the error:<br />
<code>/usr/bin/ld: skipping incompatible /opt/oracle/instantclient_10_2/libclntsh.so when searching for -lclntsh<br />
/usr/bin/ld: cannot find -lclntsh<br />
collect2: ld returned 1 exit status<br />
make: *** [oci8.la] Error 1<br />
ERROR: `make' failed</code></span></strong></span></strong><br />
it&#8217;s possible that your server has a 64-bit architecture. You will need to download from the Oracle website the Oracle Client and the SDK package for Linux 64-bit architecture and manually unzip the files in the directory /opt/oracle/instantclient_10_2.</p>
<p>Your comment, error reports and improvement requests are always welcome ;D</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danilovizzarro.it/2008/07/how-to-install-php5-the-oracle-client-v102-and-oci8-on-server-linux-ubuntu-8041/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
<enclosure url="http://www.danilovizzarro.it/video/demo007.mov" length="82726910" type="video/quicktime" />
		</item>
	</channel>
</rss>
