I got Leopard (OS X) installed!!!!!

November 9, 2007 § Leave a comment

and then MySQL is broken… Damn…

There are quite a number of people giving suggestions on how to deal with this problem.

It turns out to be just permission problem. Below is what I did:

Fri Nov 09–at[~]–do–>sudo chown -R {my_username} /usr/local/mysql/data


Now I can start and stop MySQL via Preference Pane as usual.

Hopefully this help some readers who want to upgrade to OS X Leopard.


Zend Framework… (Part 1)

June 5, 2007 § 1 Comment

Is intriguing and disappointing (a bit) at the same time.


This is just part 1 of what’s going to be an ongoing reviews. I decided to do the review this way because I realize that 1-2 days is definitely not going to do the framework justice. The review would take weeks at the very least.

So, let’s talk about why it is intriguing:

It’s web development framework from the official PHP folks. Of course it’s gonna be great. There are lots of PHP developers who are excited with this very thought, me included. Granted I’m late in the party.

Zend framework finally reached version 1.0, it seems to be ready for prime time? Let’s give it a shot.

Reading at the manual and the source code a bit, everything is a component in Zend Framework. Awesome! It seems to have everything I need and more. Once I understand how the component gets called, I’m sure I can develop a component that’s also plug n play in CakePHP. One component to rule the web!

Lastly, My my my… The directory structure is very familiar. Reminds me of RoR and CakePHP… especially CakePHP.

Now let’s talk about what makes me iffy at first:

I swim in RoR, CakePHP style framework for quite some times now. Somehow, I’m starting to like to be hand-held. I know, i know, that sounds bad. Software developer must make their own tools! With their own conventions! and their own configurations! I’m a bad developer for wanting the tools to spoil me.

Ok, enough with the guilt trip. Zend Framework doesn’t force me anything. It seems that I would have to write my own index.php, initialize the Zend_Db or Zend_Cache myself. Not a big deal, I’ll just have to get used to the new mind set.

But that doesn’t mean Zend doesn’t have any conventions. From some tutorials I saw IndexAction function name inside Zend_Controller. That’s an interesting naming convention. Reminds me of Struts Action in JAVA world (Shivers…….).

But what would be the real kicker is:

How performant is it? I haven’t been able to find some data that shows the performance capacity of Zend Framework. If readers have some data, or personal experience with it, please share those to me 🙂

I have yet to see what it can deliver better than CakePHP. But! (This is a big But) This is just the first review. I have yet to complete an application with it.

Stay tuned. Second review will come after I created a blog engine with it and stress test it. That being said the second review would be about performance.

Battle against RoR: gem install mysql…

May 17, 2007 § 12 Comments

is simply broken. Broken as hell.

This is my development environment:

  • Mac OS X 10.4.9
  • MySQL 5.0 under /usr/local/mysql
  • gcc 4.0.1 or gcc 3.3
  • readline 5.2
  • ruby 1.8.5
  • rubygems 0.9.3
  • fcgi 2.4.0

Everything was installed properly except mysql binding.

1. This is the command I called to install that module:

sudo gem install mysql — –with-mysql-dir=/usr/local/mysql

2. Didn’t work. Next:

sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Chose MySQL 2.7 (ruby)

3. Works. But “rake migrate” didn’t work. Next:

4. Changed gcc from 4.0 to 3.3:

sudo gcc_select 3.3

5. Then ran:

sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Chose MySQL 2.7 (ruby)

6. Didn’t even compile. Tried MySQL 2.6 (ruby):

sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Chose MySQL 2.6 (ruby)

7. Didn’t even compile. Damn!

Google search revealed this. Damn! Why some configurations work for some people? What The Hell???

8. So, I changed gcc back 4.0:

sudo gcc_select 4.0

9. Uninstall gem mysql:

sudo gem uninstall mysql

Now, obviously, “rake migrate” works.

