WAMP + CodeIgniter + Sparks

I was recently decided to give the Get Sparks project a try. If you are not familiar with the Get Sparks project for Codeigniter, it allows you to download packages/modules for quickly installing into your app. Similar to the idea with PEAR extensions for PHP. I am setting this up on my Windows box using WAMP. I followed the setup instructions from the Get Sparks website, and everything went perfectly fine. I decided to download the popular spark “curl”, and kept getting the:

"You have to install PECL ZipArchive or `unzip` to install this spark."

I kept checking in my php.ini file that php_zip.dll was enabled.  Hmmm…..

So, I decided to create a test script to test the code that was creating this error message. Running the PHP script in the browser ran ZipArchive() successfully. Next, I ran this test PHP script from the command line (CLI). I got a “Fatal Error:  Class ZipArchive not found in …” error. I couldn’t quite figure out why PHP was throwing an error on the CLI and not when run in the browser. A little digging found that PHP run from the command line uses relative paths including php.ini. This the part where WAMP comes into play. For those using WAMP, your php.ini file that is used is located in C:\wamp\bin\apache\Apache2.2.11\bin not where PHP is being executed from. Ah ha! So I went and opened C:\wamp\bin\php\php5.2.9-2 and scrolled down to find:


So I changed this to:

php tools\spark install -v1.2.0 curl

Enabling php_zip.dll in the PHP folder of WAMP, and ran the Sparks command again. Success! The spark was downloaded, unzipped, and installed with no more error.

Setup WAMP and SVN Subversion on Windows

Say you work on a desktop and a laptop computer, and you synchronize your laptop. Edit some files, save, and upload. Everything is fine. Now you get home or back in the office, sit down at the desktop, and forget to synchronize. You edit the files some more, upload, and save. Uh-oh, now you lost the changes you made on your laptop. You’ll have to get a copy off the laptop, and find all the changes you made. Ever done this? Version Control makes this scenario so much easier to resolve.
Update (2010-09-29): I’ve recently moved onto using mercurial for any new projects. Please let me know if you have any issues with the newer SVN server installers. I haven’t had a chance to update mine to the latest version. However, this tutorial should still work.
Continue reading Setup WAMP and SVN Subversion on Windows