Php Settings

For Logaholic to function properly, we recommend the following PHP settings, but generally you’ll only need to look at this if you are experiencing problems.

open_basedir

This controls if Logaholic can read your log file directly or not. You need to add the path to your log files to the open_basedir setting (if you are having problems accessing your log files and permissions are already set). To do this, add :/path-to-you-log-files to the end of the list. For example if the setting (in your php.ini file) currently looks like this:

On Unix:

open_basedir = “/current-setting:/tmp”

On Windows:

open_basedir = “/current-setting;/tmp”

turn it into this

On Unix:

open_basedir = “/current-setting:/tmp:/path-to-you-log-files”

On Windows:

open_basedir = “/current-setting;/tmp;/path-to-you-log-files”

Replace “path-to-your-log-files” with the actual system path of the folder containing your log files.

allow_url_fopen

This controls if a PHP script is allowed to connect to a webpage via http. For this to work fopen wrappers must be enabled in PHP. Logaholic uses this to create statistical website overlay views of your website. It also uses this method to check if Logaholic Trial versions are still valid. To enable this setting, change it to this in your php.ini file:

allow_url_fopen = On

display_errors

This controls whether or not PHP displays any errors in a script. We recommend to turn this on because of there is a problem, at least this way you’ll klnow what is going on. To enable this setting, change it to this in your php.ini file:

display_errors = On

output_buffering

This controls how PHP sends output to your browser. Since Logaholic update can potentialy take a long time to run, we are using buffering to keep you informed on the progress. If update does not give you good feedback, change this in your php.ini file:

output_buffering = off

Please note that turning output buffering off does NOT disable the buffering functions, it just allows the script to determine how to handle it.

Using .htaccess to change your PHP setting just for Logaholic

You can define the above settings in your PHP.ini file (usually located in /etc/php.ini) but that will define it for all the hosts running on that machine. If you wan to confine these setting to apply only to Logaholic, you can create a .htaccess file and place it in the logaholic directory on the server. The contents of the file should look like this (or add this to an existing .htaccess file):

php_value output_buffering off
php_value allow_url_fopen on
php_value display_errors on

Unfortunately, open_basedir cannot be set in the .htaccess, only in php.ini (or a vhost.conf apache file).