Conclusion: RoR 1, me? Big Fat 0.


References on how to install Ruby on Rails on Mac OS X

May 17, 2007 § Leave a comment

  1. http://hivelogic.com/narrative/articles/ruby_rails_lighttpd_mysql_tiger
  2. http://developer.apple.com/tools/rubyonrails.html
  3. http://locomotive.raaum.org/

Number 3 is interesting because it provide project containers to all of your Ruby on Rails application, but the 75 MB download is a bit too much though.

I cannot really add more insight to the installation process because RoR seems to be born inside Mac OS X. Installation is dead simple, documentations are plenty as well.

Apache & CherryPy Tutorial

May 16, 2007 § Leave a comment

I cannot write it better than his.

So, I’ll just include the original article here.


Other References:

Checklist when using Python for Web Development

May 16, 2007 § Leave a comment

  1. Download latest stable of Python (as of today version 2.5).
  2. Visit cheesecake for some module shopping.
  3. Before installing anything else, easy_install module is a must-have!
  4. If you are planning to use MySQL database, install module mysql-python.
  5. On top of MySQL,if you need ORM (Object Relational Mapper), download SqlAlchemy.
  6. If you are planning to do unit testing, install nose.
  7. If you need MVC Web framework you can either:
  8. If you are thinking of rolling your own architecture:
    • For getting up to speed in Web Server development, download CherryPy.
    • As you get large number of hits, you might be considering Lighttpd. To communicate CherryPy & Lighttpd, install scgi via: easy_install scgi.
    • If you need templating language for generating dynamic html, there are gazillion of them, I don’t know which one is good: Cheetah(PHP-alike), Kid(XML-ish), Genshi (XML + embedded Python), Mako (not XML), etc.

    Battle against LAMP (2): LAMP stack is…

    May 5, 2007 § 3 Comments

    LAMP STACK indeed.

    On Mac OS X:

    • apache 1.3/php4/mysql4.1 are default. Piece of cake. No big deal.
    • mysql5/apache2/php5 are giving me fits, but nothing I couldn’t handle. Piece of cake.
    • How about apache 1.3/php5/mysql4.1? Suddenly the STACK becomes somewhat a lot more difficult to configure. (apache 1.3/php4/mysql5 gives about the same annoyance).

    Why? Why is is so difficult to mashed old/new versions of LAMP? Some of the explanations I could come up with are:

    • In OS X, default LAMP configurations are located in funky places such as /private/etc/… That’s not very default compared to debian Linux.
    • /usr/sbin/apachectl is not symlink. Thus, finding the REAL apache 1.3 executable is not easy at all. Albeit finding httpd.conf was easy (Guess where? inside: /private/etc/…).
    • Of course, just to make life more difficult, apache 1.3 modules have to be placed here: /usr/libexec/httpd/…
    • Console.app is great, very useful. But it only keeps default logs. (e.g. apache 1.3 access_log located under /private/etc/…). If you want to see apache2 error log, create symlink that replace default log file.

    Besides configuration, more griefs are coming almost immediately:

    • Why libphp5.so is not compatible to apache 1.3? that’s just pure WTF. Or maybe… There’s different libphp5.so for different Apache version?
    • Soon after, Apache2 gives me this error: LoadModule mod_rewrite is default, thus cannot be loaded.

    Default my ASS, if I have to specify ./configure –enable-rewrite then it’s not default configuration. At least it was an easy fix, simply commented out LoadModule mod_rewrite.

    As I thought I have won the war, WHAM!!!!

    Permission denied: couldn't grab the accept mutex

    What the… Apparently Apache 2 for Mac OS X doesn’t like listening to more than 1 port. Adding this on my httpd.conf fix the problem:

    AcceptMutex flock

    Done. What else you got punk!?! Seems like I managed to silenced Apache2 once and for all.

    Victory, is mine…..

    Where Am I?

    You are currently browsing the install category at RAPD.