<?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>For Your Lungs Only &#187; Dreamhost</title>
	<atom:link href="http://www.foryourlungsonly.net/category/dreamhost/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.foryourlungsonly.net</link>
	<description>Everything you wanted to know about web development, espresso, typography, nicotine, user interface design, whiskey, javascript, php, cascading style sheets, css hacks, beer, prototype, jquery, mysql, usability and accessiblity (but were afraid to ask)</description>
	<lastBuildDate>Mon, 14 Jun 2010 22:08:30 +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>A Simple Shell Script to Create a Custom php.ini on Dreamhost&#8217;s Shared Host</title>
		<link>http://www.foryourlungsonly.net/2009/07/28/a-simple-shell-script-to-create-a-custom-php-ini-on-dreamhosts-shared-host/</link>
		<comments>http://www.foryourlungsonly.net/2009/07/28/a-simple-shell-script-to-create-a-custom-php-ini-on-dreamhosts-shared-host/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 16:24:40 +0000</pubDate>
		<dc:creator>Jonathan Harriot</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.foryourlungsonly.net/?p=104</guid>
		<description><![CDATA[While shared hosts offer great service for little cost there can be problems with sites timing out when uploading large files or you would like to be in more control of your server a bit. Just change the value for site and you&#8217;ll be off to the races. There are some other values you can [...]]]></description>
			<content:encoded><![CDATA[<p>While shared hosts offer great service for little cost there can be problems with sites timing out when uploading large files or you would like to be in more control of your server a bit. Just change the value for site and you&#8217;ll be off to the races. There are some other values you can customize to your needs but only edit and use this script if you know what you&#8217;re doing. This was created so I could upload some large files over a 20MB line so if your connection is slower or would like to allow users with slower connections to upload such large files, toy with the time settings a bit till you find the proper values for your system &amp; connection. I take no responsibility for anyone who uses this script, if you break your server contact support and beg them for help. Or ask me and I&#8217;ll see what we can do, cheers!</p>
<p>Onto the script!<span id="more-104"></span></p>
<blockquote>
<pre># stop on errors
set -e

# set the site for which you want to setup the custom php.ini
SITE=yoursite.com

# copy the php.ini to modify
mkdir $HOME/${SITE}/cgi-bin
cp /etc/php5/cgi/php.ini $HOME/${SITE}/cgi-bin/php.ini
cat &lt;&lt; EOF &gt; $HOME/${SITE}/cgi-bin/php-wrapper.fcgi
#!/bin/sh
exec /dh/cgi-system/php5.cgi $*
EOF
chmod 755 $HOME/${SITE}/cgi-bin
chmod 755 $HOME/${SITE}/cgi-bin/php-wrapper.fcgi
chmod 640 $HOME/${SITE}/cgi-bin/php.ini

# search and replace the php.ini
#!/bin/sh
INIFILE="$HOME/${SITE}/cgi-bin/php.ini"
rsync -a /dh/cgi-system/php5.cgi "$CGIFILE"
perl -p -i -e '
s/.*post_max_size.*/post_max_size = 100M/;
s/.*upload_max_filesize.*/upload_max_filesize = 100M/;
s/.*max_execution_time.*/max_execution_time = 1200/;
s/.*max_input_time.*/max_input_time = 1200/;
s/.*memory_limit.*/memory_limit = 250M/;
' "$INIFILE"

# create the new htaccess or append the handlers to your current .htaccess
FILE=.htaccess
cat &gt;&gt; $HOME/${SITE}/${FILE} &lt;&lt; EOF
Options +ExecCGI
AddHandler php5-cgi .php
Action php-cgi /cgi-bin/php-wrapper.fcgi
Action php5-cgi /cgi-bin/php-wrapper.fcgi
EOF</pre>
</blockquote>
<p><a title="Custom PHP.ini on Dreamhost's Shared Hosting" href="http://www.foryourlungsonly.net/wp-content/uploads/2009/07/customphp.sh">Download the script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.foryourlungsonly.net/2009/07/28/a-simple-shell-script-to-create-a-custom-php-ini-on-dreamhosts-shared-host/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.282 seconds -->
