<?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>Wylie &#187; PHP</title>
	<atom:link href="http://www.wyliethomas.com/blog/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wyliethomas.com/blog</link>
	<description>web consultant.developer.angler</description>
	<lastBuildDate>Wed, 07 Dec 2011 18:14:48 +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>Caught between PHP and Ruby</title>
		<link>http://www.wyliethomas.com/blog/2009/08/26/caught-between-php-and-rails/</link>
		<comments>http://www.wyliethomas.com/blog/2009/08/26/caught-between-php-and-rails/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 03:58:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.wyliethomas.com/blog/2009/08/26/caught-between-php-and-rails/</guid>
		<description><![CDATA[Am I a PHP Developer? Am I a Ruby Developer? How about, I am a Web Developer.
This is something I have been discussing with various co-workers for some time. Learning Rails over the last couple of years, and now finally having more opportunites to use Rails I find that I have taken a similar path [...]]]></description>
			<content:encoded><![CDATA[<p>Am I a PHP Developer? Am I a Ruby Developer? How about, I am a Web Developer.</p>
<p>This is something I have been discussing with various co-workers for some time. Learning Rails over the last couple of years, and now finally having more opportunites to use Rails I find that I have taken a similar path that Derek Sivers outlines in this article (<a href="http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html">http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html)</a>, but I dont see myself abandoning Rails or PHP. I enjoy working in both and they both have their strengths and weaknesses.</p>
<p>I read something on another blog recently that has stuck with me. It read, &#8220;If the only tool in your toolbox is a hammer, everything looks like a nail&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wyliethomas.com/blog/2009/08/26/caught-between-php-and-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Re-compiling PHP 5 for OS X</title>
		<link>http://www.wyliethomas.com/blog/2009/06/09/compiling-php-5-for-os-x/</link>
		<comments>http://www.wyliethomas.com/blog/2009/06/09/compiling-php-5-for-os-x/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 20:23:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[PHP 5]]></category>

		<guid isPermaLink="false">http://www.wyliethomas.com/blog/2009/06/09/compiling-php-5-for-os-x/</guid>
		<description><![CDATA[This post is intended as a simple reminder for me to help me remember what I did when setting up a new PHP environment&#8230; help yourself to my notes, but you&#8217;re on your own if it breaks your server.
Here is a breakdown of what to install in what order&#8230; jpeg6, gd, libpng, mcrypt, mhash
Build the [...]]]></description>
			<content:encoded><![CDATA[<p>This post is intended as a simple reminder for me to help me remember what I did when setting up a new PHP environment&#8230; help yourself to my notes, but you&#8217;re on your own if it breaks your server.</p>
<p>Here is a breakdown of what to install in what order&#8230; jpeg6, gd, libpng, mcrypt, mhash</p>
<p>Build the jpeg6 lib first- ftp://ftp.uu.net/graphics/jpeg/</p>
<p>I put the tar files in ~/_bin then I unpacked it with</p>
<p>tar -zxf [tarfile]</p>
<p>then moved the dir to /usr/local/php. Then CD into that dir and do the following:</p>
<p><code>cp /usr/share/libtool/config.sub .<br />
cp /usr/share/libtool/config.guess .<br />
./configure --enable-shared<br />
make<br />
sudo make install</code></p>
<p>Then you should recompile GD so it will see the new jpg6. Same thing, download GD to the ~/bin and untar it and move the dir to /usr/local/php.</p>
<p><code>./configure</code></p>
<p>You should see something like this:</p>
<p><code>Support for PNG library:          yes<br />
Support for JPEG library:         yes<br />
Support for Freetype 2.x library: yes<br />
Support for Fontconfig library:   yes<br />
Support for Xpm library:          yes<br />
Support for pthreads:             yes</code></p>
<p>Then do this:<br />
<code>make<br />
sudo make install</code>l</p>
<p>Now you will need libpng (http://www.libpng.org/pub/png/libpng.html). Untar it and move it to /usr/local/php</p>
<p><code>./configure<br />
make<br />
sudo make install</code></p>
<p>Now you need freetype and xpm&#8230; Im not going to try and figure out fonts so since fonts are already on the system you can use them this way in the config for php in just a few minutes.</p>
<p>&#8211;with-freetype-dir=/usr/X11R6 \<br />
&#8211;with-xpm-dir=/usr/X11R6 \</p>
<p>Now for mcrypt and mhash. Go here and download the latest version of mcrypt ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/.  Same as the others, untar them and move them to /usr/local/php. CD into that dir then</p>
<p><code>./configure<br />
make<br />
sudo make install</code></p>
<p>And finally mhash. Go here and download it. http://sourceforge.net/project/showfiles.php?group_id=4286. Again, untar it and move it to /usr/local/php then</p>
<p><code>./configure<br />
make<br />
sudo make install</code></p>
<p>Now you are finally ready to compile PHP.</p>
<p><code>./configure --with-prefix=/usr \<br />
--with-mandir=/usr/share/man \<br />
--with-infodir=/usr/share/info \<br />
--with-disable-dependency-tracking \<br />
--with-apxs2=/usr/sbin/apxs \<br />
--with-ldap=/usr \<br />
--with-kerberos=/usr \<br />
--with-enable-cli \<br />
--with-gd \<br />
--with-freetype-dir=/usr/X11R6 \<br />
--with-xpm-dir=/usr/X11R6 \<br />
--with-png-dir=/usr/local/lib \<br />
--with-jpeg-dir=/usr/local/bin \<br />
--with-tiff-dir=/usr \<br />
--with-zlib-dir=/usr \<br />
--with-enable-trans-sid \<br />
--with-xml \<br />
--with-enable-exif \<br />
--with-enable-ftp \<br />
--with-enable-mbstring \<br />
--with-enable-mbregex \<br />
--with-enable-dbx \<br />
--with-enable-dbase \<br />
--with-enable-trans-sid \<br />
--with-enable-sockets \<br />
--with-enable-wddx \<br />
--with-enable-bcmath \<br />
--with-iodbc=/usr \<br />
--with-curl=/usr \<br />
--with-config-file-path=/etc \<br />
--with-sysconfdir=/private/etc \<br />
--with-mysqli=/usr/local/mysql/bin/mysql_config \<br />
--with-mysql=/usr/local/mysql \<br />
--with-pdo_mysql=/usr/local/mysql \<br />
--with-openssl \<br />
--with-xmlrpc \<br />
--with-xsl=/usr \<br />
--with-mcal=/usr/local/php \<br />
--with-mcrypt=/usr/local/lib \<br />
--with-mhash=/usr/local/lib \<br />
--with-mime-magic \<br />
--with-pear</code></p>
<p>I was able to run make fine, but when running make test I got an error&#8230;. After alot of digging around, I found this helpful post at php.net.</p>
<p>&#8220;After screwing around for an hour and screaming many profanities at my computer I looked back at the error and noticed:</p>
<p>/usr/local/mysql/lib/&lt;b&gt;mysql/&lt;/b&gt;libmysqlclient.15.dylib</p>
<p>Why it was using this path I do not know, but I headslapped when I realised how simple it was! I solved the problem by creating a link called mysql that linked back on itself:</p>
<p>cd /usr/local/mysql/lib<br />
sudo ln -s ./ mysql</p>
<p>Problem solved! I probably should have figured out why it was doing this instead, but this was easier and saved me from allot more frustration.&#8221;</p>
<p>This worked for me as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wyliethomas.com/blog/2009/06/09/compiling-php-5-for-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PayPal API from GoDaddy</title>
		<link>http://www.wyliethomas.com/blog/2008/05/20/paypal-api-from-godaddy/</link>
		<comments>http://www.wyliethomas.com/blog/2008/05/20/paypal-api-from-godaddy/#comments</comments>
		<pubDate>Wed, 21 May 2008 06:31:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PayPal]]></category>

		<guid isPermaLink="false">http://www.wyliethomas.com/2008/05/20/paypal-api-from-godaddy/</guid>
		<description><![CDATA[The PHP SDK form PayPal worked great from my dev server but when I went to load it for the client it either completely stalled or timed out. I learned that GoDaddy has a special proxy server you need to use for the cURL option.

$URL="https://api-3t.sandbox.paypal.com/nvp";
if (isset($_GET["site"])) { $URL = $_GET["site"]; }
$ch = curl_init();
//echo "URL = [...]]]></description>
			<content:encoded><![CDATA[<p>The PHP SDK form PayPal worked great from my dev server but when I went to load it for the client it either completely stalled or timed out. I learned that GoDaddy has a special proxy server you need to use for the cURL option.</p>
<pre>
$URL="https://api-3t.sandbox.paypal.com/nvp";
if (isset($_GET["site"])) { $URL = $_GET["site"]; }
$ch = curl_init();
//echo "URL = $URL &lt;br&gt;n";
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt($ch, CURLOPT_PROXY,"http://proxy.shr.secureserver.net:3128");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_URL, $URL);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$nvpreq="METHOD=".urlencode('doDirectPayment')."&amp;VERSION=".urlencode('3.0')."&amp;PWD=".urlencode('yourpass')."&amp;USER=".urlencode('your username)."&amp;SIGNATURE=".urlencode('your signature').$nvpStr;

//setting the nvpreq as POST FIELD to curl
curl_setopt($ch,CURLOPT_POSTFIELDS,$nvpreq);

$response = curl_exec ($ch);</pre>
<p>This worked fine for me so i re-created the PayPal Class from their sample code and modified to work with this cURL setting.</p>
<p>Hope it saves you the time I lost.</p>
<p><a href="http://www.wyliethomas.com/lab/paypalgatewaygodaddy.php.zip">PayPal GoDaddy Class</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wyliethomas.com/blog/2008/05/20/paypal-api-from-godaddy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

