In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Dependency Graph View Issue ] Relation Graph ] Vertical ]
related to child of duplicate of

Viewing Issue Simple Details
ID Category Type Reproducibility Date Submitted Last Update
0000950 [In-Portal CMS] Database task always 2010-12-13 12:35 2012-07-25 05:33
Reporter alex View Status public  
Assigned To alex
Priority normal Resolution fixed  
Status closed      
Summary 0000950: Log CURL requests to database table instead of file
Description Curl helper has nice logging feature, that allows to trace all curl requests made over time.

Problem is, that it's not very easy to handle such amount of information, when it is written into a single file. Also when website has large amount of concurrent curl requests, then curl request data is all mixed up together and there is no way to detect what actually happens.

To solve it I propose to log curl requests to database.

Here is table structure, that I've used:


CREATE TABLE IF NOT EXISTS `ptn_CurlLog` (
  `LogId` int(11) NOT NULL AUTO_INCREMENT,
  `Message` varchar(255) NOT NULL,
  `PageUrl` varchar(255) NOT NULL,
  `RequestUrl` varchar(255) NOT NULL,
  `PortalUserId` int(11) NOT NULL,
  `SessionKey` int(11) NOT NULL,
  `IsAdmin` tinyint(4) NOT NULL,
  `PageData` text,
  `RequestData` text,
  `ResponseData` text,
  `RequestDate` int(11) DEFAULT NULL,
  `ResponseDate` int(11) DEFAULT NULL,
  `ResponseHttpCode` int(11) NOT NULL,
  `CurlError` varchar(255) NOT NULL,
  PRIMARY KEY (`LogId`),
  KEY `Message` (`Message`),
  KEY `PageUrl` (`PageUrl`),
  KEY `RequestUrl` (`RequestUrl`),
  KEY `PortalUserId` (`PortalUserId`),
  KEY `SessionKey` (`SessionKey`),
  KEY `IsAdmin` (`IsAdmin`),
  KEY `RequestDate` (`RequestDate`),
  KEY `ResponseDate` (`ResponseDate`),
  KEY `ResponseHttpCode` (`ResponseHttpCode`),
  KEY `CurlError` (`CurlError`)
);
Additional Information Plan:
1. create CurlLog table and put it into install/upgrade script
2. incorporate changes made in e_curl_helper.php file into kCurlHelper class
3. make sure, that calls to kCurlHelper class still works (where they are made)
4. try enabling curl request logging and verify that all needed data is written into CurlLog table
5. no need for any grid in Admin Console, since we will be looking into database directly to read logs (if there is a need)



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker