Modify PHP CLI Include Path Dynamically

I was working with an application platform that I had just downloaded today. I just wanted to check it out and play with it a bit. In the application framework was an executable script that provided some command line utility. I fired up the script and received an error like “PHP Fatal error: require_once(): Failed opening required…”. Of course non of the files from the downloaded archived were in the include path for my system, but I didn’t want to just go adding it to my php.ini file just to play around with it short term. What to do.

Command Line Options

First I wanted to see if there was a command line option that I could pass to PHP to tell it what include_path to use for just this one execution. If you execute the following you’ll see the usage:
php --help
There is no include_path command line option, but there is the -d foo[=bar] option which allows us to modify any of the INI entries by key/value.

Read moreModify PHP CLI Include Path Dynamically

Cleaning Up HTML Code

I love (sarcastically) cleaning up other people’s HTML code. For instance I just found this little snippet.     So let me get this straight… in this table column you want a single space, formatted with”Arial, Helvetica, sans-serif” font of size 2. Then you want to follow that with another single space formatted with the …

Read moreCleaning Up HTML Code

Inserting A Picture Into Your WordPress RSS 2.0 Feed

I use NetVibes for my browser home page and RSS feed reader and I’ve noticed over time that some of the feeds that I subscribe to have pictures embedded within their feed summary. Why doesn’t my feed have a picture in it? I thought that this was really neat because it gives you a quick …

Read moreInserting A Picture Into Your WordPress RSS 2.0 Feed

Looping Through Pages In WordPress

In a recent article I outlined how to modify the output of the wp_list_pages() template function in WordPress. Later on, however, I found that having the <span> tags that I added in every single title was not desirable. So instead of using a filter I wrote a small bit of custom code to iterate through …

Read moreLooping Through Pages In WordPress

Writing A WordPress Filter To Modify Post/Page Titles

I was recently working on a new WordPress theme when I had need to modify the title of pages before output. The style I was attempting to use involved wrapping <span> tags around the title (inside of the href tags). The wp_list_pages() function returns pages (which are basically the same as posts) and has several …

Read moreWriting A WordPress Filter To Modify Post/Page Titles

How Can I Recover My Lost MySQL root Password?

Many people use the MySQL open source relational database server. Mostly for websites, but I’ve also seen it used elsewhere. One problem that I recently ran into with my local development installation is… “what was my root password again?” Aaaggghh! OK, sorry. Don’t panic; it can be recovered. A quick survey of the internet and …

Read moreHow Can I Recover My Lost MySQL root Password?

View Source Chart – A Firefox Extension

A couple of weeks ago I wrote an article titled Instant Source – Hacking Websites The Easy Way. It covered the Internet Explorer extension Instant Source, which allowed a much more informative view source functionality. I really liked this extension BUT being an IE only program I set out to find a Firefox alternative. View …

Read moreView Source Chart – A Firefox Extension

How Can I Extract And Convert Windows Icons For Free?

Have you ever wanted to develop a website that had some distinctly Windows characteristics to it? Have you ever wondered how you could get those nifty Explorer icons into a format you could use? Well, if you search on Google you’ll find plenty of tools that can do it all for you in one shot. …

Read moreHow Can I Extract And Convert Windows Icons For Free?

LyricWiki Search Widget Now Hosted On WordPress

LyricWiki is a free site which is a source where anyone can go to get reliable lyrics for any song from any artist without being hammered by invasive ads. The LyricWiki Search Widget is a WordPress plugin that provides a widget to place a search box right on the sidebar of your WordPress site so …

Read moreLyricWiki Search Widget Now Hosted On WordPress