How to install ImageMagick on WAMP?


#1

I am a newbie in Omeka, but I loved the concept for that.

I want to host my archive locally for now, but i’m unable to set up ImageMagick for Omeka.

I’m using a 32bit Wamp server. WAMP Version is 3.06, and PHP version is 5.6.25.

I downloaded “Win32 dynamic at 16 bits-per-pixel component” (ImageMagick-7.0.6-10-Q16-x86-dll.exe) from ImageMagick website, and installed the program on C:\imagemagick From CMD, I tested, and the program works.

After that I find a php_imagemagick.dll file and put that file in ext folder of the wamp. Then I edited the php.ini, and a checked php_imagick.dll comes to phpextension list on wamp icon.

But still unable to add the folder on omeka settings. What shall I do now?


#2

imagemagick and imagick are not the same library: imagemagick uses the command line, but imagick is integrated to php.

Check if you set the library you want in the config file of Omeka (application/config/config.ini): it should be

fileDerivatives.strategy = "Omeka_File_Derivative_Strategy_ExternalImageMagick"

or

fileDerivatives.strategy = "Omeka_File_Derivative_Strategy_Imagick"

#3

Thank you for your answer @Daniel_KM

Now I can add the folder and see that ImageMagick path is working message.

I added line as

fileDerivatives.strategy = “Omeka_File_Derivative_Strategy_ExternalImageMagick”

to config.ini (i actually removed “;;”, so it remains)

But stil there is a problem, when i add an item no derivative images are generated.


#4

You have to restart the server ? Did you try with imagick (since it seems you have enabled php_imagick.dll) ?


#5

And did you check the last comment on Configuring ImageMagick on MAMP for Windows?


#6

I already checked the last comment on " Configuring ImageMagick on MAMP for Windows?" post, and after that the message say “the imagemagick path is working”

I restart several times, nothing changed.

I don’ know how to try with imagick? I’m a bit confused. Imagick is seen on php extensions list, and there is check sign next to it, like many other extension.


#7

Just set in the config:

fileDerivatives.strategy = "Omeka_File_Derivative_Strategy_Imagick"

#8

I changed that value, but still no derivative images. I think i’m unable to set a basic thing, but can’t find out that.

;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Site Configuration File ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Lower-level settings for Omeka are defined here.
;
; The default settings should be correct for most Omeka users, but some
; setups may require some changes. People who are developing for or
; debugging Omeka may also change some of these settings.

[site]

;;;;;;;;;;;;;;;;
; Localization ;
;;;;;;;;;;;;;;;;

; locale.name
; The locale identifier used for translating and displaying Omeka.
; default: none
;
; The locale controls what language Omeka will be displayed in, and
; also how dates and other locale-sensitive data will be displayed.
;
; The locale identifier should be a valid ISO 639 language code,
; and optionally a valid ISO 3166-1 locale code.
; (Examples: "es" for Spanish, "en_US" for US English.)
;
; To enable translations, the identifier must also have a
; corresponding .mo file in the application/languages directory.


locale.name = ""

;;;;;;;;;;;;;
; Debugging ;
;;;;;;;;;;;;;

; debug.exceptions
; Throw exceptions for bad URLs.
; default: false
;
; This should only be enabled when debugging or developing for Omeka.
debug.exceptions = false

; debug.request
; Dump data about each web request to the browser.
; default: false
;
; The request data shows what routes and variables Omeka has parsed from
; each request.
debug.request = false

; debug.profileDb
; Enable the query profiler.
; default: false
;
; This will show metadata about the queries that were executed during
; each request.
debug.profileDb = false

; debug.email
; Send all log messages to an email address.
; default: ""
;
; Anything that would be logged will also be emailed to this address.
; If left blank, this feature is disabled.
debug.email = ""

; debug.emailLogPriority
; Apply a priority filter to emailed log messages.
; default: Zend_Log::ERR
;
; If an address has been set for debug.email, this setting filters the
; messages to only those of the given priority or higher.
debug.emailLogPriority = Zend_Log::ERR

;;;;;;;;;;;
; Logging ;
;;;;;;;;;;;

; log.errors
; Log errors and other information.
; default: false
;
; Errors, exceptions, and other messages will be logged to
; application/logs/errors.log (this file must be writable by the web
; server if logging is enabled).
log.errors = false

; log.priority
; The minimum priority level of messages that should be logged.
; When developing/debugging, use Zend_Log::DEBUG for debug() to work. This will record everything.
; default: Zend_Log::WARN (Logs warnings and above)
log.priority = Zend_Log::WARN

; log.sql
; Log SQL statements.
; default: false
;
; All SQL statements executed by Omeka will be included in Omeka's
; error log.
log.sql = false

