Archive for LAMP

“It’s time for PHP 5!” says GoPHP5 initiative

Support GoPHP5.orgBecause slow adoption rate of PHP 5 especially among web hosting companies and developers, a number of open source projects and teams have put up an initiative called GoPHP5 to finally mark a due date to stop support PHP4 effective February 5th 2008. After the said date, any new releases of well known open source software will require at least PHP 5.2.0. Major web hosting companies have also agreed to include PHP 5.2.0 as part of their service offering. This is really a bold move and certainly will benefit developers and end-users. PHP4 has done a great job for quite a long time already. It is time to exploit the advanced capability of PHP5, besides PHP6 is just around the corner..

Comments

Defensive Programming Best Practices (in PHP)

Manuel Lemos of PHPClasses.org writes about his eight defensive programming best practices focusing on the context of PHP/web newsletter delivery system.

  1. Handle unexpected conditions
  2. Process external systems data properly
  3. Test your code
  4. Monitor your site errors and act upon them
  5. Do not disclose errors to the users
  6. Damage control
  7. Backup
  8. Do what you can as you can never get defensive enough

This is definitely worth everyone’s time. I highly recommend this for budding PHP developers as well as those with higher-level experience. By the way, you can vote for his post on digg.

Comments

How to tell Apache to process .htaccess files

I just need to write something about this since I’ve been a victim of configuration overload lately. While I was setting up a demo site for a client, I kept of wondering why the site is not functioning properly. All RewriteRule entries are being ignored by Apache.

The idea that Apache may not be allowing .htaccess didn’t come to my mind at first. I deliberately put in invalid characters inside the .htaccess file hoping that Apache would throw in some server error message but it did not! Then I remember the keyword AllowOverride None. Aparently, this is the default setting in Apache (so don’t mess with it!). I had to put a custom setting for a specific directory in order for .htaccess to work. Here is a sample configuration on how to allow .htaccess to specific directory (assuming your files are in /var/www/sitea).

<Directory /var/www/sitea>
AllowOverride All
</Directory>

AllowOverride can accept other values (except none) for fine-grain control. It can be embedded inside a <VirtualHost></VirtualHost> for specific needs (which I did) or just put it along with other global entries. Now .htaccess should work without a hitch!

This is only applicable to individual that has a superuser access to a system.

Comments

LAMP Development on Windows

tut vmware starting3

LAMP is an open source web development platform, a software stack, used together to run dynamic websites. The acronym LAMP stands for: Linux (L), Apache HTTP Server (A), MySQL (M), PHP or Perl or Python (P). The acronym was coined by Michael Kunze coined in an article for the German computing magazine.

I admit that the title kind of confusing and most people would say that running LAMP on Windows is impractical since there are packages that are specifically designed to run on Windows platform like XAMPP. However, I just feel that running XAMP puts a heavy load on work station. I tried it, for me it runs slow. Though it works, I still enjoy working on Linux commandline as most geeks are. I’m a LAMP specifically Linux fan (dual boot - Windows and Ubuntu ) but my work requires me to use Windows.

Read the rest of this entry »

Comments