Running Magento on Mac OS X

I recently formatted my MacBook and I chose to use PHP that comes with the operating system. This version comes with a few libraries installed, then you need to make some customizations.

First you must enable the PHP module in Apache, there are several tutorials talking about it on the web. A quick Google search brings some good results over this. So I will not talk about it here.

Once installed the PHP module in Apache and properly configured, you must compile some libraries from source.

First of all, you should make sure that you have Developer Tools installed. These software usually comes at an additional installation disc, along with your computer.

MySQL should be installed too. You can grab its installer from the official site.
Continue reading “Running Magento on Mac OS X”

Recursive chmod

Sometimes you need to change the access control to files matching some requirement. E.g. today I needed grant execute access to the owner of all PHP scripts running under Apache HTTP Server, in a specific directory.

Continue reading “Recursive chmod”

Writing an init script for a Java application

UPDATE, Oct, 1st 2014

This is an old post (from 5 years ago when I writing this update) and the solution isn’t the best. So take a look at the comments – specially that one by Tinoco.

The need make us study topics we think we’ll never need. Today I had to write a simple bash program to start (and stop) a Java application, a simple init script.

After much searching, I’ve found some simple explanations for some specific points of the bash script syntax.

I don’t know who is on the right side of this story, but seems that professionals who write manuals and tutorials for this language doesn’t think like common web programmers, such as Java or PHP programmers. I sought to much on Google to find things like how I could associate the returning value of a function to a variable.

But finally, I’ll leave aside the claims and move to example:

Continue reading “Writing an init script for a Java application”

Using Apache James to send e-mail from a Windows desktop

I use Windows at work and it doesn’t have sendmail program, like Linux or Mac. With Windows XP, there is the IIS built-in SMTP service. But, yet I use Apache Server and not IIS.

Until recently I had a hard time testing applications that send e-mails. But then I found the Apache James project. Despite some issues that I have with PHPMailer specific settings, it works just fine. Continue reading “Using Apache James to send e-mail from a Windows desktop”