Archive for PHP

Using Your Own URL as Your OpenID with WordPress

Today I decided to join stackoverflow.com, which requires you to login using OpenID.

It was pretty simple to get signed up with myopenid.com, but while I was on the stackoverflow login page I noticed a little message which I found interesting: Read the rest of this entry »

Comments

Cannot redeclare pclziputilpathreduction()

I had this issue today, I found that you need to deactivate the “Wordpress Automatic Upgrade” plugin as it’s included in the core of Wordpress now anyway.

So, just disable the plugin and try again.

Read the rest of this entry »

Comments

OpenCart v0.7.9 released

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.

Read the rest of this entry »

Comments

PHP getmxrr() support for windows

As many of you may be aware there’s a lack of getmxrr() support in Windows, which dates back as far as 1999.

It’s not a major problem for me as an individual because I never use WIN32 PHP in production, but for development and for the purpose of wide distribution it can raise an issue.

Apparently the lack of support in win32 is due to the lack of “res_search” in “bindlib_w32″, I’m surprised this hasn’t been fixed already.

The official PHP.net documentation for the getmxrr() function states:

Note: This function is not implemented on Windows platforms. Try the » PEAR class » Net_DNS.

However, there are problems with this suggestion…

Read the rest of this entry »

Comments (2)

PHPizabi – creating a dating site

During the summer of 2007 I decided to purchase a new domain name with a dating theme.

The idea was to start a dating website. Although a fairly saturated market place, I figured it’d be another one to add to my profile.

Read the rest of this entry »

Comments (6)

For VS While in PHP

Today I was coding a new PHP script, when I asked myself “should I use for or while?”…

It’s a question I thought I should know the answer to after I spent a very long time researching 50+ PHP optimisation tips.

One I hadn’t mastered was whether the for() function was faster than while() function, as both can be used for most types of looping.

Read the rest of this entry »

Comments

suPHP and .phps PHP code highlighting support

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 »

Comments (2)

Friendly URLs (revisited)

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”, they are known as dynamic URLs. As a rule of thumb search engines such as Google don’t like them as much as “static URLs”.

However, Google has recently released an article on this very subject entitled Dynamic URLs vs. static URLs, I recommend you give it a read so you fully understand what we’re talking about.

Read the rest of this entry »

Comments (3)

What is a valid email address?

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 »

Comments (9)

50+ PHP optimisation tips revisited

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…

Update: The list is more like 50+ PHP tips and tricks these days.

Enjoy!

Read the rest of this entry »

Comments (10)

« Previous entries Next Page » Next Page »