PHP Include Paths By Virtual Host
While splitting apart a website into discreet applications, I moved all the shared code to its own folder. While that isn’t a hard thing to do, what does one do in a development environment where the shared files might be undergoing changes that you don’t want other environments to see?
Set a custom include path!
In each of my Virtual Host sections, I added the following line:
php_value include_path '/path/to/my/include'
With a restart of Apache, each environment now looks to its own custom include folder.
Shell Scripting: Part 2
Today brought more advanced shell scripting as I wrangled with administering users on the new site. This brought me in contact with learning Sed and Awk, as well as some more complicated bash tutorials.
So far I’m finding shell scripting an easy, yet powerful, mechanism for automating web site administration. I’m currently writing a mini-tutorial on what I’m setting up, in case anyone else is interested in creating a development system for web design on their own server.
Sed and Awk Micro-Primer - http://www.faqs.org/docs/abs/HTML/sedawk.html
Advanced Bash-Scripting Guide - http://tldp.org/LDP/abs/html/
Spice Up Your Shell Prompt
Ever log into a box, or install a new distro, only to find that the prompt is either just a # or it only provides very minimalistic information? Well, it’s easy to change the look of the command prompt by editing the ~/.profile or other appropriate file.
Speed up PHP with APC
A downside to any scripted language is that it is recompiled every time that it is run. CPU cycles are wasted compiling both simple and complicated scripts over and over, regardless if the actual output even changes. What can you do to stop this kind of waste? If you are using PHP, there are quite a few caching mechanisms. I spent most of today trying to get a few of them to work with OpenBSD 4.1 with very little success. One that I did get working was APC.


