<?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>Prattski &#124; Magento &#38; Web Development &#187; Plesk</title>
	<atom:link href="http://prattski.com/category/plesk/feed/" rel="self" type="application/rss+xml" />
	<link>http://prattski.com</link>
	<description></description>
	<lastBuildDate>Fri, 11 May 2012 14:05:27 +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>Plesk open_basedir Fix</title>
		<link>http://prattski.com/2008/09/13/plesk-open_basedir-fix/</link>
		<comments>http://prattski.com/2008/09/13/plesk-open_basedir-fix/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 02:13:05 +0000</pubDate>
		<dc:creator>Josh Pratt</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Plesk]]></category>

		<guid isPermaLink="false">http://devzone.pratthost.com/?p=3</guid>
		<description><![CDATA[I wanted to try and install the Zend Framework on my hosted server today, and I ran into problems.  The Zend Framework suggests that you run a lot of files outside of the httpdocs folder.  But in doing so, you &#8230; <a href="http://prattski.com/2008/09/13/plesk-open_basedir-fix/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I wanted to try and install the <a href="http://framework.zend.com/">Zend Framework</a> on my hosted server today, and I ran into problems.  The Zend Framework suggests that you run a lot of files outside of the httpdocs folder.  But in doing so, you may run into <a href="http://us.php.net/features.safe-mode">open_basedir</a> restriction problems like I did &#8211; and have no clue how to fix it.</p>
<p>I did some searching, found a lot of people suggesting adding little snippets to the php.ini file and the .htaccess file.  I tried all of those and nothing worked.  Later, I was asking around the #zftalk IRC channel and ran into someone that knew exactly how to fix the issue.  So, I wanted to post it for anyone out there hoping to find the solution to this frustrating problem.</p>
<h4>Here&#8217;s what I was doing:</h4>
<ol>
<li>Setup a subdomain through <a href="http://www.parallels.com/plesk/">Plesk</a></li>
<li>Logged in as root and created the needed directory structure, installed Zend library here:  /var/www/vhosts/mydomain.com/subdomains/phpbook/library/Zend</li>
<li>Created my bootstrap file:  /httpdocs/index.php, and the IndexController.php, and the view.</li>
</ol>
<h4>Here&#8217;s what you&#8217;ve got to do to fix it:</h4>
<p>First, create a new file called vhost.conf here:  /var/www/vhosts/YOURDOMAIN.COM/subdomains/YOURSUBDOMAIN/conf/.  When you&#8217;ve done that, put in this code, modify it to be what you need, and save it:</p>
<p><code>&lt;Directory /var/www/vhosts/YOURDOMAIN.COM/subdomains/YOUSUBDOMAIN/httpdocs&gt;<br />
&lt;IfModule sapi_apache2.c&gt;<br />
php_admin_value open_basedir none<br />
&lt;/IfModule&gt;<br />
&lt;IfModule mod_php5.c&gt;<br />
php_admin_value open_basedir none<br />
&lt;/IfModule&gt;<br />
&lt;/Directory&gt;<br />
</code></p>
<p>Now, in order for that to take effect, you&#8217;ve got to reconfigure the Plesk vhost.  Open up your terminal, login as root, and enter these commands (modifying it to match what you need):</p>
<p><code>/usr/local/psa/admin/bin/websrvmng --reconfigure-vhost --vhost-name=YOURDOMAIN.COM</code></p>
<p><code>apachectl stop</code></p>
<p><code>apachectl start</code></p>
<hr />
<p>And that should do it!  I spent an entire Saturday trying to fix this issue.  Hopefully this saves you some time.  (The vhost.conf code &#8211; thanks to Daniel and <a href="http://www.toosweettobesour.com/2008/02/02/plesk-open_basedir-workaround/">this post</a>)</p>
<p>Keep in mind though, that turning off the open_basedir restrictions for your site does weaken the security slightly, as open_basedir limits the files that can be opened by PHP.  If you don&#8217;t want to completey remove the open_basedir restrictions, you can re-author the vhost.conf code to open restrictions just to specific directories.</p>
]]></content:encoded>
			<wfw:commentRss>http://prattski.com/2008/09/13/plesk-open_basedir-fix/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

