Australian Made and Owned

Processing PHP Code in CSS files to Improve Productivity and Browser Cross-Compatibility (using Apache)

Posted 2010/02/26

It’s possible that you’re thinking, “Processing PHP in CSS? That’s plain stinks.,” just from reading the heading. It does stink, but so does maintaining two CSS files, updating your colour scheme manually (or even by sed), changing common dimensions, and all the other crap that goes with static files. Think about it this way – would you build a site out of many HTML files or would you use some kind of template system (like Pretty Smarties)? By now I hope you’re less sceptical. If you’re interested, please read on. (more…)

PHP – No such file or directory in Unknown on line 0 Error

Posted 2010/01/19

Ran XAMPP, tried to access the development virtual host for Kids On The Rise ( http://localhost:99 ) and got this:

Warning: Unknown([PATH HERE]): failed to open stream: No such file or directory in Unknown on line 0

Some other Fatal error came up but I forgot to copy it, sorry.

The error message is unhelpful but it was pretty easy to fix. I just deleted the .htaccess file from the root and tested. It worked! After restoring a backup of the .htaccess file everything worked. Hooray!

Filed under: PHP,Troubleshooting — Tags: , , , , — Tim @ 12:31

Check if Headers Have Already Been Sent in PHP

Posted 2009/07/22

Most PHP programmers would have come across this old chestnut before:
Cannot modify header information – headers already sent by page.php line 42

This can happen when you try doing a HTTP redirect or send HTTP 404, as it can happen whenever you try to send headers once they’ve already been sent. When a user sees this, they are basically left high and dry, often on a blank page. The solution is simple:
(more…)

Filed under: PHP,Troubleshooting — Tags: , , , , , — Tim @ 15:39

Pretty Smarties 0.5 – Pretty URLs, Smarty Templates and Faster Web Design

Posted 2009/06/07

Pretty Smarties

Pretty Smarties

This is the simple PHP template system which integrates Pretty URLs and Smarty Templates. The release is only two months later than I said, but I’ve made the release fairly decent. Here’s a rundown on the system: (more…)

Clean URLs Using Apache’s mod_rewrite and PHP – Beginner’s Tutorial

Posted 2008/02/10

In technology, there’s always the goal of making complex and difficult things more simple – this goal has brought about ‘clean URLs’. Clean URLs are website addresses that are easy for people (and also search engines) to read and understand. For example: An interesting article about the Bermuda Triangle might be at www.articles.com/article.php?id=23452 – That address tells us (and search engines) nothing about the article. Using a clean URL, the same article might be at www.articles.com/articles/bermuda-triangle - much easier, right? Well, here is how you can implement this on your website… (more…)

Filed under: PHP,SEO,Web Design — Tags: , , , , , , — Tim @ 15:39

Extract GET Variables from URL String to Array – PHP Function

Posted 2007/12/22

While making the YouTube Music in MySpace tool, I coudln’t find a function that reads an input URL then makes an array with the GET variable names and values. I needed this to get the video id from the YouTube video URL – so I made it, and now I’m sharing it. (more…)

Filed under: PHP — Tags: , , , , , , , — Tim @ 01:25