OLSendLog.php Fix for UTStatsDB 3.01

Discuss OLStats here

OLSendLog.php Fix for UTStatsDB 3.01

Postby Anonymous on Fri Apr 06, 2007 10:46 am

Not sure this was posted before, but if not it might help some... The problem with OLStats and the newer release of UTStatsDB is linked to the fact that 3.01 is really not compatible with previous release: many changes to the database and no more config file - everything is stored in the database but the database connection information itself.

Since OLSendLog.php loads the config.inc.php file to get information such as the logs directory and admin password, it just fails because there is no more such file in 3.01.

To fix this in a simple way, I hardcoded an upload password for OLStats, I hardcoded the log path location and remove the reference to config.inc.php. Check the attachment and here are the changes made as identified in the code:

//EGGS - 20070406 : removed inclusion of config.inc.php
//EGGS - 20070406 : added dedicated password for olstats upload
$AdminPass = "yourolstatsupload";
//EGGS - 20070406 : added harcoded log path variable
$logpath1 = "./Logs/";

Not the cleanest as it means that you need to maintain this file when changing the config in UTStatsDB, but it works.

Also, note that the logs parser call from OLStats will work as is since the logs.php loads its config on its own and still support being called from the URL with query string parameter "?pass=" or from the UTStatsDB admin GUI.

I went through limited testing but the simple seem straightforward enough that I feel that this is all that was required.
Just copy to your UTStatsDB 3.01 installation and don't forget to update the password I put in there. That password is a dedicated password for OLStats and does not refer to any UTStatsDB password.
(844 Bytes) Downloaded 843 times

Return to OLStats

Who is online

Users browsing this forum: No registered users and 2 guests