<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Rio Bautista's TechLog</title>
	<atom:link href="http://riobautista.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://riobautista.wordpress.com</link>
	<description>Tech solutions worth remembering</description>
	<lastBuildDate>Sat, 14 Nov 2009 04:00:57 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='riobautista.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/43909c53165f5c31d07314100aaf8ba3?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Rio Bautista's TechLog</title>
		<link>http://riobautista.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://riobautista.wordpress.com/osd.xml" title="Rio Bautista&#8217;s TechLog" />
		<item>
		<title>My Move to the OSX (the dark-side)</title>
		<link>http://riobautista.wordpress.com/2009/10/31/my-move-to-the-osx-the-dark-side/</link>
		<comments>http://riobautista.wordpress.com/2009/10/31/my-move-to-the-osx-the-dark-side/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 05:23:30 +0000</pubDate>
		<dc:creator>Rio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://riobautista.wordpress.com/?p=19</guid>
		<description><![CDATA[My exploits on this new adventure called the Apple MacBook<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=19&subd=riobautista&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I recently bought my 6th laptop and this time I thought I&#8217;d make this big jump to the other-side (OSX).  I wanted to find out what makes a Mac so loved by the &#8220;simple-ones&#8221;.  Well it looks like this whole &#8220;simplicity&#8221; is what gives the Mac its advantage.  It&#8217;s the same secret I suppose that puts facebook ahead of the other social networking sites.  It captures even the simplest of the simple users there is.  It takes away all the non-essentials and keeps you focused on what you need.  Putting all its power into delivering your very basic needs. I&#8217;ll keep that in mind the next time I create something. Focused Power&#8230; I like that.</p>
<p><em><strong>Running Drupal on XAMPP/OSX</strong></em></p>
<p>I was able to setup my XAMPP/OSX and got it working.  Following the directions on how to install XAMPP on OSX it tells you to put your site on the htdocs folder.  But I decided to setup my Drupal site on another directory outside of the XAMPP folder.  My experience tells me to simply look for the httpd.conf file and insert a virtual-host that points to my site.  So I did and I also included a vhost for my local xampp stuff.  The XAMPP site is now working but not my drupal site.  Here&#8217;s what I did with my conf:</p>
<blockquote><p><span style="font-family:courier new;">&lt;Directory &#8220;/Users/riobautista/Documents/workspace/skoolflyer&#8221;&gt;<br />
Options Indexes FollowSymLinks ExecCGI Includes<br />
AllowOverride All<br />
Order allow,deny</span><span style="font-family:courier new;"> Allow from all<br />
&lt;/Directory&gt;</span></p>
<p><span style="font-family:courier new;">&lt;VirtualHost *:80&gt;<br />
ServerAdmin rio.bautista@ragingriverict.com<br />
DocumentRoot &#8220;/Applications/XAMPP/xamppfiles/htdocs&#8221;<br />
ServerName localhost<br />
&lt;/VirtualHost&gt;</span></p>
<p><span style="font-family:courier new;">&lt;VirtualHost *:80&gt;<br />
ServerAdmin rio.bautista@ragingriverict.com<br />
DocumentRoot &#8220;/Users/riobautista/Documents/workspace/skoolflyer&#8221;<br />
ServerName skoolflyer.local<br />
&lt;/VirtualHost&gt;</span></p></blockquote>
<p>I restarted my Apache after modifying the conf but I&#8217;m getting an Error 403 (Permission Denied) when I tried to access the site.  I&#8217;m thinking maybe I should setup the permissions so I went into the terminal and did a chmod 755 on the skoolflyer folder but still didn&#8217;t solve the problem.</p>
<p>I just moved my site to the /Users/riobautista/Sites/ this fixed the problem.</p>
<p>This time, I got a bunch of deprecated function ereg().  Turns out XAMPP 1.7.2a is using PHP 5.30 which no longer support ereg().  Good thing I found this simple patch that fixed the problem.  The problem is in line 902 of the includes/file.inc:</p>
<blockquote><p><span style="color:#0000ff;">902:   elseif ($depth &gt;= $min_depth &amp;&amp; <strong><span style="color:#ff0000;">ereg</span></strong>($mask, $file)) {</span></p>
<p>just replace the ereg function with mb_ereg so it becomes:</p></blockquote>
<blockquote><p><span style="color:#0000ff;">902:   elseif ($depth &gt;= $min_depth &amp;&amp; <strong><span style="color:#ff0000;">mb_ereg</span></strong>($mask, $file)) {</span></p></blockquote>
<p><span style="color:#000000;">That worked perfectly for me so on to my work.</span></p>
<p><span style="color:#000000;"><em><strong>Hibernate on Mac</strong></em></span></p>
<p><span style="color:#000000;">I&#8217;m now trying to find out how to put the MacBook on hibernate.  It&#8217;s a very useful feature found on Windows.  As I move around very often, this helps me completely turn off my laptop while preserving everything so that when I turn the power back on I&#8217;m back exactly at where I left off.</span></p>
<p><span style="color:#000000;">MacBook seems to have something else they call Safe Sleep.  It&#8217;s supposed to do exactly what hibernate does, but it is not readily accessible to the user.  That gives me the feeling that Apple is not recommending this for regular use.  I&#8217;ll try to read more on this.</span></p>
<p><span style="color:#000000;">I found these 2 terminal commands that lets you enable and disable SafeSleep.</span></p>
<p style="padding-left:30px;">To enable SafeSleep, use the Terminal program and enter the following command:</p>
<pre style="padding-left:60px;"><span style="color:#0000ff;">sudo pmset -a hibernatemode <strong>3</strong></span></pre>
<p style="padding-left:30px;">To disable SafeSleep:</p>
<pre style="padding-left:60px;"><span style="color:#0000ff;">sudo pmset -a hibernatemode <strong>1</strong></span></pre>
<p>I tried enabling SafeSleep and will now observe how well this works.  For almost a day now, SafeSleep seems to work well.  When I put my MacBook to sleep it hibernates just like windows.  It does take a bit longer to sleep and wake than the usual sleep mode but I&#8217;m fine with that.</p>
<p><em><strong>My First Crush (Crash)</strong></em></p>
<p>I downloaded drivers and other software for my Line6 PODxt.   Of course I got the latest ones from Line6.  Installed Line6 Monkey without a problem.  But after finishing the GearBox installation I got this message about the Line6Audio.kext:</p>
<h6 style="text-align:center;"><img class="aligncenter" title="Line6 Error" src="http://line6.com/community/servlet/JiveServlet/downloadImage/102-1583-1-5919/Screen+shot+2009-08-29+at+17.58.40.png" alt="" width="421" height="177" />Read more about this error here: http://line6.com/community/docs/DOC-1583</h6>
<p style="text-align:left;">Well Line6 says this is a known issue and should not be a problem.  Anyway, after completing the installation I was asked to restart but when I did I noticed it was taking much longer than usual to boot up.  After a while I received this message telling me to shutdown by pressing the power button until the MacBook shuts down and turn it back on again.  I did but I kept getting the same message.  So got my other laptop and looked around for what I can possibly do.   I tried the single-user and verbose approach (which you do be pressing command+s or command+v during start up).  I was given the bsd terminal where I started exploring ways to uninstall the Line6 driver using the terminal.  It&#8217;s not very Apple-like, so I decided to look for an alternative.  Apparently the Apple-way is to login in SafeMode and uninstall my drivers from the Finder.  It&#8217;s too simple really.  You simply press the command+shift buttons while booting and you&#8217;ll get into SafeMode (pretty much like Windows).  From there I was able to locate the Line6 Driver Uninstaller and that fixed my problem.</p>
<blockquote><p><span style="color:#0000ff;"><br />
</span></p></blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/riobautista.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/riobautista.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/riobautista.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/riobautista.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/riobautista.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/riobautista.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/riobautista.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/riobautista.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/riobautista.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/riobautista.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=19&subd=riobautista&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://riobautista.wordpress.com/2009/10/31/my-move-to-the-osx-the-dark-side/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/97a7bb94662de14a463c07394511cdb0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">riobautista</media:title>
		</media:content>

		<media:content url="http://line6.com/community/servlet/JiveServlet/downloadImage/102-1583-1-5919/Screen+shot+2009-08-29+at+17.58.40.png" medium="image">
			<media:title type="html">Line6 Error</media:title>
		</media:content>
	</item>
		<item>
		<title>Skype &amp; Apache conflict</title>
		<link>http://riobautista.wordpress.com/2009/10/23/skype-apache-conflict/</link>
		<comments>http://riobautista.wordpress.com/2009/10/23/skype-apache-conflict/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 18:41:14 +0000</pubDate>
		<dc:creator>Rio</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Skype]]></category>
		<category><![CDATA[xampp]]></category>
		<category><![CDATA[Port 80]]></category>

		<guid isPermaLink="false">http://riobautista.wordpress.com/?p=17</guid>
		<description><![CDATA[XAMPP particularly Apache doesn't seem to work with Skype running. Skype for some reason is using port 80...<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=17&subd=riobautista&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was setting up XAMPP on my Windows XP and for some reason Apache wouldn&#8217;t start using the XAMPP Control Panel.</p>
<p>So I tried starting Apache using the xampp/apache_start.bat.  That&#8217;s were I saw the problem.  Apache server is giving me this error:</p>
<blockquote><p>&#8220;(OS 10048)Only one usage of each socket address (protocol/network address/port)<br />
is normally permitted.  : make_sock: could not bind to address 0.0.0.0:80<br />
no listening sockets available, shutting down<br />
Unable to open logs&#8221;</p></blockquote>
<p>I tried running netstat -b, to check what program is currently using port 80, but I couldn&#8217;t find it exactly.  Anyway, it only indicated Yahoo and Skype having outside connections.</p>
<p>So I decided to isolate the problem by turning off the programs one at a time.  On first try I closed Skype and tried running apache again and it worked.</p>
<p>This only shows that skype is using port 80 for some reason to connect to the outside world knowing most likely that this port is open for most firewalls.</p>
<p>So to confirm the theory, I started skype again and tried to start apache and as expected, it failed to start.</p>
<p>So there, there must be some way for them to work together, but as for me, I&#8217;d rather close skype until I need to use it, I don&#8217;t like some program acting like a webserver and doesn&#8217;t ask for my permission to do so.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/riobautista.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/riobautista.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/riobautista.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/riobautista.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/riobautista.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/riobautista.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/riobautista.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/riobautista.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/riobautista.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/riobautista.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=17&subd=riobautista&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://riobautista.wordpress.com/2009/10/23/skype-apache-conflict/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/97a7bb94662de14a463c07394511cdb0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">riobautista</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple yet effective way to replicate/mirror a database (any database at that)</title>
		<link>http://riobautista.wordpress.com/2009/04/17/simple-yet-effective-way-to-replicatemirror-a-database-any-database-at-that/</link>
		<comments>http://riobautista.wordpress.com/2009/04/17/simple-yet-effective-way-to-replicatemirror-a-database-any-database-at-that/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 10:36:05 +0000</pubDate>
		<dc:creator>Rio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://riobautista.wordpress.com/2009/04/17/simple-yet-effective-way-to-replicatemirror-a-database-any-database-at-that/</guid>
		<description><![CDATA[Here&#8217;s what I did:

First, I centralized all my data calls into a single object or function which receives an sql statement as the parameter.


I check if the SQL statement is performing an INSERT, UPDATE or DELETE.  To do this I just check if the first word is &#8220;SELECT&#8221; ( you may have to improve [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=14&subd=riobautista&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>Here&#8217;s what I did:</strong></p>
<ul>
<li>First, I centralized all my data calls into a single object or function which receives an sql statement as the parameter.</li>
</ul>
<ul>
<li>I check if the SQL statement is performing an INSERT, UPDATE or DELETE.  To do this I just check if the first word is &#8220;SELECT&#8221; ( you may have to improve that if you&#8217;re using stored Procedures ).</li>
</ul>
<ul>
<li>If the statement modifies data on the database then I put the complete sql statement in an &#8220;sql_transfer.sql&#8221; file which is a simple text that is accessible through the web.  This server now acts as the publisher.</li>
</ul>
<ul>
<li>I also have an option to perform real-time replication if the other server is within the same network.  If this option is on, then I immediately execute the same sql statement on the mirror server.</li>
</ul>
<ul>
<li>Normally, I&#8217;d have a cron running every so number of minutes that pulls the sql_transfer.sql from my publisher server.  If the download was successful then the file is deleted from the server using a script on the publisher server.  The downloaded sql_transfer.sql is then executed on statement a time deleting each one that was executed.  A flag is raised telling the process not to download while the sql_transfer.sql is not yet empty.</li>
</ul>
<p><strong>Advantages:</strong></p>
<ul>
<li> Works even across domains and ISPs.</li>
</ul>
<ul>
<li> Doesn&#8217;t require complex replication tools.</li>
</ul>
<ul>
<li> Easy to recover in case of network problems. can be manually executed.</li>
</ul>
<ul>
<li> Works on practically any database platform.</li>
</ul>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/riobautista.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/riobautista.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/riobautista.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/riobautista.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/riobautista.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/riobautista.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/riobautista.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/riobautista.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/riobautista.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/riobautista.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=14&subd=riobautista&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://riobautista.wordpress.com/2009/04/17/simple-yet-effective-way-to-replicatemirror-a-database-any-database-at-that/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/97a7bb94662de14a463c07394511cdb0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">riobautista</media:title>
		</media:content>
	</item>
		<item>
		<title>MySQL .frm recovery</title>
		<link>http://riobautista.wordpress.com/2009/04/17/mysql-frm-recovery/</link>
		<comments>http://riobautista.wordpress.com/2009/04/17/mysql-frm-recovery/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 10:17:50 +0000</pubDate>
		<dc:creator>Rio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://riobautista.wordpress.com/?p=11</guid>
		<description><![CDATA[I had problems with my hard driver that caused my MySQL tables to be inaccessible.  I was getting &#8220;#1033 &#8211; Incorrect information in file&#8221; error.  I checked the files if there where obvious anomalies on the file caused by cross-linked file pointers but the files looked ok.
I had just reinstalled my MySQL due to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=11&subd=riobautista&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I had problems with my hard driver that caused my MySQL tables to be inaccessible.  I was getting &#8220;#1033 &#8211; Incorrect information in file&#8221; error.  I checked the files if there where obvious anomalies on the file caused by cross-linked file pointers but the files looked ok.</p>
<p>I had just reinstalled my MySQL due to the corruption and didn&#8217;t realize that this database was using InnoDB.  I thought it was enough to backup and restore the database directory as that would be enough for MyISAM databases.  Later I tried copying the InnoDB files from the data directory of the old installation.  It didn&#8217;t work at first until I re-started my computer.  The database was recovered after that (structure and data).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/riobautista.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/riobautista.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/riobautista.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/riobautista.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/riobautista.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/riobautista.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/riobautista.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/riobautista.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/riobautista.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/riobautista.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=11&subd=riobautista&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://riobautista.wordpress.com/2009/04/17/mysql-frm-recovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/97a7bb94662de14a463c07394511cdb0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">riobautista</media:title>
		</media:content>
	</item>
		<item>
		<title>cakePHP calls crashing Apache</title>
		<link>http://riobautista.wordpress.com/2008/02/01/cakephp-calls-crashing-apache/</link>
		<comments>http://riobautista.wordpress.com/2008/02/01/cakephp-calls-crashing-apache/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 11:46:54 +0000</pubDate>
		<dc:creator>Rio</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://riobautista.wordpress.com/?p=10</guid>
		<description><![CDATA[While doing some experimenting on cakePHP, I kept getting win32 exception errors from apache.exe causing it to stop.  It doesn&#8217;t happen on my other PHP programs.  So I thought maybe it had something to do with how cakePHP is using PHP and apache.
To figure out what was happening, I allowed Visual Studio to debug the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=10&subd=riobautista&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>While doing some experimenting on cakePHP, I kept getting win32 exception errors from apache.exe causing it to stop.  It doesn&#8217;t happen on my other PHP programs.  So I thought maybe it had something to do with how cakePHP is using PHP and apache.</p>
<p>To figure out what was happening, I allowed Visual Studio to debug the apache.exe at the point of the error.  While in debug mode, I checked the call-stack to see any information that might give me a clue and there it was.  The last call was <b>ZendOptimization</b>().</p>
<p>Now since I&#8217;m not really using Zend extensions on my programs.  I thought maybe I should try disabling this just to isolate the problem.  To do that commented out the Zend options in my <b>php.ini.</b>  After a few tries, it still wasn&#8217;t working, then realized there were 2 copies of the php.ini one was under the xampp\php and another was under xampp\apache\bin.  Well you guessed it, I should have been editing the one under xampp\apache\bin for this to take effect.  And of course don&#8217;t forget to restart your apache.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/riobautista.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/riobautista.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/riobautista.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/riobautista.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/riobautista.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/riobautista.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/riobautista.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/riobautista.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/riobautista.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/riobautista.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/riobautista.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/riobautista.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=10&subd=riobautista&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://riobautista.wordpress.com/2008/02/01/cakephp-calls-crashing-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/97a7bb94662de14a463c07394511cdb0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">riobautista</media:title>
		</media:content>
	</item>
		<item>
		<title>Reformatting the default CakePHP layout (default.ctp)</title>
		<link>http://riobautista.wordpress.com/2008/01/15/reformatting-the-default-cakephp-layout-defaultctp/</link>
		<comments>http://riobautista.wordpress.com/2008/01/15/reformatting-the-default-cakephp-layout-defaultctp/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 17:34:36 +0000</pubDate>
		<dc:creator>Rio</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://riobautista.wordpress.com/2008/01/15/reformatting-the-default-cakephp-layout-defaultctp/</guid>
		<description><![CDATA[So after working on my authentication and application security I thought it&#8217;s time to mess with the looks of my site.  To start off, I wanted to obviously change the title of my site and do some minor changes on the main layout.
When you want to change something a programmers first instinct is to look [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=9&subd=riobautista&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So after working on my authentication and application security I thought it&#8217;s time to mess with the looks of my site.  To start off, I wanted to obviously change the title of my site and do some minor changes on the main layout.</p>
<p>When you want to change something a programmers first instinct is to look for the text you want to change by maybe doing a grep or a file-search.   And I did, however, the title appeared in a file called <b>default.ctp </b>that was outside my <b>app </b>folder.  And we wouldn&#8217;t want to mess with anything outside the app folder specially if it&#8217;s inside the <b>cake</b> folder.</p>
<p>After a few more reading, it turns out we need to create our own <b>default.ctp </b>inside our <b>app </b>folder e.g. <b>app/views/layouts/default.ctp.</b>  So what I did was to copy the default.ctp from the <b>cake/libs/views/layout</b> and customized it to my preference.  I realized, the application title, is kinda redundant (as how it was implemented) and I was hoping there&#8217;d be some configuration item that I could simply change to globally specify my application title but no.  I&#8217;d probably have to do that myself as part of the configuration class.</p>
<p>I&#8217;m currently looking for a summary of all the available variables I could put in the default.ctp (of course with some description and explanation as to how to effectively use them)  like I see there&#8217;s $title_for_layout, $scripts_for_layout, $content_for_layout,  $cakeDebug.  If I don&#8217;t find one, then I&#8217;d probably write one if I later find to be important.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/riobautista.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/riobautista.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/riobautista.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/riobautista.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/riobautista.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/riobautista.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/riobautista.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/riobautista.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/riobautista.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/riobautista.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/riobautista.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/riobautista.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=9&subd=riobautista&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://riobautista.wordpress.com/2008/01/15/reformatting-the-default-cakephp-layout-defaultctp/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/97a7bb94662de14a463c07394511cdb0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">riobautista</media:title>
		</media:content>
	</item>
		<item>
		<title>Syntax highlighting CakePHP using Eclipse</title>
		<link>http://riobautista.wordpress.com/2008/01/15/syntax-highlighting-cakephp-using-eclipse/</link>
		<comments>http://riobautista.wordpress.com/2008/01/15/syntax-highlighting-cakephp-using-eclipse/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 04:15:23 +0000</pubDate>
		<dc:creator>Rio</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://riobautista.wordpress.com/2008/01/15/syntax-highlighting-cakephp-using-eclipse/</guid>
		<description><![CDATA[I&#8217;m still waiting for an Eclipse plugin for CakePHP so for now I&#8217;m settling with the available PHP syntax highlighting on eclipse.  So far I had to define two file-types e.g. *.thtml (for 1.1.x.x) and *.ctp (for 1.2.x.x).  Do the following steps for each file-type you want to be associated with the PHP-Editor:

Open [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=8&subd=riobautista&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m still waiting for an Eclipse plugin for CakePHP so for now I&#8217;m settling with the available PHP syntax highlighting on eclipse.  So far I had to define two file-types e.g. *.thtml (for 1.1.x.x) and *.ctp (for 1.2.x.x).  Do the following steps for each file-type you want to be associated with the PHP-Editor:</p>
<ol>
<li>Open your Eclipse workspace;</li>
<li>Click on Window | Preferences;</li>
<li>On the Preference Dialog expand the General node on the tree;</li>
<li>Click on Content-Types under General;</li>
<li>On the right panel under Content-Types, expand the Text node;</li>
<li>Select PHP Source under the Text node;</li>
<li>You&#8217;ll see the list of files associated on the list below e.g. File-Associations;</li>
<li>Click on the Add button and type the fie extension e.g. *.ctp under file-type;</li>
<li>Click on Ok to add the file-type;</li>
<li>Click on Ok to close the Preference Window;</li>
</ol>
<p>If there&#8217;s a currently opened file (with the extension you added), it will not reflect syntax highlighting until you close and reopen the file.  You&#8217;re all set!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/riobautista.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/riobautista.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/riobautista.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/riobautista.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/riobautista.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/riobautista.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/riobautista.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/riobautista.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/riobautista.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/riobautista.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/riobautista.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/riobautista.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=8&subd=riobautista&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://riobautista.wordpress.com/2008/01/15/syntax-highlighting-cakephp-using-eclipse/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/97a7bb94662de14a463c07394511cdb0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">riobautista</media:title>
		</media:content>
	</item>
		<item>
		<title>Intersecting Entities on CakePHP Models</title>
		<link>http://riobautista.wordpress.com/2008/01/14/intersecting-entities-on-cakephp-models/</link>
		<comments>http://riobautista.wordpress.com/2008/01/14/intersecting-entities-on-cakephp-models/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 12:44:00 +0000</pubDate>
		<dc:creator>Rio</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://riobautista.wordpress.com/2008/01/14/intersecting-entities-on-cakephp-models/</guid>
		<description><![CDATA[I&#8217;m creating a User Model as shown on the data model to the right.  In this model, I&#8217;d like to be able to assign several Roles to each User.  To do this, I&#8217;d need to add an &#8220;intersecting&#8221; entity (UserRole).  However, I couldn&#8217;t figure out how to implement an intersecting entity in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=7&subd=riobautista&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://bp1.blogger.com/_FB1UpZbgXgc/R4ti8FuUe9I/AAAAAAAAABE/LsTv7Q8fvBY/s1600-h/UserRoleDataModel.png"><img src="http://bp1.blogger.com/_FB1UpZbgXgc/R4ti8FuUe9I/AAAAAAAAABE/LsTv7Q8fvBY/s200/UserRoleDataModel.png" style="float:right;cursor:pointer;margin:0 0 10px 10px;" border="0" /></a>I&#8217;m creating a User Model as shown on the data model to the right.  In this model, I&#8217;d like to be able to assign several Roles to each User.  To do this, I&#8217;d need to add an &#8220;intersecting&#8221; entity (UserRole).  However, I couldn&#8217;t figure out how to implement an intersecting entity in CakePHP.  But after further reading, it turns out that there is a particular type of association in CakePHP specifically for handling intersections and that is the <span style="font-weight:bold;font-size:85%;"><span style="font-family:courier new;">hasAndBelongsToMany</span></span> (HABTM) association.</p>
<p>It turns out the &#8220;UserRole&#8221; does not become a class of it&#8217;s own, but instead will only be used as a joining table.  In effect, we&#8217;re still associating User with Role using UserRole as the joining table.  Though as Abba pointed out, it&#8217;s possible to make UserRole as another class using the &#8220;with&#8221; parameter.</p>
<p>So to do this, following the CakePHP convention, I created the following tables:<br />
<span style="font-size:78%;"><br />
</span></p>
<blockquote><p><span style="font-size:78%;font-family:courier;">&#8211;<br />
&#8211; Table structure for table `roles`<br />
&#8211;</span></p>
<p><span style="font-size:78%;font-family:courier;">CREATE TABLE `roles` (<br />
`id` int(11) NOT NULL auto_increment,<br />
`name` varchar(50) NOT NULL,<br />
`description` varchar(255) NOT NULL,<br />
`initControllerAction` varchar(50) NOT NULL,<br />
PRIMARY KEY  (`id`)<br />
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;</span></p>
<p>&#8211;<br />
&#8211; Dumping data for table `roles`<br />
&#8211;</p>
<p>INSERT INTO `roles` VALUES (1, &#8216;Admin&#8217;, &#8216;System Administrator&#8217;, &#8216;test&#8217;);<br />
INSERT INTO `roles` VALUES (2, &#8216;User&#8217;, &#8216;Regular User&#8217;, &#8221;);<br />
INSERT INTO `roles` VALUES (3, &#8216;Visitor&#8217;, &#8216;Visitor&#8217;, &#8216;test&#8217;);<br />
INSERT INTO `roles` VALUES (4, &#8216;Operator&#8217;, &#8216;System Operator&#8217;, &#8216;test&#8217;);</p>
<p>&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>&#8211;<br />
&#8211; Table structure for table `users`<br />
&#8211;</p>
<p>CREATE TABLE `users` (<br />
`id` int(11) NOT NULL auto_increment,<br />
`username` varchar(50) NOT NULL,<br />
`first_name` varchar(50) NOT NULL,<br />
`last_name` varchar(50) NOT NULL,<br />
`password` varchar(32) NOT NULL,<br />
PRIMARY KEY  (`id`)<br />
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;</p>
<p>&#8211;<br />
&#8211; Dumping data for table `users`<br />
&#8211;</p>
<p>INSERT INTO `users` VALUES (1, &#8216;admin&#8217;, &#8216;Test&#8217;, &#8216;Administrator&#8217;, &#8216;cdd80313584fc62e1da825e72be7d27d&#8217;);</p>
<p>&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>&#8211;<br />
&#8211; Table structure for table `users_roles`<br />
&#8211;</p>
<p>CREATE TABLE `users_roles` (<br />
`user_id` int(11) NOT NULL,<br />
`role_id` int(11) NOT NULL,<br />
PRIMARY KEY  (`user_id`,`role_id`)<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1;</p>
<p>&#8211;<br />
&#8211; Dumping data for table `users_roles`<br />
&#8211;</p>
<p>INSERT INTO `users_roles` VALUES (1, 1);<br />
INSERT INTO `users_roles` VALUES (1, 2);</p></blockquote>
<p>After creating and populating the tables, we&#8217;ll simply need to update the User model (app/models/user.php) to add the following lines:</p>
<p><code>class User extends AppModel {<br />
var $name = 'User';<br />
// this is how to implement an intersecting entity in CakePHP<br />
var $hasAndBelongsToMany = array(<br />
'Role' =&gt; array (<br />
'className'    =&gt; 'Role',<br />
'joinTable'    =&gt; 'users_roles',<br />
'foreignKey'   =&gt; 'user_id',<br />
'associationForeignKey'=&gt; 'role_id',<br />
'conditions'   =&gt; '',<br />
'order'        =&gt; '',<br />
'limit'        =&gt; '',<br />
'unique'       =&gt; true,<br />
'finderQuery'  =&gt; '',<br />
'deleteQuery'  =&gt; ''<br />
)<br />
);<br />
}<br />
</code><br />
I tried doing a simple pr($user) from my authentication program and it worked like magic <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/riobautista.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/riobautista.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/riobautista.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/riobautista.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/riobautista.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/riobautista.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/riobautista.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/riobautista.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/riobautista.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/riobautista.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/riobautista.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/riobautista.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=7&subd=riobautista&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://riobautista.wordpress.com/2008/01/14/intersecting-entities-on-cakephp-models/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/97a7bb94662de14a463c07394511cdb0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">riobautista</media:title>
		</media:content>

		<media:content url="http://bp1.blogger.com/_FB1UpZbgXgc/R4ti8FuUe9I/AAAAAAAAABE/LsTv7Q8fvBY/s200/UserRoleDataModel.png" medium="image" />
	</item>
		<item>
		<title>Integrating Flickr into my PHP web-app</title>
		<link>http://riobautista.wordpress.com/2008/01/10/integrating-flickr-into-my-php-web-app/</link>
		<comments>http://riobautista.wordpress.com/2008/01/10/integrating-flickr-into-my-php-web-app/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 13:06:00 +0000</pubDate>
		<dc:creator>Rio</dc:creator>
				<category><![CDATA[Flickr API]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://riobautista.wordpress.com/2008/01/10/integrating-flickr-into-my-php-web-app/</guid>
		<description><![CDATA[I&#8217;m now to grab some photos from Flickr.  Photos tagged with a given string and link to those images from my site.
I tried checking the Flickr API documentation but all it shows there are the available methods and their documentation.   But with some poking around I finally found this page (http://www.flickr.com/services/api/auth.howto.web.html) which [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=6&subd=riobautista&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m now to grab some photos from Flickr.  Photos tagged with a given string and link to those images from my site.</p>
<p>I tried checking the Flickr API documentation but all it shows there are the available methods and their documentation.   But with some poking around I finally found this page (<span style="font-size:85%;"><a href="http://www.flickr.com/services/api/auth.howto.web.html">http://www.flickr.com/services/api/auth.howto.web.html</a></span>) which gives me the &#8220;how to&#8217;s&#8221; to get me started.</p>
<p>We&#8217;ll now need to download an API from the list.  I initially picked-out the PHP5 API but after going through the doc, it turns out we need to make sure the CURL and SimpleXML extensions should be enabled.  I&#8217;m not sure if that&#8217;s available on the target server so I&#8217;m going for the phpFlickr library for PHP4.  It comes with some PEAR files but doesn&#8217;t really require you to have PEAR running on your server.</p>
<p>Below is a simple program to  search for pictures having a particular tag (as I&#8217;m supposed to do with my site) :<br />
<blockquote><span style="font-size:85%;"><br /><span style="font-family:courier new;">&lt;?</span><br /><span style="font-family:courier new;">require_once(&#8220;phpFlickr.php&#8221;);</span><br /><span style="font-family:courier new;">$f = new phpFlickr(&#8220;yourAPIkey&#8221;);</span><br /><span style="font-family:courier new;">$result = $f-&gt;photos_search(array(&#8216;tags&#8217;=&gt;&#8217;rio&#8217;));</span><br /><span style="font-family:courier new;">$photo = $result['photo'][0];</span><br /><span style="font-family:courier new;">$info = $f-&gt;photos_getInfo($photo['id']);</span><br /><span style="font-family:courier new;">print_r($info);</span><br /><span style="font-family:courier new;">?&gt;</span></span></p></blockquote>
<p><span style="font-size:85%;"><span style="font-family:courier new;"></span></span></p>
<p>What I&#8217;ll try to do now is to display the picture on my site.  This is not on the standard documentation and from searching the internet I came across this solution.  You should be able to access the picture from the Flickr site using a URL like this:</p>
<p><span style="font-size:85%;"><span style="font-family:courier new;"></span></span><br />
<blockquote><span style="font-size:85%;"><span style="font-family:courier new;">http://farm{farm_id}.static.flickr.com/{server-id}/{id}_{secret}.jpg</span></span>
<div style="text-align:center;">or</div>
<p><span style="font-size:85%;"><span style="font-family:courier new;">http://</span></span><span style="font-size:85%;"><span style="font-family:courier new;">farm{farm_id}.</span></span><span style="font-size:85%;"><span style="font-family:courier new;">static.flickr.com/{server-id}/{id}_{secret}_[mstb].jpg</span></span></p></blockquote>
<p>You&#8217;ll be able to get the farm_id, server-id, id and secret by executing the photos_getInfo which returns an array containing all info about about given picture_id. Using the code above we can add this line to display an image from Flickr:<br />
<blockquote><span style="font-size:85%;"><span style="font-family:courier new;">echo &#8220;&lt;img src=&#8217;http://farm{$info['farm']}.static.flickr.com/{$info['server']}/{$photo['id']}_{$info['secret']}_m.jpg&#8217;&gt;&#8221;;</span><br /></span></p></blockquote>
<p>You should now be able to display a picture from Flickr.  Have fun&#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/riobautista.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/riobautista.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/riobautista.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/riobautista.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/riobautista.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/riobautista.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/riobautista.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/riobautista.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/riobautista.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/riobautista.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/riobautista.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/riobautista.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=6&subd=riobautista&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://riobautista.wordpress.com/2008/01/10/integrating-flickr-into-my-php-web-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/97a7bb94662de14a463c07394511cdb0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">riobautista</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing CakePHP</title>
		<link>http://riobautista.wordpress.com/2008/01/08/installing-cakephp/</link>
		<comments>http://riobautista.wordpress.com/2008/01/08/installing-cakephp/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 09:00:00 +0000</pubDate>
		<dc:creator>Rio</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://riobautista.wordpress.com/2008/01/08/installing-cakephp/</guid>
		<description><![CDATA[I&#8217;m now setting up CakePHP for my PharmaSIS website.  I haven&#8217;t tried this before so I&#8217;m logging my every move:

Using Eclipse I checked out a copy of CakePHP from https://svn.cakephp.org/repo/trunk/cake/ and selected 1.2.x.x
I&#8217;m now trying to get the initial page running:

Added a virtual host to my Apache httpd.conf file:
&#60;virtualhost 80=""&#62;ServerName demo.PharmaSISDocumentRoot "c:/projects/cake/CakePHP12/app/webroot"DirectoryIndex index.php&#60;directory "c:/projects/cake/CakePHP12/app/webroot"&#62;AllowOverride [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=4&subd=riobautista&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m now setting up CakePHP for my PharmaSIS website.  I haven&#8217;t tried this before so I&#8217;m logging my every move:<span style="font-style:italic;"><span style="font-weight:bold;"><br /></span></span>
<ol>
<li>Using Eclipse I checked out a copy of CakePHP from https://svn.cakephp.org/repo/trunk/cake/ and selected 1.2.x.x</li>
<li>I&#8217;m now trying to get the initial page running:</li>
<ol>
<li>Added a virtual host to my Apache httpd.conf file:
<pre>&lt;virtualhost 80=""&gt;ServerName demo.PharmaSISDocumentRoot "c:/projects/cake/CakePHP12/app/webroot"DirectoryIndex index.php&lt;directory "c:/projects/cake/CakePHP12/app/webroot"&gt;AllowOverride AllAllow from All&lt;/directory&gt;&lt;/virtualhost&gt;</pre>
<p></li>
<li>Added an entry in my /etc/hosts:</li>
<ul>
<li>127.0.0.1   demo.PharmaSIS</li>
</ul>
</ol>
<li>Restarted Apache</li>
<li>Accessed http://demo.PharmaSIS and got to the default CakePHP page</li>
<ol>
<li>There&#8217;s this notice which I&#8217;ll try to figure out that says:<br /><span style="font-family:times new roman;font-size:85%;">&#8220;Notice (1024): Please change the value of &#8216;Security.salt&#8217; in app/config/core.php to a salt value specific to your application [CORE\cake\libs\debugger.php, line 535]&#8220;</span></li>
<li>Changed my security salt to some random string by edting app/config/core.php</li>
</ol>
<li>That removed the Security.salt notice but it&#8217;s now telling me I don&#8217;t have a database configuration file</li>
<ol>
<li>Renamed the database.php.default to database.php and edited the settings to:
<pre>class DATABASE_CONFIG {var $default = array( 'driver' =&gt; 'mssql', 'persistent' =&gt; false, 'host' =&gt; 'mssql12.mssqlserver', 'port' =&gt; '', 'login' =&gt; 'myusername', 'password' =&gt; 'mypassword', 'database' =&gt; 'thedatabasename', 'schema' =&gt; '', 'prefix' =&gt; '', 'encoding' =&gt; '');}</pre>
<p></li>
<p>
<li>I&#8217;m not able connect to the database.</li>
<li>Apparently, there&#8217;s nothing like a default port so I had to specify the port (using the MSSQL default 1433)</li>
</ol>
<li>The page is showing all green and seem to be correct.</li>
</ol>
<p>That ends the installation portion of this session.  Next thing I&#8217;ll do is probably to experiment on authentication.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/riobautista.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/riobautista.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/riobautista.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/riobautista.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/riobautista.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/riobautista.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/riobautista.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/riobautista.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/riobautista.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/riobautista.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/riobautista.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/riobautista.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=riobautista.wordpress.com&blog=2510599&post=4&subd=riobautista&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://riobautista.wordpress.com/2008/01/08/installing-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/97a7bb94662de14a463c07394511cdb0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">riobautista</media:title>
		</media:content>
	</item>
	</channel>
</rss>