Code Monkey home page Code Monkey logo

mod_dims's Introduction

Dependencies

  • Apache 2.2.x
  • Imagemagick 6.6+
  • libcurl 7.18.0+

Installation

Add the following to the Apache configuration:

<IfModule !mod_dims.c>
    LoadModule dims_module modules/mod_dims.so
</IfModule>

AddHandler dims-local .gif .jpg

<Location /dims/>
    SetHandler dims
</Location>

<Location /dims3/>
    SetHandler dims3
</Location>

<Location /dims-status/>
    SetHandler dims-status
</Location>

This assumes mod_dims.so has been installed in $HTTP_ROOT/modules.

Errors

There are three classes of errors in mod_dims;

  • Errors caused during downloading of a source image. These come directly from libcurl and are logged as-is.

  • Errors caused during an ImageMagick operation. These come directly from ImageMagik and are logged as-is.

  • Errors caused during processing of a request by mod_dims. These fall into the category of bad input checking, bad config, etc.

ImageMagick Timeout Error Format:

[client Imagemagick operation, '', timed out after 4 ms

would be something like "Resize/Image" or "Save/Image".

General Error Format:

Errors will be in the following format in Apache's error log:

[client ] error, '', on request:

For example:

[client 10.181.182.244] Imagemagick error, 'no decode delegate for this image format `'', on request: /20080803WI55426251_WI.jpg/TEST/thumbnail/78x100/

Common libcurl Error Messages:

These message are usually self explanatory so no explain is provided. The URL that failed will be logged along with this message.

  • Couldn't connect to server
  • Couldn't resolve DNS
  • Timeout was reached

Common mod_dims Error Messages:

  • Requested URL has hostname that is not in the whitelist. (aaolcdn.com)
  • Application ID is not valid
  • Parsing thumbnail geometry failed
  • Parsing crop geometry failed
  • Failed to read image This occurs if ImageMagick had trouble reading the image.
  • Unable to stat image file This occurs when a local request is unable to find the image to resize.

Common ImageMagick Error Messages:

  • Memory allocation failed This should rarely occur, if ever, but usually when it does it's the result of an ImageMagick timeout.

  • unrecognized image format

  • no decode delegate for this image format

This happens when ImageMagick doesn't no how to read a source image.

  • zero-length blob not permitted

This may occur if there was a failure to download the source image.

  • Unsupported marker type 0x03 This may occur if the image is corrupted. The "0x03" may be different depending on the corruption.

Other more serious errors:

Any errors that have "Assertion failed" are results of bugs in the code and can be considered serious.

  • Assertion failed: (wand->signature == WandSignature), function MagickGetImageFormat, file wand/magick-image.c, line 4137.

mod_dims's People

Contributors

beetlebugorg avatar sigbjornf avatar

Stargazers

Marco Agate avatar Cosimo Streppone avatar

Watchers

Cosimo Streppone avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.