RSS

Category Archives: Web Development

How to disable all vBulletin plugins via PHP config file

Occasionally, when things go crazy in the vBulletin admincp backend, you may need to disable the plugin system using the config.php file. Just place the following code below <?php inside includes/config.php:

define(‘DISABLE_HOOKS’, true);

All plugins will now cease to execute until after you disable the line in your config file.

 
Leave a comment

Posted by on May 17, 2012 in Web Development

 

Tags: , ,

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

 
 
Follow

Get every new post delivered to your Inbox.