;;;;;;;;;;;;
; Sessions ;
;;;;;;;;;;;;
;
; Omeka uses Zend Framework's session handling. A full list of
; available session configuration options can be found here:
; https://framework.zend.com/manual/1.12/en/zend.session.global_session_management.html
;
; Some options that are often useful for Omeka sites are included here.

; session.name
; Sets the name used for the Omeka session cookie.
; default: ""
;
; If left blank, Omeka will automatically select a unique session name.
session.name = ""

; session.saveHandler
; Determines how session data will be saved.
; default: no setting (uses the database for saving session data)
;
; Sessions are now stored in the database by default. To revert to the
; older method of storing session data in the filesystem, uncomment the
; following line.
; session.saveHandler = ""

;;;;;;;;;
; Theme ;
;;;;;;;;;

; theme.useInternalAssets
; Whether Omeka should use locally-stored asset files.
; default: false
;
; Omeka includes some asset files from external sources, such as Google by
; default. Set this to true if the Omeka installation does not have
; web access, and Omeka will instead serve local copies of these files.
theme.useInternalAssets = false

;;;;;;;;;;;;;;;;;;;;;;
; Background Scripts ;
;;;;;;;;;;;;;;;;;;;;;;

; background.php.path
; Path to PHP-CLI for running background processes.
; default: ""
;
; If left blank, Omeka will try to autodetect the right path. Set this
; to override the autodetected PHP path.
background.php.path = "C:\wamp\bin\php\php5.6.25\php.exe"

; jobs.dispatcher
; How Omeka "jobs" will be executed.
; default: "Omeka_Job_Dispatcher_Adapter_Synchronous"
;
; Newer Omeka features and plugins use this setting to determine how
; long-running jobs will be run.
;
; The default setting should work for all installations, but may
; time out for longer jobs. On systems where the older PHP background
; processes worked, the BackgroundProcess adapter can be used instead
; of the Synchronous one.
jobs.dispatcher.default = "Omeka_Job_Dispatcher_Adapter_Synchronous"
;deafult: jobs.dispatcher.longRunning = "Omeka_Job_Dispatcher_Adapter_BackgroundProcess"
jobs.dispatcher.longRunning = "Omeka_Job_Dispatcher_Adapter_Synchronous"

;;;;;;;;
; Mail ;
;;;;;;;;
;
; For more info, see Zend Framework documentation on Zend_Mail:
; http://framework.zend.com/manual/en/zend.mail.html

; mail.transport.type
; The system Omeka will use to send email messages.
; default: "Sendmail"
;
; The default is to send mail using PHP's built-in mail() function.
mail.transport.type = "Sendmail"

; Uncomment some of the following lines (and comment the above line)
; to switch to SMTP for sending mail through Omeka. Your configuration
; may not require all of the options listed.
;
; mail.transport.type = "Smtp"
; mail.transport.host = ""
; mail.transport.port = ###     ; Port number, if applicable.
; mail.transport.name = ""      ; Local client hostname, e.g. "localhost"
; mail.transport.auth = "login" ; For authentication, if required.
; mail.transport.username = ""
; mail.transport.password = ""
; mail.transport.ssl = ""       ; For SSL support, set to "ssl" or "tls"

; Sample S3 cloud storage configuration
;
; The accessKeyId, secretAccessKey, and bucket options are all required.
; If the expiration option is set, files will be uploaded with "private"
; access, and Omeka will generate URLs that are only valid for a limited
; time.  If the expiration option is missing or left commented out,
; uploaded files will always be publicly readable.
;
; storage.adapter = "Omeka_Storage_Adapter_ZendS3"
; storage.adapterOptions.accessKeyId =
; storage.adapterOptions.secretAccessKey =
; storage.adapterOptions.bucket =
; storage.adapterOptions.expiration = 10 ; URL expiration time (in minutes)
; storage.adapterOptions.endpoint = ; Custom S3 endpoint (optional)

;;;;;;;;;;;;
; Security ;
;;;;;;;;;;;;

; ssl
; Secure Socket Layer support for Omeka.
; default: none
;
; Ensure that your server is properly configured before enabling this
; setting. Choose one of the following:
;
; "logins"
;   Force SSL for login forms and login form submissions.
;
; "sessions"
;   Force SSL for all authenticated users to protect sessions. Includes
;   login forms.
;
; "always"
;   Force SSL on across the entire site.
;
; ssl = "always"

;;;;;;;;;;
; Upload ;
;;;;;;;;;;

; upload.maxFileSize
; Set the maximum file upload size.
; default: 10M
;
; Uncomment the following line to set the maximum file upload size. This 
; configuration will not exceed the maximum beyond what is set in the 
; 'post_max_size' or 'upload_max_filesize' core php.ini directives.
;
;upload.maxFileSize = "10M"

;;;;;;;;;;;;;;;;;;;;;
; Derivative Images ;
;;;;;;;;;;;;;;;;;;;;;

