<?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>Peeled Carrots &#187; Server</title>
	<atom:link href="http://www.peeledcarrots.com/tag/server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.peeledcarrots.com</link>
	<description>....cause life&#039;s too short to peel carrots. Enough said!!</description>
	<lastBuildDate>Tue, 03 Nov 2009 14:42:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to turn off PHP safe mode and remove open_basedir restrictions to install the Seagull PHP framework on a Media Temple sub domain</title>
		<link>http://www.peeledcarrots.com/successfully-turning-off-php-safe-mode-removing-open_basedir-restrictions/</link>
		<comments>http://www.peeledcarrots.com/successfully-turning-off-php-safe-mode-removing-open_basedir-restrictions/#comments</comments>
		<pubDate>Tue, 03 Apr 2007 09:37:42 +0000</pubDate>
		<dc:creator>Stephen Blake</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://soapbox.technovated.com/2007/04/03/successfully-turning-off-php-safe-mode-removing-open_basedir-restrictions/</guid>
		<description><![CDATA[Problem
I wanted to run an installation script on a sub-domain of a Dedicated-Virtual server hosted by Media Temple with a Plesk 7.5.4, but received the following php error message when I ran the script:
Warning: file_exists(): open_basedir restriction in effect.
Reason why the error occurs
The reason for this error is because, php safe mode is turned on [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong></p>
<p>I wanted to run an installation script on a sub-domain of a Dedicated-Virtual server hosted by Media Temple with a Plesk 7.5.4, but received the following php error message when I ran the script:</p>
<p><strong>Warning:</strong> file_exists(): open_basedir restriction in effect.</p>
<p><strong>Reason why the error occurs</strong></p>
<p>The reason for this error is because, php safe mode is turned on and because the open_basedir is set for each sub-domain. After quite a lot of searching on the web, I eventually tried a few tutorials, but none of them were comprehensive enough to describe exactly how to solve the actual problem.</p>
<p><strong>Solution</strong></p>
<p>Follow these steps and you should solve the problem:</p>
<ol>
<li>SSH into your server using the root login information </li>
<p></p>
<li>Once you have logged in, edit the php.ini file located  /etc/ folder with a text editor. The line you are looking for is:<br />
a. Change this line safe_mode = on to safe_mode = off<br />
b. Or you can cut and paste this one-liner: <br /> perl -p -i -e &#8217;s/^safe_mode\s*=\s*on/safe_mode = off/i;&#8217; /etc/php.ini
</li>
<p></p>
<li>Make sure that the open_basedir in the php.ini file looks like this:
<p><code>; open_basedir, if set, limits all file operations to the defined<br />
directory<br />
; and below. This directive makes most sense if used in a per-<br />
directory<br />
; or per-virtualhost web server configuration file. This directive is<br />
; *NOT* affected by whether Safe Mode is turned On or Off.<br />
open_basedir = none</code></p>
</li>
<p></p>
<li>Then you need to edit the virtual hosts for the domain and for each sub-domain in the http.inc file, which is located in the /var/www/vhosts/$domain/conf folder.<br />
Add the following section of code to the domain Virtual Host, as well as to each sub-domain Virtual Host</p>
<p><code><br />
< IfModule sapi_apache2.c ><br />
	php_admin_flag engine on<br />
	php_admin_flag safe_mode off<br />
	php_admin_value open_basedir none<br />
< /IfModule ></p>
<p>< IfModule mod_php5.c ><br />
	php_admin_flag engine on<br />
	php_admin_flag safe_mode off<br />
	php_admin_value open_basedir none<br />
< /IfModule ><br />
</code>
 </li>
<p></p>
<li>To complete the process, one needs to type the following two commands:</li>
<p>a. /etc/init.d/httpd stop<br />
b. /etc/init.d/httpd start</p>
<p>Hit â€œEnterâ€? after each command and you should be given an [ OK ] status in the command line.</p>
<p><strong>Conclusion</strong></p>
<p>This should solve your problem and if you have any comments, suggestions or improvements, please submit them. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.peeledcarrots.com/successfully-turning-off-php-safe-mode-removing-open_basedir-restrictions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
