[phpOpenTracker-general] trouble visualizing clickpaths
John B <[email protected]> Mon, 19 Sep 2005 14:28:16 -0700
| Newsgroups | gmane.comp.web.phpopentracker.general |
|---|---|
| Message-ID | <[email protected]> |
hello all,
i was able to solve my previous problem, thanks to sebastian's help.
adding `ob_start();` before the first header() call in image.php kept
the error message at bay. unfortunately, i'm now having trouble getting
graphviz to build the images to visualize click-paths:
i installed the simple_graph system w/o trouble, but when trying to get
the clickpath visualization to work, i receive an error. i setup a page
as specified here:
http://www.phpopentracker.de/docs/en/api-reference.api-calls.html
(adding the requisite require(phpOpenTracker.php); ).
i try to load the page in my browser, and after sitting and thinking for
a while, a blank page appears, and i receive the following error
messages in the system logs:
Sep 15 15:13:34 www httpd: PHP Warning: fopen(): Unable to access
/tmp/graph_KFDpBR.png in /usr/local/lib/php/Image/GraphViz.php on line 192
Sep 15 15:13:34 www httpd: PHP Warning:
fopen(/tmp/graph_KFDpBR.png): failed to open stream: No such file or
directory in /usr/local/lib/php/Image/GraphViz.php on line 192
line 192 of GraphViz.php is the following:
function fetch($format = 'svg') {
if ($file = $this->saveParsedGraph()) {
$outputfile = $file . '.' . $format;
$command = $this->graph['directed'] ? $this->dotCommand
: $this->neatoCommand;
$command .= " -T$format -o$outputfile $file";
@`$command`;
@unlink($file);
$fp = fopen($outputfile, 'rb');
if ($fp) {
$data = fread($fp, filesize($outputfile));
fclose($fp);
@unlink($outputfile);
}
return $data;
}
return FALSE;
}
it seems that no file is being created, as the fopen is trying to read
the file, and phpOpenTracker is writing temp files to /tmp without
trouble. is phpOpenTracker generating an image and placing it somewhere
else?
not sure if this helps, but turning up the debugging level of
phpOpenTracker gives the following when i run the clickpath php file:
SELECT accesslog.accesslog_id AS accesslog_id,
accesslog.document_id AS document_id,
accesslog.timestamp AS timestamp,
documents.string AS document,
documents.document_url AS document_url
FROM pot_accesslog accesslog,
pot_visitors visitors,
pot_documents documents
WHERE visitors.client_id = '1'
AND visitors.accesslog_id = accesslog.accesslog_id
AND accesslog.document_id = documents.data_id
ORDER BY accesslog.accesslog_id, accesslog.timestamp
thanks again, i really appreciate your help,
john B