PHP, MySQL, JavaScript, Windows 7, Linux
Apache / .htaccess
Optimize PHP, Apache & MySQL for performance
Jan 21st
Two MySQL tuner scripts
MySQLTuner (Perl) and MySQL Performance Tuning Primer (Shell) are two scripts that can help diagnose MySQL database performance issues, and provide recommendations on how to solve them. While both scripts output similar information, the diagnosis can be slightly different with each script, so I like to use both. Below are directions on how to use them, as well as a few screenshots.
# Download MySQLTuner and MySQL Performance Tuning Primer to ~/scripts. # To avoid having to invoke Perl/SH each time, make both files executable. chmod +x ~/scripts/mysqltuner.pl chmod +x ~/scripts/tuning-primer.sh # After that, give them a go! ~/scripts/mysqltuner.pl ~/scripts/tuning-primer.sh
PHP 5.2.11 released, fixing 75+ bugs
Sep 20th
Yet another PHP 5.2.xx release took place a few days ago, which brought us over 75 bug fixes, some security-related. If you are running any PHP 5.2.xx series release, make sure you apply this update. Full details on the PHP 5.2.11 release can be viewed at PHP.net. In addition, WHM/cPanel implemented this version of PHP in EasyApache, which updates smoothly. Now, if they would only get to implementing 5.3 already… =) Read the rest of this entry »
Setting up virtual hosts with Apache on Windows XP
Sep 13th
In this tutorial, we will discuss how to setup virtual hosts for your development environment (or production, if you wish) on Windows XP. This will allow you to use URLs such as http://mywebsite/ instead of http://localhost/mywebsite/, which is much more realistic. Read the rest of this entry »
Setting up tracd for multiple projects in Windows XP
Sep 11th
I have a few ongoing projects that I wanted to use Trac for, but I only had tracd setup for one project. Yesterday, I spent a very long time working with my local development environment trying to get mod_python work with Apache 2.2.13, which led me to ultimately abandon the module and use the lightweight, standalone server for Trac, tracd. Read the rest of this entry »
WordPress Security: Primer & Advanced Techniques
Sep 3rd
WordPress is the most widely used open source blogging software in the world. This didn’t happen overnight, and the developers over there have certainly earned their keep. With any web application, especially a heavily used one, there are security risks and precautions we must take. Without a security model and virtual barriers in place to protect us, it can be an all-out free-for-all for hackers. Read the rest of this entry »
How Zend Server CE breaks WordPress Permalinks and how to fix it
Aug 31st
Recently, I switched to Zend Server CE from a manually installed AMP package (Apache/MySQL/PHP) to make use of Zend’s lightweight environment and easy install package. In doing this, I found that it broke the permalinks associated with WordPress. Despite mod_rewrite being enabled, and the “Pretty Permalinks” code being in the .htaccess file, it still didn’t work.
To fix this problem do the following:
- Open up httpd.conf. (On Windows, the default location of this file is C:\Program Files\Zend\Apache2\conf\.)
- Find the line with <Directory />.
- Make sure +FollowSymLinks is present on the Options line. (i.e. Options +FollowSymLinks)
- Change AllowOverride None to AllowOverride All.
- Restart Apache.
AllowOverride controls how .htaccess files are used. When AllowOverride is set to None, users cannot override the configurations set in httpd.conf for particular directories. While the .htaccess in this client’s WordPress directory was correct, Apache wasn’t allowing it to override the default settings as stated in httpd.conf. It is definitely worth it to learn more about how to configure Apache so that you can have a secure and well-performing environment, especially if a lot of developers work on the same production server.
If you have similar experience, we would love to hear what you have to say. Perhaps it will save someone else a minute or even a few hours.
25+ Must-Have Cheat Sheets for Web Developers
Aug 30th
Who wants to go to Google or break out the library of programming books every single time you get stuck on something? Below is a compilation of extremely useful cheat sheets, which can be printed, laminated and placed nearby for easy reference while doing your web development and design. Everyone has moments where a function cannot be remembered, and that is where these cheat sheets can be lifesavers. Bookmark this page for an easy portal to all of the cheat sheets, or an individual page if you find it helpful. Please don’t hesitate to post any cheat sheets we neglected to include, for this is about sharing knowledge.
1. PHP
http://www.addedbytes.com/cheat-sheets/php-cheat-sheet/ Read the rest of this entry »

