Pages: 1 2
Hello/Hi/Greetings,
After many attempts, I was able to install ImageMagick as a PHP extension. But when I upload files with ImageMagick enabled (everything works if I use GD), I get this error:
----
Php[120820], PHP Fatal error: Uncaught exception 'ImagickException' with message 'UnableToOpenBlob `././upload/2014/05/12/20140512195316-654db6d1.jpg': No such file or directory @ error/blob.c/OpenBlob/2642' in C:\webroot\piwigo\admin\include\image.class.php:416
Stack trace:
#0 C:\webroot\piwigo\admin\include\image.class.php(416): Imagick->__construct('././upload/2014...')
#1 C:\webroot\piwigo\admin\include\image.class.php(87): image_imagick->__construct('././upload/2014...')
#2 C:\webroot\piwigo\i.php(531): pwg_image->__construct('././upload/2014...')
#3 {main}
thrown in C:\webroot\piwigo\admin\include\image.class.php on line
---
The '././' prepended to the file path looks suspicious to me - shouldn't it be "../../" or something alike?
Piwigo version: 2.6.2
PHP version: 5.4.28
MySQL version: 5.0.37
Piwigo URL: http://www.sandon.it/photo
hello
what's the IM version? could you update it?
Offline
php_imagick.dll is version 5.4.20.0, downloaded from http://pecl.php.net/package/imagick/3.1.2/windows, latest stable TS version for PHP 5.4 (I'm running Apache 2.2.26 on Windows, via php5_module).
Dependencies were downloaded from http://windows.php.net/downloads/pecl/d … c9-x86.zip
I don't know if I can upgrade it to ImageMagick-6.8.9-1 because it looks they are compiled with VC10 and I'm afraid they can be not compatible.
I tried before to run ImageMagick-6.8.9-1 as "external", but there was no way to make Piwigo "see" it.
From php_info():
imagick module
enabled
imagick module version 3.1.2
imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator
ImageMagick version ImageMagick 6.8.8-4 Q16 x86 2014-01-29 http://www.imagemagick.org
ImageMagick copyright Copyright (C) 1999-2014 ImageMagick Studio LLC
ImageMagick release date 2014-01-29
ImageMagick number of supported formats: 225
ImageMagick supported formats 3FR, A, AAI, AI, ART, ARW, AVI, AVS, B, BGR, BGRA, BIE, BMP, BMP2, BMP3, BRF, C, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CLIPBOARD, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPS, DPX, DXT1, DXT5, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FITS, FPX, FRACTAL, FTS, G, G3, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, ICB, ICO, ICON, INFO, INLINE, IPL, ISOBRL, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPEG, JPG, JPT, JSON, K, K25, KDC, LABEL, M, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MEF, MIFF, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, O, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, R, RADIAL-GRADIENT, RAF, RAS, RGB, RGBA, RGBO, RGF, RLA, RLE, RW2, SCR, SCT, SFW, SGI, SHTML, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UIL, UYVY, VDA, VICAR, VID, VIFF, VST, WBMP, WEBP, WMF, WMV, WPG, X3F, XBM, XC, XCF, XPM, XPS, XV, Y, YCbCr, YCbCrA, YUV
Directive Local Value Master Value
imagick.locale_fix 0 0
imagick.progress_monitor 0 0
Also, I was running before Menalto Gallery 2 with ImageMagick and had no problem. Now I'm trying to switch to Piwigo but it looks ImageMagick support is somewhat not yet ready, especially in Windows.
It does That should come from your environment
Offline
I didn't understand your answer. Do you mean there's something wrong with my environment setup? It looks to me it's Piwigo building the wrong path...
I have notified someone more competent about that
I see the path, but since you have an 'orphelin' bug it should comes from a specifity of your env misleading Piwigo or directly from your env
Offline
Thank you. If there is anything I could do to help let me know. If there are configurations changes in Apache or PHP I can try I can do it.
Ok, I did some more tries:
Upgraded server Windows 2003 -> Windows 2008R2
Upgraded MySQL 5.0.x -> 5.6.19
Upgraded Apache 2.2.x -> 2.4.9
Upgraded PHP 5.4.x -> 5.5.13
Upgraded Piwigo 2.6.2 -> 2.6.3
Environment
•Operating system: WINNT
•PHP: 5.5.13 (Show info) [2014-06-17 21:43:41]
•MySQL: 5.6.19-log [2014-06-17 21:43:41]
•Graphics Library: ImageMagick 6.8.9-1
Same issue:
php[1760]
PHP Fatal error: Uncaught exception 'ImagickException' with message 'UnableToOpenBlob `././upload/2014/06/17/20140617213706-df0a7174.jpg': No such file or directory @ error/blob.c/OpenBlob/2657' in C:\webroot\piwigo\admin\include\image.class.php:416
Stack trace:
#0 C:\webroot\piwigo\admin\include\image.class.php(416): Imagick->__construct('././upload/2014...')
#1 C:\webroot\piwigo\admin\include\image.class.php(87): image_imagick->__construct('././upload/2014...')
#2 C:\webroot\piwigo\i.php(531): pwg_image->__construct('././upload/2014...')
#3 {main}
thrown in C:\webroot\piwigo\admin\include\image.class.php on line 416
And no image is generated.
Images files are uploaded in the correct dir:
C:\webroot\piwigo\upload\2014\06\17>dir
Directory of C:\webroot\piwigo\upload\2014\06\17
17/06/2014 21:37 <DIR> .
17/06/2014 21:37 <DIR> ..
17/06/2014 20:52 875.585 20140617205206-7df8ff57.jpg
17/06/2014 21:05 875.585 20140617210531-7df8ff57.jpg
17/06/2014 21:37 409.722 20140617213706-df0a7174.jpg
17/06/2014 20:52 12 index.htm
4 File(s) 2.160.904 bytes
2 Dir(s) 22.849.662.976 bytes free
But Piwigo generated path can't find them.
A note: in my web setup Piwigo is not the Apache DocumentRoot site - it is run as alias:
Alias /photo "C:\webroot\piwigo"
<Directory "C:\webroot\piwigo">
DirectoryIndex index.php
AllowOverride None
Options None
Order allow,deny
Allow from all
AcceptPathInfo On
Require all granted
</Directory>
Could it impact the path generation?
I made another attempt using FTP and Synchronization, again error...
PHP Fatal error: Uncaught exception 'ImagickException' with message 'UnableToOpenBlob `././galleries/nature/IMG_0053.JPG': No such file or directory @ error/blob.c/OpenBlob/2657' in C:\webroot\piwigo\admin\include\image.class.php:416
Stack trace:
#0 C:\webroot\piwigo\admin\include\image.class.php(416): Imagick->__construct('././galleries/n...')
#1 C:\webroot\piwigo\admin\include\image.class.php(87): image_imagick->__construct('././galleries/n...')
#2 C:\webroot\piwigo\i.php(531): pwg_image->__construct('././galleries/n...')
#3 {main}
thrown in C:\webroot\piwigo\admin\include\image.class.php on line 416
I tried to play with the
$conf['upload_dir'] = './upload';
Configuration, passing full paths, removing the ./, using a backslash... sometime no error was displayed, but the image wasn't uploaded either.
If under Linux works, I guess the paths generated aren't good for Imagick under Windows, or something alike, it looks it can't resolve them to the image paths - don't know what Imagemacick thinks the current directory is.
Many people like me install one or several instance of Piwigo on Windows with Wamp, in local.
So that's your own environment which has something wrong. But we are sorry we don't have many knowledge of the Windows environment as a server
Offline
Ok, understood. Time to drop Piwigo for something developed better.
Bye.
You could try the well known and very mature Gallery. Oh wait! It doesn't support Windows...
Offline
I found solution for windows.
Just need realpath in 2 rows.
file image.class.php
86: $class = 'image_'.$this->library;
87: $source_filepath = realpath($source_filepath);
88: $this->image = new $class($source_filepath);
and
496: file_put_contents($destination_filepath, '');
497: $destination_filepath = realpath($destination_filepath);
Thats work for me.
Sry for ma bad english.
pleas open a ticket http://piwigo.org/bugs/my_view_page.php
Offline
flop25 wrote:
pleas open a ticket http://piwigo.org/bugs/my_view_page.php
Offline
Pages: 1 2