poniedziałek, 10 listopada 2014

ImageMagick install on Windows 8 and XAMPP

Finally I install this, it takes too long, so I'm going to tell you how to do this as fast as possible
First install ImageMagick-6.7.7-5-Q16-windows-dll that can be find here: http://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/binaries/
For a safety chose install path that doesn't contain spaces.

Next download and unzip php_imagick.dll from http://www.peewit.fr/imagick/ it must be version for PHP 5.5 and TS(Thread Safe).

Move  php_imagick.dll to xampp/php/ext

Add to php.ini line:

And optionally (I think it's optional but it can be required ;p) to httpd.conf (apache folder)
SetEnv MAGICK_HOME "C:\Your\Path\To\ImageMagick"

Next copy modules files from ImageMagick\modules\coders to .magick in your user folder
example path: C:\Users\userName\.magick
(to create .magick folder open C:\Users\yourProfileName in CMD and type: mkdir .magick)

Now run XAMPP, if it gives error try logout and login, and Imagick should work.

For test you can use one of examples listed here: http://php.net/manual/en/imagick.examples-1.php

środa, 13 sierpnia 2014

php: No such file or directory cron. PATH variable missing in crontab

In the last time I was trying to schedule task in Laravel 4 using dispatcher package. Title error is what I find when trying to run command scheduled:run by cron. Running it in CLI work just fine, but to work in cron i need to do this:
  • run crontab -e 
  • add PATH variable at beginning of crontab file it should look like:
  • pathes that can be find by running  /usr/bin/env
  • that's all, just save it