; fileDerivatives.strategy
; Controls what method Omeka uses to create derivative images.
; default: Omeka_File_Derivative_Strategy_ExternalImageMagick
;
; The built-in strategies are ExternalImageMagick (the old default), Imagick
; (requires PECL ext/imagick), and GD (generally installed by default with PHP,
; but handles fewer formats). Others can be added by plugins.
;
;;fileDerivatives.strategy = "Omeka_File_Derivative_Strategy_ExternalImageMagick"

; fileDerivatives.strategy = "Omeka_File_Derivative_Strategy_GD"
fileDerivatives.strategy = "Omeka_File_Derivative_Strategy_Imagick"
; fileDerivatives.strategyOptions
; Specific settings for the configured derivative strategy.
;
; Subkeys to this entry specify each option.
;
; fileDerivatives.strategyOptions.page = "0"
; fileDerivatives.strategyOptions.gravity = "center"
; fileDerivatives.strategyOptions.autoOrient = false

; fileDerivatives.typeWhitelist[]
; If set, Omeka will only attempt to create derivatives for files with the
; given MIME types.
;
; This entry can be specified multiple times, once for each type in the list.
;
;fileDerivatives.typeWhitelist[] = "image/jpeg"

; fileDerivatives.typeBlacklist[]
; If set, Omeka will not attempt to create derivatives for files with the
; given MIME types.
;
; Both this blacklist and the whitelist can be set at the same time, but the
; whitelist will control.
;
; This entry can be specified multiple times, once for each type in the list.
;
;fileDerivatives.typeBlacklist[] = "image/jpeg"






#9

On the Settings page, do you still have an entry for “ImageMagick Directory Path”? When Imagick is configured as the derivative strategy, that field should be removed from the form. (I’m just trying to think of an easy method for you to see if the setting is actually being used).


#10

@jflatnes

exactly, ImageMagick Directory Path option is completely removed from the form at settings page.

Can you check the config.ini above for any other suggestions?


#11

Can you post the “imagick” section of your phpinfo output? (if you don’t know how, make a simple PHP script in your web root but outside the Omeka installation with the content <?php phpinfo(); and visit it.)

That should show what formats your Imagick install supports. It’s possible to have Imagick installed and working but not actually support opening or writing the formats you want (or any formats at all), which would cause this kind of problem you’re seeing.


#12

Thank you very much John.
I checked that section and on the list there is no jpeg and png. I think that is what you said in your previous answer to my post. @jflatnes

I feel that I’m very close to final. Is there a way to solve this issue?


#13

The version of ImageMagick your download of Imagick from PECL was compiled against is 6.8.8-4 (shown in your screenshot), while the one you installed is 7.0.6-10.

You’ll want these to be the same, or at least as close as is practical. The version of Imagick you installed (3.2.0RC1) is fairly old, so you could look into using the current latest version 3.4.3 of imagick instead. Make sure to download the version that matches your PHP installation (the PHP version number, thread-safe or non-, and x86 vs. x64, all of which is shown at the top of your phpinfo, and from what you’ve said would probably mean you’d want the PHP 5.6, thread safe, x86 version).

Updating the Imagick DLL will probably change that ImageMagick version number reported in your phpinfo to something newer, but perhaps not newer enough. The PHP on Windows people post the versions of dependencies like ImageMagick they use when building the DLLs, so they have zips of ImageMagick 6.9.3-7, which is probably what you’d need.

PHP extensions in particular are a lot more trouble on Windows, and Imagick is worse than most because you need not only the extension but also ImageMagick itself of an agreeable version. On Linux systems this is usually much easier because you can just get both from the package manager, or even just easily build Imagick to match your installed version. It’s by no means impossible on Windows, just much more fiddly.


#14

Thank you very much John! It is over :slight_smile:

Finally, after a few hours of trying versions and looking for forum threads, i’m able to create derivative images.
I’m using this localhost version is for trying the system, I hope I can install omeka on a linux server much more easier.


#15

Fine!

It will be a lot easier to install on Linux, because it is designed for it and for a standard server. Windows is not standard and is not a server. You can even use Linux as your desktop system, so everything will be simpler.


#16

I installed 16.04 LTS version of Ubuntu on my computer, just to use Omeka.

I somehow installed lamp package, and then from terminal tried to install Omeka. and new problems appear: mod_rewrite error do not allow install. Checked forums, find some solutions, but still unable to install.:confused:

I think, Omeka is a wonderfull system for social archiving but initial setup is a bit complicated for me p to now.


#17

That’s a PECL library (framework)… that very download page states very clearly it also needs ImageMagick to be installed for that library to work.

9Apps Lucky Patcher


#18

Hi,
check out this helpful link :
http://www.devside.net/wamp-server/installing-and-using-imagemagick-with-imagick-php-extension-php_imagick-dll-on-wampDafont