<?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>Chris JeanChris Jean &#187; Ioncube</title>
	<atom:link href="http://chrisjean.com/tag/ioncube/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisjean.com</link>
	<description>Linux, WordPress, programming, anime, and other stuff</description>
	<lastBuildDate>Mon, 16 Jan 2012 15:22:13 +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>Trouble with Ubersmith, Ioncube, and mb_internal_encoding</title>
		<link>http://chrisjean.com/2009/01/06/trouble-with-ubersmith-ioncube-and-mb_internal_encoding/</link>
		<comments>http://chrisjean.com/2009/01/06/trouble-with-ubersmith-ioncube-and-mb_internal_encoding/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 21:00:20 +0000</pubDate>
		<dc:creator>Chris Jean</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Ioncube]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubersmith]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=485</guid>
		<description><![CDATA[Today I&#8217;m installing Ubersmith, a billing system solution, on a server to test it out. I have to say that Ubersmith has a more complex installation process than I&#8217;m used to these days. I guess that I&#8217;ve been spoiled. Here&#8217;s a quick word about what I&#8217;m running. My test server is a dedicated system running [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>Today I&#8217;m installing <a href="http://www.ubersmith.com/" target="_blank">Ubersmith</a>, a billing system solution, on a server to test it out. I have to say that Ubersmith has a more complex installation process than I&#8217;m used to these days. I guess that I&#8217;ve been spoiled.</p>
<p>Here&#8217;s a quick word about what I&#8217;m running. My test server is a dedicated system running <a href="http://www.centos.org/" target="_blank">CentOS</a> 5.2 64-bit. The software setup is nothing special as most of the packages are straight from the repository.</p>
<p>I loaded the release files on the server, untarred them, and proceeded to read the instructions. Everything looked to be straight-forward. I quickly got down to the part about installing Ioncube. That&#8217;s when the trouble started.</p>
<p><span id="more-485"></span></p>
<p>I followed the instructions for getting Ioncube loaded, quickly modified my php.ini file, and restarted Apache. I then tried to access the site and got nothing. I looked at the logs and found that Ioncube wasn&#8217;t loading while reporting the following error:</p>
<div style="padding-left:30px;"><code>Failed loading /usr/local/ioncube/ioncube_loader_lin_5.1.so:  /usr/local/ioncube/ioncube_loader_lin_5.1.so: wrong ELF class: ELFCLASS32</code></div>
<p>Frankly, I had no idea what that meant. A bit of searching later, I find that I apparently have the wrong Ioncube loader. That didn&#8217;t make any sense since I loaded the exact loader that the ioncube-loader-helper.php program told me to use. I had a hunch that I knew what the problem was and decided to check it out. Yup, Ioncube Loader has 32-bit and 64-bit versions, the problem has to be that the Ubersmith code came with the 32-bit code. I downloaded a Linux (x86-64) archive from <a href="http://www.ioncube.com/loaders.php" target="_blank">the Ioncube Loader packages</a> page, loaded it up, restarted Apache again, and got Ioncube to load properly.</p>
<p>Ioncube was now loaded, but the page still didn&#8217;t render. Looking at the logs, I found this wonderful gem:</p>
<div style="padding-left:30px;"><code>PHP Fatal error:  Call to undefined function mb_internal_encoding() in /home/site/html/include/i18n.boot.php on line 15</code></div>
<p>My first thought was, &#8220;great, the software is broken.&#8221; A quick google later, I found that <code><a href="http://us2.php.net/manual/en/function.mb-internal-encoding.php" target="_blank">mb_internal_encoding</a></code> is part of PHP, but it is not a defaultly included option. I looked around at how to activate or add it, and everyone was going on about needing to recompile PHP. I&#8217;ve compiled everything from simple command-line tools to Apache2, but I always prefer using repository releases as it makes maintenance that much easier, so I was very upset to see that I needed to compile PHP with a new set of options just to run this software.</p>
<p>I was about to give up on Ubersmith altogether when I remembered how many amazing things package management can do. I ran &#8220;<strong><code>yum search mbstring</code></strong>&#8221; and found that there was a package called <code>php-mbstring</code> ready and waiting for me to install it. I ran &#8220;<strong><code>yum install mbstring</code></strong>&#8220;, restarted Apache, and finally the Ubersmith setup wizard was ready for me.</p>
<p>So, there are a few key pieces of wisdom that I have learned from my experience with installing Ubersmith:</p>
<ol>
<li>Don&#8217;t trust that the installation documents/tools give you all the information you need. Ubersmith made a bad assumption that all systems will only require the 32-bit Ioncube while not making any notes that people on 64-bit platforms need to download new software. Ioncube&#8217;s installation helper neglected to check to see if the Ioncube files I had were built to work on my platform, and just like Ubersmith, the helper made no attempt to notify me that I may require different files depending on whether my platform is 32-bit or 64-bit.</li>
<li>Never trust that the third-party software packaged with another piece of software is the correct software for your system. If something breaks, first replace that packaged software with software freshly downloaded from the developer&#8217;s site.</li>
<li>When references say to compile your own software to get something to work, always remember to try using the package management tools first.</li>
</ol>
<p>As I continued on the setup path, this wisdom had immediate use. The setup wizard indicated that two PHP extensions were missing: Mcrypt and XML-RPC. I immediately ran &#8220;<strong><code>yum search mcrypt</code></strong>&#8221; and &#8220;<strong><code>yum search xmlrpc</code></strong>&#8221; which returned positive results. I then ran &#8220;<strong><code>yum install php-mcrypt</code></strong>&#8221; and &#8220;<strong><code>yum install php-xmlrpc</code></strong>&#8221; and was golden. Just think if I had decided on compiling my own version of PHP earlier, I would have finally finished, gotten it working, and then had to do it all over again when I ran the setup and hit this snag. Thank you <a href="http://fedoraproject.org/wiki/Tools/yum" target="_blank">yum</a>.</p>
<p>One thing that I have a gripe about is Ioncube&#8217;s navigation structure. I went to their site looking for download links for Ioncube Loader, and could not find them anywhere. I ended asking Google where I could find Ioncube Loader, and like a good little Google, it was right on the first try. I then tried again to find that page in the nav and found it under <strong>Products &gt; Free Loaders for Encoded Files</strong>. I&#8217;m probably just daft, but I skipped right over that stuff because I was skimming the left side of the nav looking for something that started with &#8220;Ioncube &#8230;&#8221; not &#8220;Free &#8230;&#8221; At the very least, put links on the encoder pages that point to the loader page and say, &#8220;Looking for Ioncube Loader? Click here.&#8221;&lt;/rant&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/01/06/trouble-with-ubersmith-ioncube-and-mb_internal_encoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

