Wiki timeline
From PTAGISWiki
timeline not generating images
Found that the wiki timeline extension has not been working since the move from reedi to bay.
The symptom is that no image is generated and no error is displayed. Cached images are displayed, so the problem isn't apparent until you actually try to do something new.
The flow of control goes
- wiki/extension/Timeline.php
- wiki/extension/timeline/EasyTimeline.pl
- /usr/local/bin/pl (this is the ploticus executable)
(Comment out the line in Timeline.php that unlinks the source of the graph so that it can be available for the following command.)
The problem is related to permissions since I am able to generate a graph if I do so as root from the command line using the invocation that the extension would have used:
bash-3.00# ./EasyTimeline.pl -i '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline
/bf8d7c4e4e6ce931bcd28c632a28d17b' -m -P '/usr/local/bin/pl'
-T '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/tmp' -A '/mediawiki-1.13.2/index.php/$1'
EasyTimeline version 1.9
Copyright (C) 2004 Erik Zachte
Email xxx@chello.nl (nospam: xxx=epzachte)
This program is free software; you can redistribute it
and/or modify it under the terms of the
GNU General Public License version 2 as published by
the Free Software Foundation
------------------------------------------------------
OS Linux detected -> create image in png format.
Input: Script file /usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline/bf8d7c4e4e6ce931bcd28c632a28d17b
Output: Image files /usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline/bf8d7c4e4e6ce931bcd28c632a28d17b.png &
/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline
/bf8d7c4e4e6ce931bcd28c632a28d17b.svg
Map file /usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline
/bf8d7c4e4e6ce931bcd28c632a28d17b.map (add to html for clickable map)
Ploticus input file = /usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/tmp/EasyTimeline.txt.7161
Generating output:
Using ploticus command "/usr/local/bin/pl" (/usr/local/bin/pl)
Running Ploticus to generate svg file
'/usr/local/bin/pl' -svg -o '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline
/bf8d7c4e4e6ce931bcd28c632a28d17b.svg' '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images
/tmp/EasyTimeline.txt.7161' -tightcrop
Running Ploticus to generate bitmap
'/usr/local/bin/pl' -png -o '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline
/bf8d7c4e4e6ce931bcd28c632a28d17b.png' '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images
/tmp/EasyTimeline.txt.7161' -tightcrop -font FreeSans.ttf -mapfile '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2
/images/timeline/bf8d7c4e4e6ce931bcd28c632a28d17b.map'
pl: error 2795: Warning, no map regions were assigned (/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images
/timeline/bf8d7c4e4e6ce931bcd28c632a28d17b.map)
INFO
- PlotBars definition: no (valid) command 'BarData' found in previous lines.
Bars will presented in order of appearance in PlotData.
READY
No errors found.
After running that command, the timeline is visible on the test timeline page and the image directory looks like this:
bay:D2:rday: > ls -lt total 20 -rw-r--r-- 1 webjsp nobody 629 Jan 8 15:37 d32ed28a9c93223824dc52a470402c1e -rw-r--r-- 1 root root 2677 Jan 8 15:35 bf8d7c4e4e6ce931bcd28c632a28d17b.svg -rw-r--r-- 1 root root 470 Jan 8 15:35 bf8d7c4e4e6ce931bcd28c632a28d17b.png -rw-r--r-- 1 webjsp nobody 631 Jan 8 15:33 bf8d7c4e4e6ce931bcd28c632a28d17b -rw-r--r-- 1 webjsp nobody 630 Jan 8 15:28 f385ebe7889a7c921198101e15b0bcff -rw-r--r-- 1 webjsp nobody 207 Jan 8 15:27 83132fdd363ee4f34d9d8e0dba842521.err
But the permissions on the directory are set very permissively:
bay:D2:rday: > pwd /usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline bay:D2:rday: > ls -ld . drwxrwxrwx 2 root www 8 Jan 8 15:37 .
Running the program from the command line as the user webjsp I get to the root of the problem:
bash-3.00$ ./EasyTimeline.pl -i '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline
/f385ebe7889a7c921198101e15b0bcff' -m -P '/usr/local/bin/pl' -T '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2
/images/tmp' -A '/mediawiki-1.13.2/index.php/$1'
EasyTimeline version 1.9
Copyright (C) 2004 Erik Zachte
Email xxx@chello.nl (nospam: xxx=epzachte)
This program is free software; you can redistribute it
and/or modify it under the terms of the
GNU General Public License version 2 as published by
the Free Software Foundation
------------------------------------------------------
OS Linux detected -> create image in png format.
Input: Script file /usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline/f385ebe7889a7c921198101e15b0bcff
Output: Image files /usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline/f385ebe7889a7c921198101e15b0bcff.png
& /usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline/f385ebe7889a7c921198101e15b0bcff.svg
Map file /usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline
/f385ebe7889a7c921198101e15b0bcff.map (add to html for clickable map)
Ploticus input file = /usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/tmp/EasyTimeline.txt.10150
Generating output:
Using ploticus command "/usr/local/bin/pl" (/usr/local/bin/pl)
Running Ploticus to generate svg file
'/usr/local/bin/pl' -svg -o '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline
/f385ebe7889a7c921198101e15b0bcff.svg' '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images
/tmp/EasyTimeline.txt.10150' -tightcrop
pl: error 22: Cannot open specified scriptfile (/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images
/tmp/EasyTimeline.txt.10150)
ploticus 2.40-Jan'08 (unix). This build can produce: PS EPS SVG SVGZ X11 PNG
Copyright 1998-2008 Steve Grubb, http://ploticus.sourceforge.net
Running Ploticus to generate bitmap
'/usr/local/bin/pl' -png -o '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline
/f385ebe7889a7c921198101e15b0bcff.png' '/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images
/tmp/EasyTimeline.txt.10150' -tightcrop -font FreeSans.ttf -mapfile
'/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline/f385ebe7889a7c921198101e15b0bcff.map'
pl: error 22: Cannot open specified scriptfile (/usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images
/tmp/EasyTimeline.txt.10150)
ploticus 2.40-Jan'08 (unix). This build can produce: PS EPS SVG SVGZ X11 PNG
Copyright 1998-2008 Steve Grubb, http://ploticus.sourceforge.net
INFO
- PlotBars definition: no (valid) command 'BarData' found in previous lines.
Bars will presented in order of appearance in PlotData.
Image /usr/local/pitweb/ptagis/wiki/mediawiki-1.13.2/images/timeline/f385ebe7889a7c921198101e15b0bcff.png
not created.
Ploticus not found in local folder. Is it on your system path?
solution
The problem was indeed permissions. Timeline could not write to wiki/images/tmp. I made it 777 like wiki/images/temp and now timeline works.
