<?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>Michael&#039;s Blog &#187; PHP</title>
	<atom:link href="http://www.michaeltozzo.com/blog/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaeltozzo.com/blog</link>
	<description>More marklar for your marklar.</description>
	<lastBuildDate>Wed, 25 Aug 2010 18:30:21 +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>MongoDB / PHP problem</title>
		<link>http://www.michaeltozzo.com/blog/2010/02/19/mongodb-php-problem/</link>
		<comments>http://www.michaeltozzo.com/blog/2010/02/19/mongodb-php-problem/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 14:35:10 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[General Rambling]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.michaeltozzo.com/blog/?p=168</guid>
		<description><![CDATA[While at work I was looking into something that we could replace MySQL with since the two trends these days are to not do any JOINS between tables and to work with large datasets. I came across a database called &#8230; <a href="http://www.michaeltozzo.com/blog/2010/02/19/mongodb-php-problem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While at work I was looking into something that we could replace MySQL with since the two trends these days are to not do any JOINS between tables and to work with large datasets. I came across a database called <a href="http://www.mongodb.org">MongoDB</a> which was apparently very good at both of these things and used guides on the internet to get it going on a local Linux box. </p>
<p>I got to a point where it was almost working 100% but for some reason my simple test script couldn&#8217;t connect when run by Apache but could when run via command line. I would get the error:</p>
<p><code>PHP Fatal error:  Uncaught exception 'MongoConnectionException' with message 'Permission denied'</code></p>
<p>I scoured the internet and found only a single reference to my problem but couldn&#8217;t find a solution. After direct emails with <a href="http://snailinaturtleneck.com/toons/?page_id=2">Kristina Chodorow</a> the primary maintainer for the <a href="http://www.mongodb.org">MongoDB</a> <a href="http://search.cpan.org/dist/MongoDB">Perl</a> and <a href="http://pecl.php.net/package/mongo">PHP</a> drivers I found that the solution to my problem was to run the command:</p>
<p><code>$ /usr/sbin/setsebool -P httpd_can_network_connect 1</code></p>
<p>Hopefully this helps someone else. Thanks again Kristina <img src='http://www.michaeltozzo.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaeltozzo.com/blog/2010/02/19/mongodb-php-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
