Extension:WebStore

WebStore is intended to handle images and the generation of thumbnails in a multiple-server environment. It includes a web-server error 404 handler; if a thumbnail is requested that does not already exist on the local server, the request is forwarded to another server so that the thumbnail image may be automatically generated.

Communication between the multiple servers is based on WWW protocols (http) only.

The WebStore extension is needed by the ProofreadPage extension. Unfortunately, documentation seems to be missing completely. Please add anything you know about this extension here.

WebStore extends the FileStore.

Installation
The root of your server is configured as following : DocumentRoot /var/www/ the path of 404-handler.php /var/www/wiki/extensions/WebStore/404-handler.php the code will be ErrorDocument 404 /wiki/extensions/WebStore/404-handler.php
 * 1) Copy all the files to
 * 2) Add   to your LocalSettings.php
 * 3) WebStore comes with a file called 404-handler.php. To be able to catch 404 events, it needs to be registered as a 404 handler. Using Apache, adding something like ErrorDocument 404 /extensions/WebStore/404-handler.php to httpd.conf should work.
 * by example :

With Apache, an other possibility is to use a rewrite rule. By example, you can add following lines in an Apache configuration file : RewriteEngine On RewriteRule ^/images/thumb(.*)\.(jpg|jpeg|png|gif)$ /extensions/WebStore/404-handler.php

You should also create a file called simple404.php like this:

and add the following line to LocalSettings.php, somewhere below :

This way, when an image is requested for the first time, it is directly sent to the browser (without sending a 404 status error code before the image file).

WebStore doesn't work
A WebStore needs a CURL-module for php. A default configuration in a some systems doesn't containt this module. In this situation you see, for example, a black frame in proofread or nothing instead a thumbnail and a 404-error in an apache logfile for this thumbnail.

If you try to specify the URL of this thumbnail in you browser, you will get, for example,

Solution: Install CURL module for php. For example, in Ubuntu apt-get install php5-curl and don't forget to restart apache.

A non-Latin characters in a file name
A WebStore trying to creates temporary file in a directory with encoded name. So, if a file name contains a non-Latin characters that encoded to %xx, that this attempt finish with error webstore_temp_open.

Solution: In file $IP/extensions/WebStore/404-handler.php search string: and replace it by