May 19, 10 by
Andrew Vayanis
Need help installing PHP extensions for OS X 10.6 (Snow Leopard) using MAMP and the included pecl binary? Well, you have come to the right place. If you have tried this on its own, you will notice that none of the extensions pecl builds will work with MAMP. This is because MAMP is compiled as a 32-bit binary whereas pecl tries to build 64-bit PHP extensions.
To get pecl working properly, make sure you have Xcode installed on you machine. Next, you will need to get a copy of MAMP’s source and prepare it using 32-bit compile flags. You can download the MAMP source from the MAMP download page. Running the .dmg should extract the source. After extracting the source run the following:
Read the rest of this entry →
February 10, 10 by
Andrew Vayanis
I recently ran into a java.lang.OutOfMemoryError exception after moving a Tomcat Web Application from a 32-bit system to a 64-bit system. Not being able to give the JVM more memory, I decided to install a 32-bit JDK on the machine. Getting a 32-bit Tomcat install working on a 64-bit system gave me a bit of trouble, so I decided to write this article.
Installing a 32-bit JDK is very easy. First, download the right package from the sun download site: http://java.sun.com/javase/downloads/index.jsp and extract it. To extract the .bin file, you need need to make sure to make the .bin file executable. After that, you can run the file and it should extract itself to the current directory. You can now use the JDK by referencing it directly or by setting it as an alternative using the appropriate instructions. For the purpose of this article however, we don’t need to get into that. Next, you will need to update your start/stop scripts to take advantage of the new JDK.
Read the rest of this entry →
February 04, 10 by
Andrew Vayanis
As a weekend project I decided to set up a LAML, (Linux, Apache, MySQL, Lua) stack on my computer. I never worked with Lua before, but I figured it wouldn’t be too hard to get it working with my MAMP setup. Getting started, I spent some time reading any articles I could find on the web that talked about setting up or using using Lua for web development. I quickly ran into the Kepler Project which as their website points out:
is an open source platform that brings the power of Lua to web development
While this was my goal, I wanted to start from scratch since I haven’t had any experience with the language and didn’t want to learn it on a specific platform just yet. So, I went on to figure out how to install and configure Lua with MAMP. To accomplish this yourself, you will need: Xcode, MAMP, Lua, LuaRocks, MAMP source, and mod_fcgid.
Read the rest of this entry →
March 20, 09 by
Andrew Vayanis
Edit: I originally started working on this article several months ago, however, as I was editing it, the Zend Framework team released a revamped reference guide that goes through much of what I discuss. Hopefully though, this still ends up being useful and informative for someone out there.
Edit #2: I don’t mean for this article to be followed verbatim, but rather, used as a guide to understanding Zend Framework’s routing process.
Now that I am using ZF for current projects at work, I have taken the opportunity to promote ZF with my colleagues. One colleague in particular, who has been using Code Igniter(CI), was somewhat perplexed by ZF’s seeming complexity, even after reading through the first few sections of the Reference Guide. In particular, he didn’t understand how ZF handled URIs as it is quite different from CI. So, I have put together the following, hopefully simple overview, explaining a bit about ZF’s routing and using it in conjunction with Zend_Config.
Read the rest of this entry →
March 26, 08 by
Andrew Vayanis
I recently published an article trying to shed some light on the Zend_Form component, in particular, when using it with Zend_Config_Ini. In the article I presented a config I developed while trying to learn Zend_Form myself, but unfortunately realized that using generic elementDecorators comes with a price.
Read the rest of this entry →
March 17, 08 by
Andrew Vayanis
In my previous post Zend Framework, A First Look, I discussed the lacking nature of ZF’s documentation, in particular, with regards to Zend_Form. I have since then learned that this is partly due to the fact that Zend_Form is a relatively new component. However, I still wanted to make use of Zend_Form in my current project and decided to trudge through the learning curve of creating a simple custom login form in conjunction with Zend_Config; the end result being an easy to maintain, custom form and this guide. Hopefully, this guide will make it easier for anyone else looking to take advantage of this very cool feature.
Read the rest of this entry →
March 14, 08 by
Andrew Vayanis
Having used Code Igniter for some small projects at work, I recently decided to take the time to acquaint myself with the Zend Framework(ZF) so that I could build my own comparison between two of the most, in my opinion, developed and used PHP frameworks. While I love the flexibility and functionality offered by ZF, I have become very frustrated and annoyed with some of their documentation. Even though it is detailed and expansive, it is no where near complete and somewhat frustrating to use.
Read the rest of this entry →
August 28, 07 by
Andrew Vayanis
I recently found myself writing a REST web service, which, in my opinion, is the easiest way to create a web service, for a project at work. Using XML.com’s How to Create a REST protocol as my Guide, I went to work. However, when I tried to create a service to update some data, I wasn’t sure how to send my data in a POST request using PHP. After some stumbling around, I found what I was looking for on Wez Furlong’s blog which led me to PHP’s documentation on HTTP and HTTPS wrappers.
The following is a code snippet from the HTTP and HTTPS documentation that shows how to easily send data using HTTP POST:
Read the rest of this entry →
August 14, 07 by
Andrew Vayanis
After another week of configuring this site, I have found another gap in functionality that I would like to have for my Wordpress installation. Namely, the ability to integrate or centralize my site’s external services. For this reason, I have started my first Wordpress plugin, Command Center, as a way to give myself and of course, anyone else who shares this need, a way to integrate certain external resources into their own Wordpess control panel. This plugin is still far from being mature, but I think it is at least stable and usable as a way to store, access, and manage a list of links.
Read the rest of this entry →
August 09, 07 by
Andrew Vayanis
Wordpress has really come a long way since I first started using it back when it was version 1.0. It now has a nice clean admin interface (although I am currently using the tiger style admin), a clean and simple installation script, and my new favorites, dynamic sidebars and widgets. However, I noticed that the default links widget creates invalid XHTML markup. After a few minutes of looking through the XHTML and widgets.php file, I realized that the culprit was in fact a core wordpress bug. Currently, wordpress creates widgets with the following code:
'before_widget' => '<li id="%1$s" class="widget %2$s">',</li>
Read the rest of this entry →