<?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>cat brain.log &#124; less &#187; dl</title>
	<atom:link href="http://log.largevoid.com/tag/dl/feed/" rel="self" type="application/rss+xml" />
	<link>http://log.largevoid.com</link>
	<description>Getting it down on `paper`</description>
	<lastBuildDate>Wed, 01 Feb 2012 01:41:39 +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>Compiling Datascope.so for PHP</title>
		<link>http://log.largevoid.com/2008/10/compiling-datascope-so-for-php/</link>
		<comments>http://log.largevoid.com/2008/10/compiling-datascope-so-for-php/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 10:46:56 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[antelope]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[datascope]]></category>
		<category><![CDATA[dl]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://log.largevoid.com/?p=21</guid>
		<description><![CDATA[Does the following sentence make sense? In order to be able to simply dl(&#8220;Datascope.so&#8221;) in your PHP code, you first need to make sure Datascope.so is compiled and copied to the extension_dir, as specified in php.ini (ex: /usr/lib/php4). Answer: No: Stop right now. You&#8217;re not qualified to read this article. Yes: Keep reading. Notes You&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>Does the following sentence make sense?</p>
<p>In order to be able to simply dl(&#8220;Datascope.so&#8221;) in your PHP code, you first need to make sure Datascope.so is compiled and copied to the <strong>extension_dir</strong>, as specified in <em>php.ini</em> (ex: <em>/usr/lib/php4</em>).</p>
<p><strong>Answer:</strong><br />
  No: Stop right now.  You&#8217;re not qualified to read this article.<br />
  Yes: Keep reading.</p>
<h3>Notes</h3>
<p>You&#8217;re not compiling the PHP source code for actual use, so <strong>please</strong> don&#8217;t install it.  If you do, you run the risk of clobbering any pre-existing php installations, and overwriting previously compiled-in modules.  The only reason why you &#8221;make&#8221; PHP is so that the Zend libraries are properly initialized.  </p>
<p>The PHP &#8221;make&#8221; step may be avoidable, but given that the compile doesn&#8217;t affect system performance, I didn&#8217;t bother.  </p>
<p>Paths should be changed to reflect your setup.  If you don&#8217;t have the src/contrib/data/php/datascope code, you can get it from the <a href="http://www.indiana.edu/~aug/source_downloads/download.html">contrib source</a> at <a href="http://www.brtt.com/">BRTT</a>&#8216;s web site.</p>
<p>Contrib appears to be maintained by <a href="http://www.indiana.edu/~aug/">Indiana University</a>.</p>
<h3>Paths</h3>
<ul>
<li><strong>Antelope Bash Script</strong> &#8221;/opt/antelope/4.9/setup.sh&#8221;</li>
<li><strong>Datascope Source</strong> &#8221;/opt/antelope/4.9/src/contrib/data/php/datascope&#8221;</li>
<li><strong>PHP Source Code URL</strong> &#8221;http://downloads.php.net/ilia/php-5.1.4.tar.bz2&#8221;</li>
<li><strong>PHP Modules Directory</strong> &#8221;/usr/lib/php/modules/&#8221;</li>
</ul>
<h3>Compile and Install Steps</h3>
<ol>
<li>wget <em>&lt;PHP Source Code&gt;</em></li>
<li>bunzip2 php-5.1.4.tar.bz2</li>
<li>tar xf php-5.1.4.tar</li>
<li>cd php-5.1.4</li>
<li>PHP_INC=`pwd`</li>
<li>export PHP_INC</li>
<li>./configure</li>
<li>make</li>
<li>cd <em>&lt;Datascope Source&gt;</em></li>
<li>source <em>&lt;Antelope Bash Script&gt;</em></li>
<li>sudo make install</li>
<li>sudo cp Datascope.so <em>&lt;PHP Modules Directory&gt;</em></li>
</ol>
<h3>PHP Script Example</h3>
<p>Proper usage of the &#8221;Datascope.so&#8221; module follows:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">putenv</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;PFPATH=/opt/antelope/4.9/data/pf&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">putenv</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;ANTELOPE=/opt/antelope/4.9&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">set_include_path</span><span style="color: #009900;">&#40;</span>
  <span style="color: #990000;">get_include_path</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>PATH_SEPARATOR<span style="color: #339933;">.</span><span style="color: #990000;">getenv</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ANTELOPE'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/data/php&quot;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">extension_loaded</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;Datascope.so&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">dl</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;Datascope.so&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;Failed to load datascope.so&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://log.largevoid.com/2008/10/compiling-datascope-so-for-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  log.largevoid.com/tag/dl/feed/ ) in 0.37767 seconds, on Feb 5th, 2012 at 4:52 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 5th, 2012 at 5:52 pm UTC -->
