<?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>Torkil Johnsen &#187; PHP</title>
	<atom:link href="http://www.torkiljohnsen.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.torkiljohnsen.com</link>
	<description>My personal piece of cyberspace</description>
	<lastBuildDate>Mon, 28 Nov 2011 11:18:55 +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>Facebook API tutorial with PHP SDK</title>
		<link>http://www.torkiljohnsen.com/2010/12/06/facebook-api-tutorial-with-php-sdk/</link>
		<comments>http://www.torkiljohnsen.com/2010/12/06/facebook-api-tutorial-with-php-sdk/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 21:37:47 +0000</pubDate>
		<dc:creator>tj</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook api]]></category>
		<category><![CDATA[facebook sdk]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.torkiljohnsen.com/?p=590</guid>
		<description><![CDATA[Joey Rivera wrote a nice tutorial where he demonstrates how to use the Facebook PHP SDK to interact with Facebook&#8217;s Graph API. He presents a few simple examples where he starts out by creating a Facebook Application, and then goes on to both read and add photos and a status message. It&#8217;s a short and [...]]]></description>
			<content:encoded><![CDATA[<p>Joey Rivera wrote a nice tutorial where he demonstrates how to use the Facebook PHP SDK to interact with Facebook&#8217;s Graph API. He presents a few simple examples where he starts out by creating a Facebook Application, and then goes on to both read and add photos and a status message. It&#8217;s a short and sweet tutorial, and really easy to get into.<br />
<a class="more-link" href="http://www.joeyrivera.com/2010/facebook-graph-api-app-easy-w-php-sdk/">Read more at joeyrivera.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkiljohnsen.com/2010/12/06/facebook-api-tutorial-with-php-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Phing on MAMP (Mac OSX)</title>
		<link>http://www.torkiljohnsen.com/2009/04/06/installing-phing-on-mamp-mac-osx/</link>
		<comments>http://www.torkiljohnsen.com/2009/04/06/installing-phing-on-mamp-mac-osx/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 09:54:38 +0000</pubDate>
		<dc:creator>tj</dc:creator>
				<category><![CDATA[joomla]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[phing]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web apps]]></category>

		<guid isPermaLink="false">http://www.torkiljohnsen.com/2009/04/06/installing-phing-on-mamp-mac-osx/</guid>
		<description><![CDATA[Just bumped into Phing, and thought I&#8217;d share my experiences. Installing Phing is easy enough. Phing is a build system in the shape of a PHP Pear package, that can do many things. To quote Hans Lillelid, this could include for instance configuring, packaging, uploading and testing. Ideal for building installable Joomla zip-files, which is [...]]]></description>
			<content:encoded><![CDATA[<p>Just bumped into Phing, and thought I&#8217;d share my experiences. Installing Phing is easy enough. Phing is a <em>build</em> system in the shape of a PHP Pear package, that can do many things. To quote <a href="http://www.slideshare.net/hozn/phing-building-with-php">Hans Lillelid</a>, this could include for instance configuring, packaging, uploading and testing. Ideal for building installable Joomla zip-files, which is what I am using it for right now.<br />
<span id="more-70"></span><br />
This is how I set up Phing to run on my local MAMP-based webserver. MAMP = Apache, MySQL and PHP, on a Mac, much like WAMP and LAMP for Windows and Linux respectively. </p>
<p>These are just very brief instructions, specifically on how I did this on my own system. A complete documentation on Phing can be found on at <a href="http://phing.info/docs/guide/current/">phing.info</a>. You don&#8217;t actually need MAMP either, it was just what I was working with to begin with. </p>
<p>Open the application Terminal. You can find pear by doing a locate call: locate pear.<br />
Currently MAMP requires you to install it into /Applications, so you should find pear (for php5) here: /Applications/MAMP/bin/php5/bin/.<br />
Make sure MAMP is using the correct php version, by starting MAMP and checking your preferences.</p>
<p>1: Go to the correct folder:<br />
cd /Applications/MAMP/bin/php5/bin/</p>
<p>2: Make sure pear can locate the package:<br />
./pear channel-discover pear.phing.info</p>
<p>3: Install phing:<br />
./pear install phing/phing</p>
<p>Phing should now be installed. Run the command &#8220;ls -al&#8221; and you should see phing in the same folder as pear.</p>
<p>You can now run this command:<br />
./phing -h<br />
This will give you an overview of the phing&#8217;s options. </p>
<p>From here you can for instance just run:<br />
./phing -f /path/to/your/build.xml</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkiljohnsen.com/2009/04/06/installing-phing-on-mamp-mac-osx/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>MySQL connection (resource) management</title>
		<link>http://www.torkiljohnsen.com/2006/08/18/mysql-connection-resource-management/</link>
		<comments>http://www.torkiljohnsen.com/2006/08/18/mysql-connection-resource-management/#comments</comments>
		<pubDate>Fri, 18 Aug 2006 11:06:18 +0000</pubDate>
		<dc:creator>tj</dc:creator>
				<category><![CDATA[Content management]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.torkiljohnsen.com/2006/08/18/mysql-connection-resource-management/</guid>
		<description><![CDATA[Just came across a good article by Jay Pipes talking about lazy loading and caching of content. A nice read with some good code examples that I thought I should share with my fellow readers. Read Jays blog entry]]></description>
			<content:encoded><![CDATA[<p>Just came across a good article by Jay Pipes talking about lazy loading and caching of content. A nice read with some good code examples that I thought I should share with my fellow readers. <span id="more-41"></span></p>
<p><a href="http://jpipes.com/index.php?/archives/99-MySQL-Connection-Management-in-PHP-How-Not-To-Do-Things.html">Read Jays blog entry</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkiljohnsen.com/2006/08/18/mysql-connection-resource-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating symlinks without shell access</title>
		<link>http://www.torkiljohnsen.com/2006/08/09/creating-symlinks-without-shell-access/</link>
		<comments>http://www.torkiljohnsen.com/2006/08/09/creating-symlinks-without-shell-access/#comments</comments>
		<pubDate>Wed, 09 Aug 2006 09:39:43 +0000</pubDate>
		<dc:creator>tj</dc:creator>
				<category><![CDATA[Content management]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.torkiljohnsen.com/2006/08/09/creating-symlinks-without-shell-access/</guid>
		<description><![CDATA[While testing out the WordPress plugin WP-Cache, used to cache and speed up wordpress powered websites, I came across a list of commens on the plugin creator&#8217;s website where alot of comments had questions as to how one should create a symlink that was required in the plugin installation. Alot of us (me included) do [...]]]></description>
			<content:encoded><![CDATA[<p>While testing out the WordPress plugin WP-Cache, used to cache and speed up wordpress powered websites, I came across a list of commens on the plugin creator&#8217;s website where alot of comments had questions as to how one should create a symlink that was required in the plugin installation.<span id="more-40"></span></p>
<p><!--adsense#468artikkelbanner--></p>
<p>Alot of us (me included) do not have shell access and are unable to execute the Unix &#8220;ln&#8221; command to make this happen. But fear not, there is an easy php-solution to this problem. The function is called &#8230; yeah you guessed it: symlink().</p>
<p>The function works like this:<br />
<code>bool symlink ( string target, string link )</code></p>
<p><strong>HERE IS HOW</strong> you can use it to set up the required symlink in the WP-Cache installation: </p>
<p>1. Create a blank php-file in the root of your website. Name it createsymlink.php.</p>
<p>2. Paste the code below into the file and save it. Make sure you replace &#8220;/path/to/website/&#8221; with your website&#8217;s real path.</p>
<p><code><br />
$success = symlink('/path/to/website/wp-content/plugins/wp-cache/wp-cache-phase1.php', '/path/to/website/wp-content/advanced-cache.php');<br />
if ($success)<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "Symlink was created";<br />
else<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo "Symlink creation failed!";<br />
</code></p>
<p>3. Make sure that your wp-content folder is writeable</p>
<p>4. Use your webbrowser and open www.yourwebsite.com/createsymlink.php, making the code run. This should fix the symlink creation for you and the success message should be displayed on screen.</p>
<p>5. Delete createsymlink.php from your server.</p>
<p><strong>Related links</strong><br />
&raquo; <a href="http://no.php.net/symlink">Read the php documentation on the symlink function</a><br />
&raquo; <a href="http://mnm.uib.es/gallir/wp-cache-2/">WP-Cache plugin website</a></p>
<p>[tags]WordPress, symlink, unix commands, php functions, caching, wp-cache[/tags]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkiljohnsen.com/2006/08/09/creating-symlinks-without-shell-access/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

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

