If you simply cannot find your log file, skip directly to the bottom of this article. Copy the email template and ask your hosting provider for help.
This is what you need to know before proceeding:
The log file for your website is automatically created by the webserver software (like Apache or Microsoft IIS). As a result, it is located somewhere on the server that hosts your website. Its location, access permissions and other variables are configured by the system administrator of your server. Usually, only certain system users are allowed to read log files, or even see their location. In this scenario Logaholic can't read the live log file even if you enter the correct location. Therefore the goal is to allow Logaholic to read the live log file (not a copy) to get up to the minute (real time) updates of the statistics.
Finding your log file:
Use your ftp client or the Logaholic profile screen to browse through the folders of your website / hosting account. Look for folders or files with names or extensions like log, stats, or statistics. The actual file is often called something like www.yourdomain.com.log on shared servers, or simply called access_log. Sometimes the data will not be in one single file, but as a whole directory of archived logs files (one per day, for example).
If you cannot find your log file(s) within the folders you can access with your FTP client, save yourself some time and frustration and contact your hosting provider to ask them for the location. At the end of this article, you'll find an email template you can use for this purpose. Other common locations to try:
On shared servers:
On dedicated servers (DO NOT use this for shared servers)
Accessing the log file
Usually the log file won't be readable by Logaholic (a script running on your webserver) due to permission restrictions. If you find the file but Logaholic still can't read it, you'll need to change your user's permissions. Usually, all you need to do is give Read access to the user group or to all/others, like in the image below.
Permission level 644 should usually suffice. You can also safely set the file to permissions 777 (enables all permissions for everyone) if you are still having problems accessing the file.
To change permissions use your FTP client to access the file properties or attributes and select the appropriate checkboxes. If you don't have permission to change the permissions, ask your hosting provider or system administrator.
If you have access to the command shell, an alternative way of changing permissions is to use this command:
chmod 644 access_log_file
If you have done all of this and Logaholic STILL cannot access the file, the problem may be another. Apache/PHP can be configured to access certain paths on the server, regardless of permissions. This is defined in the PHP settings, in the PHP.ini file. The setting is called:
A solution is to create a file called ".htaccess" in your logaholic directory with the following line:
php_value open_basedir="/path to your log files/"
If you already have an .htaccess file in place, then add this line. Otherwise it will be the only text in that file. The problem should be fixed.
If the problem still persists, you will have to ask your hosting provider to reconfigure Apache or PHP for you. (open_basedir can also be set in httpd.conf).
Another Alternative Scenarios:
Copy the log file to a location where Logaholic can access it. For example, copy the file to the logaholic folder and analyze it from there. Usually you'll be able to make an automated copy job that does this once a day, for example.
Use this email to ask for help at your hosting provider:
- - -
I am installing a new web site statistics package on our domain, called Logaholic.
You can access the installation here: http://www.yourdomain.com/logaholic/
This software needs direct access to my log file, but I don't know where it is located. Could you please let me know the log file's exact path and filename?
Also the scripts running at http://www.yourdomain.com/logaholic/ need permission to read that file. Could you change permissions on the log file to 644 or whatever level is required for that?
If you cannot change these permissions or give me access to the log file in this way, could you then please set up a cron job for me that will automatically copy my log file to my logaholic directory each day/week.
- - -