<?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>RedHatVN Network &#187; PDO</title>
	<atom:link href="http://redhatvn.net/tag/pdo/feed" rel="self" type="application/rss+xml" />
	<link>http://redhatvn.net</link>
	<description>Shared Linux problems</description>
	<lastBuildDate>Tue, 07 Sep 2010 08:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>[HOWTO] Get PDO and PDO_MYSQL working in PHP 5.2.5</title>
		<link>http://redhatvn.net/howto-get-pdo-and-pdo_mysql-working-in-php-5-2-5</link>
		<comments>http://redhatvn.net/howto-get-pdo-and-pdo_mysql-working-in-php-5-2-5#comments</comments>
		<pubDate>Fri, 16 Oct 2009 08:05:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PDO]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=474</guid>
		<description><![CDATA[I just recently had to do this so I thought I might as well share. There are a few threads already with some info, but it&#8217;s not entirely complete in my opinion. Let&#8217;s get started. 1) First off, issue this command to check your pear/pecl config: pecl config-show This will show you your config. Now [...]]]></description>
			<content:encoded><![CDATA[<p>I just recently had to do this so I thought I might as well share. There are a few threads already with some info, but it&#8217;s not entirely complete in my opinion.</p>
<p>Let&#8217;s get started.<br />
<span id="more-474"></span><br />
<strong>1)</strong> First off, issue this command to check your pear/pecl config:</p>
<p><code>pecl config-show</code></p>
<p>This will show you your config. Now if your /tmp is mounted noexec, skip the following and jump to step 2) now.</p>
<p>My /tmp is mounted noexec and instead of messing with it, I just changed the config to a local writable directory.</p>
<p>Your config-show should have:</p>
<blockquote><p>
PEAR Installer cache directory cache_dir        /tmp/pear/cache<br />
PEAR Installer download        download_dir     /tmp/pear/cache<br />
PEAR Installer temp directory  temp_dir         /tmp/pear/temp
</p></blockquote>
<p>Take note of the /tmp paths.</p>
<p>Type and execute:<br />
<code><br />
pear config-set cache_dir /root/tmp/pear/cache<br />
pear config-set download_dir /root/tmp/pear/cache<br />
pear config-set temp_dir /root/tmp/pear/temp</pre>
<p></code></p>
<p>Feel free to change the path to your own liking.</p>
<p><strong>2)</strong> Now we will install pdo and pdo_mysql extensions.</p>
<p>Type and execute:<br />
<code><br />
pecl install pdo<br />
pecl install pdo_mysql<br />
</code></p>
<p>Now check your extensions directory to make sure they were installed. For my purposes they were in /usr/local/lib/php/extensions/no-debug-non-zts-20060613.</p>
<p>You should see pdo.so and pdo_mysql.so there.</p>
<p><strong>3)</strong><br />
Next you will need to re-compile PHP5. Before doing so, edit the configure file and add the following:</p>
<blockquote><p>
	&#8211;enable-pdo=shared \<br />
	&#8211;with-pdo-mysql=shared \<br />
	&#8211;with-sqlite=shared \<br />
	&#8211;with-pdo-sqlite=shared \
</p></blockquote>
<p>Next recompile PHP with your method of choice.</p>
<p><strong>4)</strong> Last step is to edit your /usr/local/lib/php.ini file.</p>
<p>Change your extension_dir to:</p>
<blockquote><p>
extension_dir = /usr/local/lib/php/extensions/no-debug-non-zts-20060613
</p></blockquote>
<p>Change this path if yours is different.</p>
<p>Scroll down and add the following extensions:</p>
<blockquote><p>
extension=pdo.so<br />
extension=pdo_mysql.so
</p></blockquote>
<p>Exit and save your php.ini.</p>
<p><strong>5)</strong> Restart httpd and open up a phpinfo.php file. You should now see pdo/pdo_mysql entries.</p>
<p><strong>TROUBLESHOOTING</strong></p>
<p>A) If you are receiving the following warning/error:</p>
<blockquote><p>
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) &#8216;pdo_mysql.so&#8217; in Unknown on line 0
</p></blockquote>
<p>Try restarting mysqld first.</p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/howto-get-pdo-and-pdo_mysql-working-in-php-5-2-5/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->