Tag Archives: htaccess

Debugging with Krumo

Some websites do not require advanced debugging with an IDE. If you just want to know the value of a variable without having to step through a site, Krumo may be for you.

The easiest way I have found to add the Krumo library is to use the auto_prepend_file for php. The auto_prepend_file declaration can be inserted into either the php.ini (for your entire web server), the httpd.conf file if you want it for just one site, or in your .htaccess file for a particular sub-directory. This will allow you to prepend a php script before any of your scripts run.

Create a new file on your web server called prepend.php.

include_once('krumo/class.krumo.php');

For php.ini, use:

auto_prepend_file = “auto_prepend.php"

For .htaccess or httpd.conf, use:

php_value auto_prepend_file auto_prepend.php

Resources:
http://krumo.kaloyan.info/
http://php.net/

.htaccess Security

Here is most of our .htaccess file. This is what I like to call the forefront of our site. It works just like a firewall. We have been using our .htaccess for a few months now and we love the results. I know it can occasionally be hard to find the right command to do the job, so I’d like to show you all of the lines, not just the ones that are security related. If you are not using Joomla! you will have to strip about ten lines from this.
Continue reading