<?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>dragffy.com &#187; php</title>
	<atom:link href="http://dragffy.com/blog/posts/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://dragffy.com/blog</link>
	<description>The development, documentation, and blogging domain of Gabriel Dragffy.</description>
	<lastBuildDate>Wed, 27 Jan 2010 14:23:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Protected: Learning PHP 5 &#8211; O&#8217;Reilly</title>
		<link>http://dragffy.com/blog/posts/learning-php-5-oreilly</link>
		<comments>http://dragffy.com/blog/posts/learning-php-5-oreilly#comments</comments>
		<pubDate>Mon, 10 Mar 2008 10:49:30 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/posts/learning-php-5-oreilly</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://dragffy.com/blog/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-27">Password:<br />
<input name="post_password" id="pwbox-27" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/learning-php-5-oreilly/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected: Pro PHP Security</title>
		<link>http://dragffy.com/blog/posts/pro-php-security</link>
		<comments>http://dragffy.com/blog/posts/pro-php-security#comments</comments>
		<pubDate>Thu, 06 Mar 2008 15:48:50 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/posts/pro-php-security</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://dragffy.com/blog/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-21">Password:<br />
<input name="post_password" id="pwbox-21" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/pro-php-security/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected: CodeIgniter for Rapid PHP Application development</title>
		<link>http://dragffy.com/blog/posts/codeigniter-for-rapid-php-application-development</link>
		<comments>http://dragffy.com/blog/posts/codeigniter-for-rapid-php-application-development#comments</comments>
		<pubDate>Thu, 06 Mar 2008 15:43:14 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/posts/codeigniter-for-rapid-php-application-development</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://dragffy.com/blog/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-23">Password:<br />
<input name="post_password" id="pwbox-23" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/codeigniter-for-rapid-php-application-development/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linking images in Code Igniter</title>
		<link>http://dragffy.com/blog/posts/linking-images-in-code-igniter</link>
		<comments>http://dragffy.com/blog/posts/linking-images-in-code-igniter#comments</comments>
		<pubDate>Sun, 17 Feb 2008 15:42:11 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/posts/linking-images-in-code-igniter</guid>
		<description><![CDATA[I&#8217;m a big fan of the PHP framework, CodeIgniter. However, until recently it has lacked an elegant way of nesting an image in an anchor tag. I had to resort to manually typing out HTML like this:
&#60;a href="&#60;?=site_url?&#62;/controller/action"&#62;&#60;img src="&#60;?=base_url()?&#62;/images/button.gif"&#62;&#60;/a&#62;
CodeIgniter 1.6 has been released, quickly followed by 1.6.1. This includes an image helper. One is still [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of the PHP framework, CodeIgniter. However, until recently it has lacked an elegant way of nesting an image in an anchor tag. I had to resort to manually typing out HTML like this:<br />
<code>&lt;a href="&lt;?=site_url?&gt;/controller/action"&gt;&lt;img src="&lt;?=base_url()?&gt;/images/button.gif"&gt;&lt;/a&gt;</code><br />
CodeIgniter 1.6 has been released, quickly followed by 1.6.1. This includes an image helper. One is still unable to elegantly link images using CI&#8217;s helpers. If you want to be able to do something like this:<br />
<code>&lt;?= anchor( 'controller/action', img( 'images/button.gif' )?&gt;</code></p>
<p>You could just comment out line 117 in <code>/system/helpers/url_helper.php</code> but that means you are altering CI core, which is not a good idea. For a start it will be overwritten when you upgrade and it is an inelegant hack.</p>
<p>A better bet is to create your own helper file and use it to override CodeIgniter&#8217;s one. This is dead-simple, just create a file called <code>MY_url_helper.php</code> in the following location <code>/system/application/helpers/</code>. Note that the <strong>MY_</strong> prefix is set in the config.php file under <code>$config['subclass_prefix'] = 'MY_';</code> so if you have changed that setting you will need to adjust your file-name accordingly.</p>
<p>Then just copy and paste the following in to it:<span id="more-17"></span></p>
<pre>&lt; ?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

if (! function_exists('anchor'))

{

 function anchor($uri = '', $title = '', $attributes = '')

 {

 	$title = (string) $title;		if ( ! is_array($uri))

 	{

 	$site_url = ( ! preg_match('!^\w+://!i', $uri)) ? site_url($uri) : $uri;

 	}

 	else

 	{

 		$site_url = site_url($uri);

 	}

if ($title == '')

 	{

 		$title = $site_url;

 	}

if ($attributes == '')

 	{

 		// $attributes = ' title="'.$title.'"';

 	}

 	else

 	{

 		$attributes = _parse_attributes($attributes);

 	}

return '<a href="'.$site_url.'">'.$title.'</a>';

 }

}

?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/linking-images-in-code-igniter/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Getting Lighttpd 1.4 and PHP 5 to work on FreeBSD</title>
		<link>http://dragffy.com/blog/posts/getting-lighttpd-14-and-php-5-to-work-on-freebsd</link>
		<comments>http://dragffy.com/blog/posts/getting-lighttpd-14-and-php-5-to-work-on-freebsd#comments</comments>
		<pubDate>Wed, 26 Sep 2007 15:58:37 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/posts/getting-lighttpd-14-and-php-5-to-work-on-freebsd</guid>
		<description><![CDATA[Firstly let me just say that I had quite a few problem with Lighttp (aka Lighty), and some of them related to PHP. However, I now have Lighty, PHP, and MySQL playing nicely and&#8230; it&#8217;s fast! This was tested with: Lighty 1.4.18 and PHP 5.2.3_1 on FreeBSD 6.2.For the installation of these programs it is [...]]]></description>
			<content:encoded><![CDATA[<p>Firstly let me just say that I had quite a few problem with Lighttp (aka Lighty), and some of them related to PHP. However, I now have Lighty, PHP, and MySQL playing nicely and&#8230; it&#8217;s fast! This was tested with: Lighty 1.4.18 and PHP 5.2.3_1 on FreeBSD 6.2.<span id="more-8"></span>For the installation of these programs it is almost a must to install from the latest ports snapshot. Installing from ports allows you to compile with certain options, for example CGI support, and it also ensures you have the very latest release. This is important since even right now the latest PHP5 in ports (5.2.3_1) has security problems, and so too does Lighttpd 1.4.18. Therefore it is vital that these can be updated at the soonest possible time. Personally, I don&#8217;t mind a few security niggles, and while Lighty retains a fairly small percentage of the server market it shouldn&#8217;t be subjected to bad attacks.</p>
<p>For me, I wanted to use Lighty and PHP with MySQL. The easiest way to install PHP and PHP MySQL support is to just install the php5-extensions. So change to their directory:</p>
<pre><code>cd /usr/ports/lang/php5-extensions</code>

<code>make config</code></pre>
<p>Now choose all the different extensions you want, which would normally include MySQL. When asked about PHP options make sure you enable FastCGI.</p>
<ul>For me I chose to install:</p>
<li>CLI</li>
<li>CGI</li>
<li>Suhosin</li>
<li>IPV6</li>
<li>FastCGI</li>
<li>Path Info</li>
</ul>
<p>If you don&#8217;t want all the fluff you can just change directory to</p>
<pre><code>cd /usr/ports/lang/php5</code>

<code>make config</code></pre>
<p>Choose the options here. In either case after running:</p>
<pre><code>make config</code></pre>
<p>you need to run:</p>
<pre><code>make install clean</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/getting-lighttpd-14-and-php-5-to-work-on-freebsd/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
