Pages: 1 2
Thanks a lot!
Offline
thanks for share
hakastein wrote:
flop25 wrote:
pleas open a ticket http://piwigo.org/bugs/my_view_page.php
Offline
Thanks hakastein.
This really points out the apathy towards making things work on Windows. This was reported (with a fix) in 2013 in http://piwigo.org/forum/viewtopic.php?id=22796. Even today, your bug report with a fix stands untouched!
I reported what I think was the same problem in 2015 (http://piwigo.org/forum/viewtopic.php?id=25260) and the response was that "it should work".
I request developers to please get these teething problems with making things work in Windows sorted out so that we can also use, enjoy and contribute to the software that you have created.
Offline
Update: I find that in my system, the fix proposed by http://piwigo.org/forum/viewtopic.php?id=22796 is the one that works.
Offline
Thanks for reporting
For the record some of us are using Windows as dev environment and I personally never could reproduce so...
Offline
Hello,
Is still have this old issue with ImageMagic on Windows.
The fix provided aboves does not work as the second lines are differnt now:
Staring 491:
function write($destination_filepath)
{
// use 4:2:2 chroma subsampling (reduce file size by 20-30% with "almost" no human perception)
$this->image->setSamplingFactors( array(2,1) );
return $this->image->writeImage($destination_filepath);
}
}
I tried to add :
$destination_filepath = realpath($destination_filepath);
before
return $this->image->writeImage($destination_filepath);
When I run it I, have errors in my apace log: "Can not use empty string as a filename' "
[Mon Jun 27 11:28:55.139464 2016] [:error] [pid 2716:tid 752] [client 192.168.100.33:55473] PHP Fatal error: Uncaught exception 'ImagickException' with message 'Can not use empty string as a filename' in C:\\SecureWAMP\\htdocs\\piwigo\\admin\\include\\image.class.php:496\nStack trace:\n#0 C:\\SecureWAMP\\htdocs\\piwigo\\admin\\include\\image.class.php(496): Imagick->writeimage('')\n#1 [internal function]: image_imagick->write('./_data/i/uploa...')\n#2 C:\\SecureWAMP\\htdocs\\piwigo\\admin\\include\\image.class.php(94): call_user_func_array(Array, Array)\n#3 C:\\SecureWAMP\\htdocs\\piwigo\\i.php(615): pwg_image->__call('write', Array)\n#4 C:\\SecureWAMP\\htdocs\\piwigo\\i.php(615): pwg_image->write('./_data/i/uploa...')\n#5 {main}\n thrown in C:\\SecureWAMP\\htdocs\\piwigo\\admin\\include\\image.class.php on line 496, referer: http://mediaserverprd/piwigo/index.php?/category/19
removed it. and now I only have the mod in Lines 87 in the code. But still the Error with "No such File" ...
[Mon Jun 27 11:36:54.056255 2016] [:error] [pid 3740:tid 732] [client 192.168.100.33:55558] PHP Fatal error: Uncaught exception 'ImagickException' with message 'unable to open image `./_data/i/upload/2016/06/26/20160626173238-e2821fec-me.jpg': No such file or directory @ error/blob.c/OpenBlob/2702' in C:\\SecureWAMP\\htdocs\\piwigo\\admin\\include\\image.class.php:495\nStack trace:\n#0 C:\\SecureWAMP\\htdocs\\piwigo\\admin\\include\\image.class.php(495): Imagick->writeimage('./_data/i/uploa...')\n#1 [internal function]: image_imagick->write('./_data/i/uploa...')\n#2 C:\\SecureWAMP\\htdocs\\piwigo\\admin\\include\\image.class.php(94): call_user_func_array(Array, Array)\n#3 C:\\SecureWAMP\\htdocs\\piwigo\\i.php(615): pwg_image->__call('write', Array)\n#4 C:\\SecureWAMP\\htdocs\\piwigo\\i.php(615): pwg_image->write('./_data/i/uploa...')\n#5 {main}\n thrown in C:\\SecureWAMP\\htdocs\\piwigo\\admin\\include\\image.class.php on line 495, referer: http://mediaserverprd/piwigo/picture.php?/2050/category/19
Looks like there are still problems with the paths.
This was working for me but one of the last updates must have changed something.
Before the Modification porived above helped me.
Thanks in Advance for your support
hi
what's in your environnement in details ? Wich Windows, which software runs the server and which server and php etc
Offline
I am running
Piwigo 2.8.1
Windows NT MEDIASERVERPRD 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586
Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.10 (using http://securewamp.org/de/ )
PHP Version 5.4.10
\ImageMagick-7.0.2-Q16;
imagick module version 3.4.1
imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version ImageMagick 6.8.9-1 Q16 x86 2014-05-08 http://www.imagemagick.org
Imagick using ImageMagick library version ImageMagick 6.9.3-7 Q16 x86 2016-03-06 http://www.imagemagick.org
ImageMagick copyright Copyright (C) 1999-2015 ImageMagick Studio LLC
ImageMagick release date 2016-03-06
But as mentioned Think it is not in image magic, but in Piwigo the path issue.
Using GD lib it is working ok now.
I know I am running some old stuff in there, but I do not believe that this is the issue... As it has been working before i did the upgrade and forgot about my modifications I did as advised here.
I guess the image class with the funciton:
Staring 491:
function write($destination_filepath)
{
// use 4:2:2 chroma subsampling (reduce file size by 20-30% with "almost" no human perception)
$this->image->setSamplingFactors( array(2,1) );
return $this->image->writeImage($destination_filepath);
}
has to be fixes for windows someHow that the paths are fine.
Thanks again for your Support!
thx for your great report. Let's see the environnement of others users on that thread and we may find a common specificity in order to get starting point
Offline
Ok, lets see if there are more ...
Are there any know "ready to use" / preconfigures WAMP systems with image magic that work out of the box on windows? (doid not search until now... )
May be I will try do a migration than ... if that would solve my issue.
luckily the server is virtual :D
Here's the complete diff that I had to do. This was against the latest code.
*** c:/Piwigo/admin/include/image.class.php.~1~ 2016-03-04 16:20:11.414705700 +0530
--- c:/Piwigo/admin/include/image.class.php 2016-05-18 10:47:19.114101100 +0530
***************
*** 84,90 ****
}
$class = 'image_'.$this->library;
! $this->image = new $class($source_filepath);
}
// Unknow methods will be redirected to image object
--- 84,90 ----
}
$class = 'image_'.$this->library;
! $this->image = new $class(__DIR__ . DIRECTORY_SEPARATOR . '../../' . $source_filepath);
}
// Unknow methods will be redirected to image object
***************
*** 492,498 ****
{
// use 4:2:2 chroma subsampling (reduce file size by 20-30% with "almost" no human perception)
$this->image->setSamplingFactors( array(2,1) );
! return $this->image->writeImage($destination_filepath);
}
}
--- 492,499 ----
{
// use 4:2:2 chroma subsampling (reduce file size by 20-30% with "almost" no human perception)
$this->image->setSamplingFactors( array(2,1) );
! error_log("B: " . $destination_filepath . " A: " . __DIR__ . DIRECTORY_SEPARATOR . '../../' . $destination_filepath);
! return $this->image->writeImage(__DIR__ . DIRECTORY_SEPARATOR . '../../' . $destination_filepath);
}
}
Offline
Thanks! SOLVED!
Your modification did the job ....
Now I have to be carefull with updates.
So it is working with:
Betriebssystem: WINNT
PHP: 5.4.10 (Info anzeigen) [2016-10-08 12:37:08]
MySQL: 5.5.29 [2016-10-08 12:37:08]
Grafikbibliothek: ImageMagick 6.9.3-7
secure WAMP
Here is a Solution for:
Betriebssystem: WINNT
PHP: 5.4.10 (Info anzeigen) [2016-10-08 12:37:08]
MySQL: 5.5.29 [2016-10-08 12:37:08]
Grafikbibliothek: ImageMagick 6.9.3-7
http://piwigo.org/forum/viewtopic.php?p … 80#p164880
I would like to confirm the directory separator worked for me in 2019 for a windows 2016 box utilizing xampp.
Piwigo 2.10.1
Operating system: WINNT
PHP: 7.3.10 [2019-10-31
MySQL: 5.5.5-10.4.8-MariaDB [2019-10-31
Graphics Library: ImageMagick 7.0.7-11
I was getting the PHP Fatal error: Uncaught ImagickException: UnableToOpenBlob '././upload/2019/10/30/<blah>': No such file or directory @ error/blob.c/OpenBlob/3315 in
C:\\xampp\\htdocs\\piwigo\\admin\\include\\image.class.php:400\nStack trace:\n#0 C:\\xampp\\htdocs\\piwigo\\admin\\include\\image.class.php(400): Imagick->__construct('././upload/2019...')\n#1 C:\\xampp\\htdocs\\piwigo\\admin\\include\\image.class.php(72)
I tried the realpath fix from earlier posts and went that direction for a few hours. That was unsuccessful for the most part. Then tried sridharb's fix. Uploaded with same batch job i've been trying to do, and bam, it worked with thumbnails and images loading.
At this version for anyone else running into this, edit the file: image.class.php
at line 71 and 72 you will see:
$class = 'image_'.$this->library;
$this->image = new $class($source_filepath);
Comment out with //$this->image = new $class($source_filepath);
Add this line:
$this->image = new $class(__DIR__ . DIRECTORY_SEPARATOR . '../../' . $source_filepath);
You will do this again at the 480 line and it should look similar to this:
$this->image->setSamplingFactors( array(2,1) );
//return $this->image->writeImage($destination_filepath);
error_log("B: " . $destination_filepath . " A: " . __DIR__ . DIRECTORY_SEPARATOR . '../../' . $destination_filepath);
return $this->image->writeImage(__DIR__ . DIRECTORY_SEPARATOR . '../../' . $destination_filepath);
Last edited by ardisian (2019-10-31 21:01:58)
Offline
Pages: 1 2