<?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>The Dev Pages &#187; General Dev</title>
	<atom:link href="http://www.n8williams.com/devblog/category/general_dev/feed" rel="self" type="application/rss+xml" />
	<link>http://www.n8williams.com/devblog</link>
	<description>A knowledge base for simple (and beyond) web applications development</description>
	<lastBuildDate>Fri, 21 May 2010 12:30:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP and MySQL setup on Mac OS X 10.5 Leopard</title>
		<link>http://www.n8williams.com/devblog/general_dev/php-and-mysql-setup-on-mac-os-x-leopard</link>
		<comments>http://www.n8williams.com/devblog/general_dev/php-and-mysql-setup-on-mac-os-x-leopard#comments</comments>
		<pubDate>Thu, 10 Sep 2009 23:45:45 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=91</guid>
		<description><![CDATA[Full fledged open-source MAMP development environment with php, mysql, and apache on Mac OS X 10.5 Leopard
Goal: A complete php development environment using Mac OS X 10.5 Leopard&#8217;s out of the box apache2/php install, and an install of the latest mysql and eclipse software with all the necessary plugins for php debugging. ALL 64-BIT! 
Admittedly, [...]]]></description>
			<content:encoded><![CDATA[<h2>Full fledged open-source MAMP development environment with php, mysql, and apache on Mac OS X 10.5 Leopard</h2>
<p><strong>Goal: A complete php development environment using Mac OS X 10.5 Leopard&#8217;s out of the box apache2/php install, and an install of the latest mysql and eclipse software with all the necessary plugins for php debugging. ALL 64-BIT! </strong></p>
<p>Admittedly, it was a challenge to get a fully functioning php dev environment up based on Mac OS X 10.5 Leopard&#8217;s configuration. But I succeeded in not installing a separate apache/php 32-bit install, or bailing out to use a linux Virtual Box.</p>
<h2>Enabling PHP</h2>
<h3>PHP5</h3>
<p>This one was pretty easy. Just uncomment out the line</p>
<p>#LoadModule php5_module        libexec/apache2/libphp5.so</p>
<p>in the httpd.conf apache config (/etc/apache2/httpd.conf) so it includes the php5 module that comes with the OS.</p>
<p>Make sure your extension_dir in php.ini points to /usr/lib/php5/extensions/no-debug-non-zts-20060613/ or go nuts and do your own extension directory. </p>
<h3>Debugging 64-bit</h3>
<p>This was one of the trickier things. You need to get an X-Debug extension setup. Hopefully you can just use my 64-bit extension file, and put that in your extensions directory (/usr/lib/php5/extensions/no-debug-non-zts-20060613/). Then add the zend_extension directive to the php.ini, along with the X-Debug settings, pointing to your (local or remote) host. In your php.ini:</p>
<div class="text-box">
<pre>
(left bracket)xdebug(right bracket)
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.remote_enable=true
xdebug.remote_host=natest.crimereports.com  ; if debugging on remote server, put client IP here
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
</pre>
</div>
<p><a title="xdebug extension" href="http://n8williams.com/misc/xdebug.so" target="_self">xbedug.so</a> (specific to 64-bit Mac OS X)</p>
<p>If that short version doesn&#8217;t work, you need to compile a 64-bit extension from the xdebug source, which was sort of tricky. You&#8217;ll need to get a compiler installed on your Mac OS if you haven&#8217;t got the right developer tools installed (XCode from the install disk or mac;s website), and then follow the instructions in this article.</p>
<p><a title="64-bit XDebug driver for php on Mac OS X 10.5" href="http://www.vividreflection.com/blog/installing-xdebug-on-macosx/" target="_blank">http://www.vividreflection.com/blog/installing-xdebug-on-macosx/</a><br />
<a title="64-bit XDebug driver for php on Mac OS X 10.5" href="http://www.designified.com/blog/article/60/compiling-installing-xdebug-for-php-525-entropych-build-on-os-x-105" target="_blank">http://www.designified.com/blog/article/60/compiling-installing-xdebug-for-php-525-entropych-build-on-os-x-105</a></p>
<h2>Installing MySQL</h2>
<p>Use the installer from MySQL&#8217;s site, and it goes pretty seamlessly. You may have to edit the php.ini to use the mysql server.</p>
<p>The tricky part of this is if you use a framework, or your code uses the pdo database interface. Again, you can try my 64-bit version, or compile your own pdo_mysql extension. Enable the extension in the php.ini by addin gthe line extension=pdo_mysql.so</p>
<p><a title="pdo_mysql extension" href="http://n8williams.com/misc/pdo_mysql.so" target="_self">pdo_mysql.so</a> (specific to 64-bit Mac OS X)</p>
<p><a title="pdo_mysql 64-bit for Mac OS X 10.5" href="http://www.hoboes.com/Mimsy/hacks/adding-pdo-mysql-mac-os-x-leopard-server/" target="_blank">http://www.hoboes.com/Mimsy/hacks/adding-pdo-mysql-mac-os-x-leopard-server/</a><br />
<a title="pdo_mysql issues" href="http://www.spiration.co.uk/post/1332/install%20PDO_MYSQL%20-%20mysql_config%20and%20header%20files%20problem" target="_blank">http://www.spiration.co.uk/post/1332/install%20PDO_MYSQL%20-%20mysql_config%20and%20header%20files%20problem</a></p>
<h2>Eclipse</h2>
<p>So there is a Cacao version that is 64-bit. I guess the difference here, as I&#8217;ve read online, is that the Carbon version is more stable, but also legacy and in the future will be deprecated soon.</p>
<p>I love using the update site to get plugins. That seemed to work best for PDT php, aptana, SVN (subclipse), and various editors, etc.</p>
<h2>Flex</h2>
<p>I sort of copped-out here when I learned the 64-bit version of eclipse doesn&#8217;t work well with Flex-Builder as an Eclipse plugin. I&#8217;m planning on installing the stand-alone version of flex builder, and using that separately (a little but resource wasteful, but far more convenient).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/php-and-mysql-setup-on-mac-os-x-leopard/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing an existing folder as a new Eclipse Project</title>
		<link>http://www.n8williams.com/devblog/general_dev/importing-an-existing-folder-as-a-new-eclipse-project</link>
		<comments>http://www.n8williams.com/devblog/general_dev/importing-an-existing-folder-as-a-new-eclipse-project#comments</comments>
		<pubDate>Mon, 31 Aug 2009 18:29:42 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=128</guid>
		<description><![CDATA[I absolutely hate the new project dialog in eclipse. It seems like each plugin (PHP, Flex, Aptana, SVN, etc.) has its own way of doing a new project.
Here&#8217;s one reason I hate these dialogs &#8211; If I want to add a new project into my workspace, I can&#8217;t put the files there first and then [...]]]></description>
			<content:encoded><![CDATA[<p>I absolutely hate the new project dialog in eclipse. It seems like each plugin (PHP, Flex, Aptana, SVN, etc.) has its own way of doing a new project.</p>
<p>Here&#8217;s one reason I hate these dialogs &#8211; If I want to add a new project into my workspace, I can&#8217;t put the files there first and then make it a project. Why would I want to do this? 1)I want to clone a git project from a remote repository into my workspace. Right now there is no way to do this with an add project dialog. So the files get to my workspace, but they don&#8217;t show up as a project. Same goes for SVN stuff where I want to re-add the files as a new project without having to check the whole stinking repository out again. Plus, it would be nice if I wanted to add files first, then make projects. Is that so hard? I understand eclipse doesn&#8217;t want to muck around in a folder with no project data to make a new project, but really, is it so hard to make a non-project folder a project folder? And if eclipse isn&#8217;t meant to do this, GET RID OF THE &#8216;Create project from existing source&#8217; option because it doesn&#8217;t work with many project types.</p>
<p>So here is a way I found that works swimmingly. I wonder if this came as an option with a plugin. If so, I am using PDT php, Aptana, Subclipse, and I think those are the main ones. If you don&#8217;t get this option in your menu, than who knows what plugin you may need. I&#8217;m just glad I got it to work for me.</p>
<p>SOLUTION: Screw the new project dialog. Do File-&gt;import then select the folder &#8216;Other&#8217;-&gt;Existing Folder as New Project. This works great for my goal of 1)having files in my workspace that are not a project in eclipse and then making that folder and all its files a new project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/importing-an-existing-folder-as-a-new-eclipse-project/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bash: git-receive-pack: command not found, git-upload-pack</title>
		<link>http://www.n8williams.com/devblog/general_dev/bash-git-receive-pack-command-not-found</link>
		<comments>http://www.n8williams.com/devblog/general_dev/bash-git-receive-pack-command-not-found#comments</comments>
		<pubDate>Sun, 30 Aug 2009 22:21:59 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=124</guid>
		<description><![CDATA[When doing a push to master I was getting
bash: git-upload-pack: command not found
bash: git-receive-pack: command not found
The skinny: The path on your remote machine is not correct, at least the path being used for non-interactive shell logins. Most likely, updating the .bashrc of the remote user, (the user in the command) will fix your problem. [...]]]></description>
			<content:encoded><![CDATA[<p>When doing a push to master I was getting</p>
<p>bash: git-upload-pack: command not found<br />
bash: git-receive-pack: command not found</p>
<p><strong>The skinny: </strong>The path on your remote machine is not correct, at least the path being used for non-interactive shell logins. Most likely, updating the .bashrc of the remote user, (the user in the command) will fix your problem. Note that nothing on the client side of things really matters except that you have git-core installed and you may save a path to git-upload-pack in your local git settings if you wanted to.</p>
<p>Hoo boy, I have updated this after a not-so-fun experience with bluehost, ssh, bash, and git. After getting my ass kicked for two hours, turns out that my hosting issued some ssh updates that made it so no .bashrc or .bash_profile settings were being used for setting the path on shell logins and commands. Very nice.</p>
<h3>Fix your path</h3>
<p>Key 1: Figure out where the binaries for git are on the remote system. On my lame-o shared server they were in /home/&lt;myusername&gt;/local/bin. The folder will have a bunch of programs, or at least git, gitk, git-shell, git-upload-pack, etc.<br />
Key 2: Make sure the path for your non-interactive shell login contains the folder where your git binaries are located. This following command, from the stackoverflow post, is awesome for seeing the &#8216;non-interactive shell&#8217; path. Matt Curtis is great. </p>
<p>ssh you@remotemachine echo \$PATH</p>
<p>So if the result of ssh you@remotemachine echo \$PATH does not contain the folder where your git binaries are located, this is the source of the problem.</p>
<p>On the remote machine, login to the user being used for the git command, and make sure the .bashrc file sets the path correctly. You may not even need to add anything, but if you are reading this post chances are you need to include</p>
<p>export PATH=$PATH:/&lt;pathtoyourgitbinaries&gt;</p>
<p>in your .bashrc.</p>
<p>For all of us who didn&#8217;t immediately grasp what a &#8216;non-interactive shell login&#8217; is, it goes as follows. When you login to a linux machine over ssh or at a desktop, this is an &#8216;interactive&#8217; shell session, and loads the settings for the shell from .bash_profile in the home folder of the user who us logged in.</p>
<p>If you are simply issuing commands without logging in (like git clone, ssh somecommand, etc., or I guess just opening a bunch of shells in an os) then you are using a &#8216;non-interactive&#8217; shell session. This will load settings from the .bashrc in the home folder of the user who us logged in.</p>
<p>A lot of times systems will have the .bash_profile call the .bashrc, so most relevant settings can go in the .bashrc.</p>
<p>But the difference in interactivity is why logging into an ssh session and doing echo $PATH will display a different path then issuing a non-interactive command like ssh you@remotemachine echo \$PATH.</p>
<h2>Alternately, explicitly state the path to the git-upload-pack binary</h2>
<p>If you can&#8217;t get the path settings in your (remote) .bashrc to work, you can tell git exactly where to look for the git-upload-pack binary. So bluehost users, or anyone else who has no control over the path setting for shells, you can explicitly use the &#8211;upload-pack option to explicitly set the path to the git-upload-pack binary you want. Example (Note that the upload-pack is an option with 2 hyphens -andanother- ):</p>
<p>git clone &#8211;upload-pack /home/&lt;username&gt;/bin/git-upload-pack &lt;username&gt;@&lt;yourdomain&gt;:/home/&lt;username&gt;/gitprojects/agitproject.git </p>
<p>If you have a git user for bare remote repos it will probably look like:</p>
<p>git clone &#8211;upload-pack /&lt;somepathtoyourgitbinaries&gt;/git-upload-pack git@&lt;yourdomain>:agitproject.git </p>
<p>You can also add the server paths to your local git config</p>
<p>receivepack = /home/&lt;myusername&gt;/local/bin/git-receive-pack<br />
uploadpack = /home/&lt;myusername&gt;/local/bin/git-upload-pack</p>
<p>where the config file is in the .git directory of my project on local. This line is under the entry for the remote I had set up called &#8216;origin&#8217; (use the path on the server where the git install is located and make sure git-receive-pack is in there on the server).</p>
<p>Bluehost users getting the git-upload-pack: command not found error, or similar command not found errors can see the explanation of why you can&#8217;t control your .bashrc at <a href="http://66.147.243.109/index.php/kb/article/000572" target="_blank">http://66.147.243.109/index.php/kb/article/000572</a></p>
<p>See <a title="remote get-receive-pack fix" href="http://stackoverflow.com/questions/225291/git-upload-pack-command-not-found-how-to-fix-this-correctly">http://stackoverflow.com/questions/225291/git-upload-pack-command-not-found-how-to-fix-this-correctly</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/bash-git-receive-pack-command-not-found/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>make[2]: execvp: Permission denied</title>
		<link>http://www.n8williams.com/devblog/general_dev/make2-execvp-permission-denied</link>
		<comments>http://www.n8williams.com/devblog/general_dev/make2-execvp-permission-denied#comments</comments>
		<pubDate>Sun, 30 Aug 2009 17:30:25 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=122</guid>
		<description><![CDATA[make[2]: execvp: true: Permission denied
You need to do chmod 755 true on the true script on your bin, For me I had followed the instructions at:
http://blogs.koolwal.net/2009/07/20/howto-installing-git-on-bluehost-domain-hosted-websites/
for installing git on bluehost. I had to make a script called &#8216;true&#8217;, and put it in my local bin to get git to compile.
make[2]: execvp: &#60;YOUR FILE HERE&#62;: Permission [...]]]></description>
			<content:encoded><![CDATA[<p>make[2]: execvp: true: Permission denied</p>
<p>You need to do chmod 755 true on the true script on your bin, For me I had followed the instructions at:</p>
<p><a title="install git on bluehost" href="http://blogs.koolwal.net/2009/07/20/howto-installing-git-on-bluehost-domain-hosted-websites/" target="_blank">http://blogs.koolwal.net/2009/07/20/howto-installing-git-on-bluehost-domain-hosted-websites/</a></p>
<p>for installing git on bluehost. I had to make a script called &#8216;true&#8217;, and put it in my local bin to get git to compile.</p>
<p>make[2]: execvp: &lt;YOUR FILE HERE&gt;: Permission denied</p>
<p>These errors mean that your script does not have execute rights. You can &#8216;chmod 755 &lt;YOUR FILE&gt;&#8217; and it should work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/make2-execvp-permission-denied/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using PEAR classes with bluehost php &#8211; Edit your include_path</title>
		<link>http://www.n8williams.com/devblog/general_dev/using-pear-classes-with-bluehost-php-edit-your-include_path</link>
		<comments>http://www.n8williams.com/devblog/general_dev/using-pear-classes-with-bluehost-php-edit-your-include_path#comments</comments>
		<pubDate>Mon, 24 Aug 2009 02:28:06 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=116</guid>
		<description><![CDATA[Getting an HTTP_Request class was pissing me off. So it seems like you can&#8217;t install PECL classes on your php install because of rights issues on a shared hosting environment.
BUT, you can get PEAR classes installed through the cPanel, using the PHP PEAR Packages link. I was adding the HTTP_Request package (HTTP_Request2 won&#8217;t install because [...]]]></description>
			<content:encoded><![CDATA[<p>Getting an HTTP_Request class was pissing me off. So it seems like you can&#8217;t install PECL classes on your php install because of rights issues on a shared hosting environment.</p>
<p>BUT, you can get PEAR classes installed through the cPanel, using the PHP PEAR Packages link. I was adding the HTTP_Request package (HTTP_Request2 won&#8217;t install because there is no stable release as of yet).</p>
<p>But even after the install, the classes could not be found. Like when I did require_once(&#8217;HTTP/Request.php&#8217;) I was getting the classic not found warning and error:</p>
<p><strong>Warning</strong>:  include(HTTP/Request.php) [function.include]: failed to open stream: No such file or directory<br />
<strong>Warning</strong>:  include() [function.include]: Failed opening &#8216;HTTP/Request.php&#8217; for inclusion<br />
<strong>Fatal error</strong>:  Class &#8216;HTTP_Request&#8217; not found</p>
<p>You have to edit the php.ini (or ini_set the include_path ) to include :/home/yourusername/php, or in my case the home directory is now home3 for some reason, with some weird aliasing allowing for home I think. The PEAR packages install to /home/yourusername/php, so this needs to be added to the include path.</p>
<p>If you still get:<br />
PHP Fatal error:  main(): Failed opening required &#8216;PEAR.php&#8217;<br />
Then your include_path may be missing :/usr/lib/php, this is the main (not your local user) php lib folder that, I think, has the main PEAR files (The ones that your local PEAR package installs like HTTP_Request will be calling). So when you install a PEAR package via the cPanel, it puts them in /home/yourusername/php, and those files will need to know about the main PEAR install in /usr/lib/php by having /usr/lib/php in the include path.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/using-pear-classes-with-bluehost-php-edit-your-include_path/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XML to HTML entities &#8211; Encoding XML document text for HTML</title>
		<link>http://www.n8williams.com/devblog/general_dev/xml-to-html-entities-encoding-xml-document-text-for-html</link>
		<comments>http://www.n8williams.com/devblog/general_dev/xml-to-html-entities-encoding-xml-document-text-for-html#comments</comments>
		<pubDate>Mon, 10 Aug 2009 17:40:40 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=97</guid>
		<description><![CDATA[private function XMLtoHTMLEntities($string){
	//get rid of any XML entity encoding that may have been applied (like in an RSS feed)
	$unXMLEntify = str_replace ( array ( '&#38;amp;' , '&#38;quot;', '&#38;apos;' , '&#38;lt;' , '&#38;gt;'), -&#62;
	array ( '&#38;', '"', "'", '&#60;', '&#62;') , $string );
		return htmlentities($unXMLEntify);
	}
]]></description>
			<content:encoded><![CDATA[<p><code>private function XMLtoHTMLEntities($string){<br />
	//get rid of any XML entity encoding that may have been applied (like in an RSS feed)<br />
	$unXMLEntify = str_replace ( array ( '&amp;amp;' , '&amp;quot;', '&amp;apos;' , '&amp;lt;' , '&amp;gt;'), -&gt;<br />
	array ( '&amp;', '"', "'", '&lt;', '&gt;') , $string );<br />
		return htmlentities($unXMLEntify);<br />
	}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/xml-to-html-entities-encoding-xml-document-text-for-html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>phpunit: command not found</title>
		<link>http://www.n8williams.com/devblog/general_dev/phpunit-command-not-found</link>
		<comments>http://www.n8williams.com/devblog/general_dev/phpunit-command-not-found#comments</comments>
		<pubDate>Wed, 05 Aug 2009 00:29:12 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=94</guid>
		<description><![CDATA[phpunit: command not found
Your phpunit file needs execute access and has to be in a &#8216;bin&#8217; folder (/usr/bin or usr/local/bin)
]]></description>
			<content:encoded><![CDATA[<p>phpunit: command not found</p>
<p>Your phpunit file needs execute access and has to be in a &#8216;bin&#8217; folder (/usr/bin or usr/local/bin)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/phpunit-command-not-found/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install the pdo myql drivers for php</title>
		<link>http://www.n8williams.com/devblog/general_dev/how-to-install-the-pdo-myql-drivers-for-php</link>
		<comments>http://www.n8williams.com/devblog/general_dev/how-to-install-the-pdo-myql-drivers-for-php#comments</comments>
		<pubDate>Mon, 03 Aug 2009 18:48:43 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=87</guid>
		<description><![CDATA[First install pdo.
I already had php 5 with the pdo extension included in the build. But I needed the mysql driver for the php extension since it only came with 2 (sqlLite, sqlLite2).
To add the mysql driver for pdo in your php install, put (pdo_mysql.so &#8211; you&#8217;ll have to compile this) in your extensions directory [...]]]></description>
			<content:encoded><![CDATA[<p>First install pdo.</p>
<p>I already had php 5 with the pdo extension included in the build. But I needed the mysql driver for the php extension since it only came with 2 (sqlLite, sqlLite2).</p>
<p>To add the mysql driver for pdo in your php install, put (pdo_mysql.so &#8211; you&#8217;ll have to compile this) in your extensions directory and then enable that extension in php.ini. WTF, pretty simple but there are no web pages with instructions. And compiling in Mac OS X sucks because you need to install extra Developer tools and than run the command line compile commands.</p>
<p>http://pecl.php.net/package/PDO_MYSQL</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/how-to-install-the-pdo-myql-drivers-for-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes on configuring Apache, PHP, and MySQL on Mac OS X 10.5</title>
		<link>http://www.n8williams.com/devblog/general_dev/notes-on-configuring-apache-php-and-mysql-on-mac-os-x-10-5</link>
		<comments>http://www.n8williams.com/devblog/general_dev/notes-on-configuring-apache-php-and-mysql-on-mac-os-x-10-5#comments</comments>
		<pubDate>Wed, 29 Jul 2009 20:14:17 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>
		<category><![CDATA[Mac Web Development]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=77</guid>
		<description><![CDATA[-When you setup additional folders outside of the &#8216;Sites&#8217; folder to serve files, they cannot be in a directory path where in higher up directory has restricted rights (you can&#8217;t serve files from anywhere in the &#8216;Documents&#8217; folder).
-If you add a virtual host, make sure the home directory/ doc root has a corresponding directory entry. [...]]]></description>
			<content:encoded><![CDATA[<p>-When you setup additional folders outside of the &#8216;Sites&#8217; folder to serve files, they cannot be in a directory path where in higher up directory has restricted rights (you can&#8217;t serve files from anywhere in the &#8216;Documents&#8217; folder).</p>
<p>-If you add a virtual host, make sure the home directory/ doc root has a corresponding directory entry. So the &lt;VirtualHost&gt;&#8217;s docroot needs to have a &lt;Directory&gt; to make it so the default apache settings for directories don&#8217;t deny the server access.</p>
<p>-When you uncomment the link to the virtual hosts file, make a vhost for localhost too.</p>
<p>-When you specify an error log output file for php, chmod it to be globally writable (so php can write to it).</p>
<p>-Eclipse in Mac OS X is funky (Ganymede) with the pdt plugin.</p>
<p>-The debugger module does not work for php unless you compile a 64-bit version of xdebug, which didn&#8217;t work easily.</p>
<p>-the zend_path or whatever sucks! This needs to point to the xdebug.so, this was not documented anywhere for mac os x. You have to move it to the weird extensions folder in usr/lib/php or edit the extension_dir, after you have compiled and put the xdebug.so in that location.</p>
<p>-The extension_dir should not be &#8216;./&#8217;, which just means current folder, but should point to &#8216;usr/lib/php/extensions&#8217; or something (by mem, update later)</p>
<p>-Updating the mysql values in php.ini is pretty straight forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/notes-on-configuring-apache-php-and-mysql-on-mac-os-x-10-5/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cruise Control and/or ANT out of memory error</title>
		<link>http://www.n8williams.com/devblog/flex/cruise-control-andor-ant-out-of-memory-error</link>
		<comments>http://www.n8williams.com/devblog/flex/cruise-control-andor-ant-out-of-memory-error#comments</comments>
		<pubDate>Thu, 05 Feb 2009 00:39:19 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[General Dev]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=62</guid>
		<description><![CDATA[When setting up a flex app auto build task, I started getting the following error consistently.
Error: null
java.lang.OutOfMemoryError
THE FIX, for me was: Add to ant.bat, antRun.bat
set ANT_OPTS=-Xmx512m
set ANT_OPTS=-Xms64m -Xmx512m
First I tried changing the Cruise Control memory settings in cruisecontrol.bat (CC_OPTS=-Xms256m -Xmx768m -Xmn256m).But I think it was less likely for the cruise control process to have memory [...]]]></description>
			<content:encoded><![CDATA[<p>When setting up a flex app auto build task, I started getting the following error consistently.</p>
<div class="text-box"><code>Error: null<br />
java.lang.OutOfMemoryError</code></div>
<p><strong>THE FIX, for me was: Add to ant.bat, antRun.bat</strong></p>
<div class="text-box"><strong><code>set ANT_OPTS=-Xmx512m<br />
set ANT_OPTS=-Xms64m -Xmx512m</code></strong></div>
<p>First I tried changing the Cruise Control memory settings in cruisecontrol.bat (CC_OPTS=-Xms256m -Xmx768m -Xmn256m).But I think it was less likely for the cruise control process to have memory issues than the ant tasks I was using (as Jeffrey pointed out before I could clean this up a bit &#8211; thanks). </p>
<p>I was noticing that the java.exe service that was handling the process would go up to 100 MB of memory usage, and then stop there, and then tank. The following article points out how to change the ant task memory settings. Because of the way cruise control was calling the ant task, it made it necessary to modify the the .bat files in the ant folder (You can use the <code>&lt;ant&gt;&lt;jvmarg&gt;</code>&#8230; tag, as per the links below, in some cases). Once the .bat&#8217;s had the ANT_OPTS memory settings in place, the process would use more memory and build the flex app. Nice.</p>
<p>Check out the following articles:</p>
<p><a href="http://confluence.public.thoughtworks.org/display/CC/OutOfMemoryError" target="_blank">http://confluence.public.thoughtworks.org/display/CC/OutOfMemoryError</a></p>
<p><a href="http://cruisecontrol.sourceforge.net/main/configxml.html#ant" target="_blank">http://cruisecontrol.sourceforge.net/main/configxml.html#ant</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/flex/cruise-control-andor-ant-out-of-memory-error/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
