RSS

Monthly Archives: April 2010

How to show PHP errors in your website scripts using .htaccess

Most web servers are configured to disable the display of php errors on every website for security reasons. This means, whenever you upload a PHP script that contains errors you will be greeted with a rather useless blank page.

There are a number of elegant solutions you can use to resolve this problem. One, for example, is adding display_errors to the top of your PHP file that contains errors.

But I am too lazy to deal with that on a script-by-script basis. What I prefer to do is create an .htaccess file on the site I am working that is configured to spit out every PHP error that occurs in every script on my site.

All that’s needed is to paste the following two lines to the top of a .htaccess file in the web root directory of your website:

php_flag display_errors on
php_value error_reporting 8191

It’s important to remember to disable these errors when you have finished working on your site. I do this by simply hashing out the two lines in the top of my .htaccess file as follows:

# php_flag display_errors on
# php_value error_reporting 8191

Now whenever I need to look at PHP errors again, I simply remove the hashes and the information is presented to me.

It should be noted the information revealed in these errors can contain information that can be potentially useful to hackers and crackers. So you should really only be enabling these errors on a password protected website.

 
Leave a comment

Posted by on April 25, 2010 in Web Development

 

How to store more music on your iPhone or iPod touch

Making the most of the storage space available to you on your iPhone or iPod just got a whole lot easier thanks to a nifty iTunes software update from Apple. If you are, as I was, running low on free space on your iPhone or iPod touch, this news should be music to your ears.

Using this method I will describe, I freed 8.5gb of storage space previously occupied by my large library of music synced to my iPhone. No music was lost. There was no real noticeable deterioration in the quality of sound coming from my earphones. The process did take 9 hours to complete, but it was well worth the wait in my mind!

Read the rest of this entry »

 
1 Comment

Posted by on April 5, 2010 in iTunes

 

How to format hard drive to FAT32 filesystem inside Windows 7 64 bit

The option to format internal and external hard drives to the FAT 32 filesystem is not available to you from within the Graphical User Interface in Windows Vista/Windows 7 64 Bit Editions. If you wish to make data available to operating systems or applications that cannot properly read or write to NTFS partitions, this can pose something of a problem for you. Thankfully there is a relatively easy command prompt solution you can use to solve this little problem.

To perform this format successfully, you need to launch Command Prompt with Administrator permissions before executing the command.

Read the rest of this entry »

 
5 Comments

Posted by on April 5, 2010 in Windows 7

 
 
Follow

Get every new post delivered to your Inbox.