Thread:Project:Support desk/Collection Extension: RuntimeError: command failed with returncode 256/reply (8)

Newbie on this extension, i have spend my time to have the solution of this.

You need more than just the module, you must install some local server to translate your wiki page on pdf file.

You must install firt the tool to access to module install pip


 * 1) wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
 * 2) tar zxvf setuptools-0.6c11.tar.gz
 * 3) cd setuptools-0.6c11
 * 4) python setup.py build
 * 5) python setup.py install

$ wget http://pypi.python.org/packages/source/p/pip/pip-1.2.tar.gz $ tar xvf pip-1.2.tar.gz $ cd pip-1.2
 * 1) python setup.py install


 * when it is done, you must follow that :


 * 1) yum install g++ perl python python-dev python-setuptools python-imaging python-lxml libevent-devel
 * 2) yum install python-devel
 * 3) yum install libxml2-python.x86_64 libxslt-python.x86_64 libxslt-devel.x86_64
 * 4) yum install python-imaging python-lxml pdftk


 * 1) wget http://python-distribute.org/distribute_setup.py
 * 2) sudo python distribute_setup.py
 * 3) sudo easy_install -U virtualenv

$ wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz $ gtar -zxvf Imaging-1.1.7.tar.gz $ cd Imaging-1.1.7 $ ~/plone-python/bin/python setup.py install


 * 1) pip install -i http://pypi.pediapress.com/simple/ pil
 * 2) pip install -i http://pypi.pediapress.com/simple/ mwlib
 * 3) pip install -i http://pypi.pediapress.com/simple/ mwlib.rl
 * 4) pip install -i http://pypi.pediapress.com/simple/ pyfribidi


 * verif de l'install
 * 1) mw-zip -c :en -o test.zip Acdc Number
 * 2) mw-render -c test.zip -o test.pdf -w rl


 * boot script example mw-serve
 * 1) !/bin/sh
 * 2) chkconfig: 345 20 80
 * 3) description: mw-serve
 * 1) description: mw-serve
 * 1) description: mw-serve

PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin

case "$1" in   start)        su - www-data -c 'nserve.py >> /tmp/mwcache/log.txt 2>&1  &'        su - www-data -c 'mw-qserve >> /tmp/mwcache/log.txt 2>&1 &'        su - www-data -c 'nslave.py --cachedir /tmp/mwcache/ >> /tmp/mwcache/log.txt 2>&1 &'        su - www-data -c 'postman.py >> /tmp/mwcache/log.txt 2>&1 &'    ;;  stop) mv /data/mwcache/log.txt /data/mwcache/log.old killall nserve.py       killall mw-qserve killall nslave.py       killall postman.py    ;; force-reload|restart)   $0 stop    $0 start    ;;  *) echo "Usage: /etc/init.d/mw-serve {start|stop}" exit 1 ;; esac

exit 0


 * 1) mkdir /tmp/mw-serve
 * 2) adduser www-data
 * 3) chown www-data /etc/init.d/mw-serve
 * 4) chown -R www-data /tmp/mw-serve


 * 1) chkconfig --add mw-serve
 * 2) /etc/init.d/mw-serve start

config file
following an extract of my localsettings.php file

require_once("$IP/extensions/PdfExport/PdfExport.php"); $wgPdfExportMwLibPath = '/usr/bin/mw-render'; $wgPdfExportBackground = "/tmp/background-image/image.jpg"; $wgPdfExportAttach = true;

require_once("$IP/extensions/Collection/Collection.php"); $wgCollectionFormats=array( 'rl' => 'PDF', );
 * 1) creation pdf
 * 1) creation pdf

$wgGroupPermissions['*']['collectionsaveascommunitypage'] = true; $wgGroupPermissions['*']['collectionsaveasuserpage']     = true; $wgEnableAPI = true; $wgCollectionMWServeCredentials = "collection_user:password"; $wgCollectionMaxArticles = 150;
 * 1) $wgCollectionPODPartners = false;

$wgCollectionMWServeURL="http://localhost:8899/"; $wgCommunityCollectionNamespace=NS_MEDIAWIKI;
 * 1) Collection tool for the PediaPress extension

http://edutechwiki.unige.ch/en/Mediawiki_collection_extension_installation
 * You can help yourself with this link to complete this previous process