$im->readImage( 'filename.pdf[3]' ); seems unbale to open file. ImagickException thrown I'm using: www-servers/apache-2.2.15 dev-lang/php-5.3.3-r1 dev-php5/pecl-imagick-3.0.0 media-gfx/imagemagick-6.6.3.0 media-libs/pdflib-7.0.4_p4-r1 dev-php5/pecl-pdflib-2.1.5 app-text/ghostscript-gpl-8.71-r6 just tested all possible downgrades with non luck. Reproducible: Always Steps to Reproduce: 1.prepare a .php such as this: <?php $image = new Imagick( '' ); $image->readImage( 'test.pdf[2]' ); $image->setImageFormat("png"); //header('Content-type: image/png'); echo $image; ?> 2. test the code via http. Actual Results: 3. read this error on browser or on apache logs: Fatal error: Uncaught exception 'ImagickException' with message 'unable to open image `test.pdf': @ error/blob.c/OpenBlob/2514' in /var/www/localhost/htdocs/nuovaAgenzia/img.php:4 Stack trace: #0 /var/www/localhost/htdocs/nuovaAgenzia/img.php(4): Imagick->readimage('test.pdf[2]') #1 {main} thrown in /var/www/localhost/htdocs/nuovaAgenzia/img.php on line 4 changing test.pdf[2] > test.pdf, the last page of pdf is loaded, instead of the first one. Expected Results: should be loaded the pdf page indicated in [n].
Created attachment 243545 [details] emerge --info
summer was changed, specifing pecl-image version. but I've the same problem in pecl-image-2.3.0. the only difference to reproduce it is in sintax of php file: <?php $image = new Imagick( 'test.pdf' ); //$image->readImage( 'test.pdf' ); $image->setImageFormat('png'); header('Content-type: image/png'); echo $image; ?> The problem arised from me after some ugrade of other software, but now I'm unable to dowgrade system at a working setup.
Hmm, can't reproduce. Using: http://www.scherbaum.info/~tobias/talks/2007-05-19-Die-Gentoo-Metadistribution.pdf moved to test.pdf in the directory i pasted your testscript in. Setup: amd64 php-5.3.3-r1 pecl-imagick-3.0.0 imagemagick-6.6.2.5 (6.6.3 is not stable) pdflib-7.0.2_p8 (not using pecl-pdflib here) ghostscript-gpl-8.71-r1 I was also able to use bracket notation on __construct('test.pdf[1]') to get the second page of the presentation. Is this still an issue for you?
(In reply to comment #3) > Hmm, can't reproduce. > > > Is this still an issue for you? > sorry. I can't test on this week. if you are wright, I'll mark fixed this bug as invalid by myself. thank.
I don't understand. I'm fighting against my issue, but I'm not able to change bad behaviour. What can I do to discover some unstability in my system? now, I've uninstalled pecl-pdflib and I've dowgraded all my software to your versions, without luky.
I cannot reproduce this with pecl-imagick-3.0.1-r1. Have you tried upgrading to the latest versions the packages you mentioned?
Created attachment 258243 [details] autounmask log (In reply to comment #6) > I cannot reproduce this with pecl-imagick-3.0.1-r1. Have you tried upgrading to > the latest versions the packages you mentioned? > this gives me a new problem: unmasking pecl-imagick-3.0.1-r1, arise a conflict beteween dev-lang/php-5.3.4 and media-libs/ming-0.4.3 should I open a new bug?
(In reply to comment #7) > Created an attachment (id=258243) [details] > autounmask log > > (In reply to comment #6) > > I cannot reproduce this with pecl-imagick-3.0.1-r1. Have you tried upgrading to > > the latest versions the packages you mentioned? > > > this gives me a new problem: > unmasking pecl-imagick-3.0.1-r1, arise a conflict beteween dev-lang/php-5.3.4 > and media-libs/ming-0.4.3 > > should I open a new bug? > Yes. Open a new bug and say that the php-ext-source-r1 eclass must be removed from the ming ebuild. Ming doesn't even support the php useflag anymore, as far as I can see.
done. http://bugs.gentoo.org/show_bug.cgi?id=349969
shit. running strace over http command, I found that Imagick imagick was searching 'test.pdf' in a absolute path, instead of a relative one. putting in the absolute path, php command runs fine. is this a correct behaviour for the command, or depends from such parameter in my apache or php configuration? thanks for patience.
I tested with a relative path and that worked well. I am not aware of any configuration option that affects this behaviour. If you suspect it has something to do with a configuration param, I recommend you test with the default configs.
Having a look at the source, the extension converts your relative path to an absolute one and checks if it can read/write that one (compare imagick_read.c:191). Maybe this is what you're seeing with strace. Just to clarify: does latest pecl-imagick work for you as expected now?
Been a few months without any answers. Guess it works then.
(In reply to comment #13) > Been a few months without any answers. Guess it works then. sorry. I'm not working here. if you like, close the bug. if needed, may it be I'll came back later.