July 17, 2008 at 12:27 pm
· Filed under Apache, PHP, Sysadmin, cPanel
Today a user on one of my web servers asked me why .phps files would only download and not show the highlighted PHP code as expected.
This is usually done by adding the following to your “httpd.conf”…
AddType ‘application/x-httpd-php-source’ .phps
We use the cPanel web hosting control panel and to improve security cPanel recommend using suPHP, which allows PHP scripts to run as a user rather than “nobody”.
This means that adding the above line to “httpd.conf” does not work with suPHP.
So what can be done?
Read the rest of this entry »
Permalink
July 8, 2008 at 10:17 pm
· Filed under PHP
OpenCart is an open source PHP-based e-commerce online shop website solution. Ideal for new or existing stores to start selling online.
OpenCart all began because (at the time) the leading open source e-commerce solution out there was not very good, to say the least.
The first notable release was OpenCart v0.5 back in late 2006 and has been gaining momentum ever since.
The project is lead by Daniel Kerr, and I have also recently joined the team.
Download OpenCart v0.7.8
If you need any assistance with OpenCart, you can find me on the OpenCart Community Forums, and on the OpenCart Google Code project site.
Enjoy!
Permalink
June 25, 2008 at 11:52 pm
· Filed under Development, FreeBSD, Linux
I wanted to create a script that would convert a normal IP address to a long IP, just like mIRC Script’s $longip alias.
$longip(address)
Converts an IP address into a long value and vice-versa.
$longip(158.152.50.239) returns 2660774639
$longip(2660774639) returns 158.152.50.239
What I was originally trying to do was increase an IP by 1, but due to the octets only allowing up to 255, this became increasingly difficult to do.
What I decided to do in the end was convert the IP to a “longip” then increase it by 1, then convert the IP BACK to normal IP.
This required a way to convert an IP to and from longIP, I was told it could be done purely using shell script, here’s what I did…
Read the rest of this entry »
Permalink
June 16, 2008 at 12:02 pm
· Filed under Apache, Google, PHP, SEO
Turn dynamic URLs into friendly URLs
I’m sure we’re all familiar with URLs that look like this:
http://www.example.com/?nav=page
These type of URLs aren’t particularly “friendly”, inf act they are so ugly that even Google doesn’t like them!
Read the rest of this entry »
Permalink
June 3, 2008 at 4:31 pm
· Filed under Development, Email, PHP
With the on-going abuse to email based systems, we are in need of ways to validate the email addresses we’re handling.
We all know what an email address looks like, we see them and use them every single day. But how do you know if it’s valid or not? The next obvious question should be, what defines a valid email address?
This is what I intend on investigating.
Read the rest of this entry »
Permalink
May 20, 2008 at 5:51 pm
· Filed under PHP
After reading an article some time ago entitled “40 Tips for optimizing your php Code” (and some others that are suspiciously similar), I decided to redo it, but properly this time with more accurate tips, providing references and citations for each and every one.
The result is this list of over 50 PHP optimisation tips…
Enjoy!
Read the rest of this entry »
Permalink
May 16, 2008 at 12:40 pm
· Filed under Development, PHP
I wanted to prepare my wordpress powered blog for an influx of traffic from social media sites such as digg.com, in case one of my articles got big, so I decided to investigate what could be done to optimise the performance my blog.
This is the result…
Read the rest of this entry »
Permalink
April 22, 2008 at 1:48 pm
· Filed under Google, IRC, SEO
Recently Matt Cutts posted an article on his blog about Recording an IRC channel on Linux/Ubuntu.
However, as you can see his article was all about using the irssi IRC client on Linux/Ubuntu.
I decided that some people may wish to know how to do it on Windows.
Here’s how…
Read the rest of this entry »
Permalink
April 17, 2008 at 5:09 pm
· Filed under Rants, SEO
Today I received a phone call from one of my clients who said that they had a BT engineer with them. OK. I thought, what’s going on here…
They then proceeded to ask me “what do we rank for on google?”, my response was “your company name, unless you request otherwise”.
They then went on to mentioned that “the man from BT” can get us listed “at the top” of the search engine for “our keywords”.
Naturally I reply to this with a sigh, but how they can they go around making such statements? It’s so unethical to make these kind of claims.
After reading their marketing bumph, I found out what they meant by “at the top”. What they are offering is the ability to list as the “sponsored links” in search engines, which appear “at the top”.
They requested my email address to send me “further details” through, below is the marketing email I was sent. I couldn’t wait to pull it apart.
This isn’t at all a review of the BT Web Clicks service, in fact i’ve not used it, it’s simply an analysis of their marketing blurb.
Read the rest of this entry »
Permalink
April 17, 2008 at 11:02 am
· Filed under Google, Rants, SEO
Back in 2004, I signed up my old site “hm2k.org” to Google AdSense as an attempt to raise funds for my work.
It’s content was mainly made up of what I was researching around that time, including a few controversial topics such as hacking, trojans and warez distribution. (Oh the joys of being under 18, or at least I was at time of original creation).
Read the rest of this entry »
Permalink