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 18, 2008 at 11:37 am
· Filed under Rants, Sysadmin
Not so long ago I was asked to answer some questions for a friend of a friend who was writing a dissertation about the “hacking and warez scene” (which I have not been heavily involved in since I turned 18).
As I had known him for a long time, I felt obliged to help out, plus I was now interested in the questions that would be asked.
Based on what had been said I knew they were going to be questions on defining what a hacker is and what a hacker does, something i’ve been interested in defining for quite some time.
Here’s what I said…
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 26, 2008 at 10:05 pm
· Filed under Software, Windows
When watching long streaming online videos I often watch them while I do other things, perhaps even browse other websites. I need something to keep firefox on top!
The problem is the moment that I use another application the focus is taken away from the Firefox window and it goes into the background. This is no good as I can no longer see the video.
I decided to investigate a solution that could keep the Mozilla Firefox window “Always on Top”…
Read the rest of this entry »
Permalink
May 21, 2008 at 10:33 am
· Filed under IRC
Looking for someone? huh? Well, look no further, this script is designed to keep log of people quiting, parting, being kicked out of and changing their nick… It also tells you if they are still on IRC, on a different channel or such, its basically the easiest way to keep track of people. It can now also tell you when someone last spoke.
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 19, 2008 at 12:34 pm
· Filed under General
It’s about this time that geeks start to think about things to do over the summer.
Geek in the Park is a day-long event for geeks (mainly web developers) to have a get together.
The event is going to be held in Jephson Gardens, Leamington Spa, Warwickshire.
The Picnic during the day, followed by The Discussion in the evening. The event starts on Saturday at noon and everything should wrap up by around 11pm.
…and yes, I will be attending.
So, come see me at Geek in the Park on Saturday 9th August 2008. Put it in your diary!
I aim to get there around mid-day, but have been known to be fashionably late.
You’ll find me listed on both the Upcoming and Facebook event pages.
Don’t forget to visit the Geek in the Park website and add your email address to the announcements.
For those of you on IRC, you can visit #webdev @ EFnet to discuss it further.
See you there!
Permalink