Php Imagick not working after ubuntu upgrade
I am getting an error while converting pdf to image file on server but working on local system.
My Php Script
$img = new Imagick();
$image = file_get_contents($file);
$img->readImageBlob($image);
$response = $img->getnumberimages();
Error Occurred
Unrecoverable error: typecheck in .bind
Operand stack:
--nostringval-- typecheck --nostringval-- currentglobal .currentglobal
System Configurations
Local System Configuration
Imagick: ImageMagick 6.7.7-10 2018-09-28
UBUNTU: 14.04 LTS
PHP: PHP 7.0.32-4+ubuntu14.04.1+deb.sury.org+1
gs: 9.25
Server System Configuration
Imagick: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28
UBUNTU: 16.04.1 LTS
PHP: PHP 7.0.32-0ubuntu0.16.04.1
gs: 9.25
I have trying to revert version of Imagick to 6.7 but not able to revert the version
Also I have try to change policy.xml file but no luck.
php ubuntu-14.04 ubuntu-16.04 ghostscript imagick
add a comment |
I am getting an error while converting pdf to image file on server but working on local system.
My Php Script
$img = new Imagick();
$image = file_get_contents($file);
$img->readImageBlob($image);
$response = $img->getnumberimages();
Error Occurred
Unrecoverable error: typecheck in .bind
Operand stack:
--nostringval-- typecheck --nostringval-- currentglobal .currentglobal
System Configurations
Local System Configuration
Imagick: ImageMagick 6.7.7-10 2018-09-28
UBUNTU: 14.04 LTS
PHP: PHP 7.0.32-4+ubuntu14.04.1+deb.sury.org+1
gs: 9.25
Server System Configuration
Imagick: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28
UBUNTU: 16.04.1 LTS
PHP: PHP 7.0.32-0ubuntu0.16.04.1
gs: 9.25
I have trying to revert version of Imagick to 6.7 but not able to revert the version
Also I have try to change policy.xml file but no luck.
php ubuntu-14.04 ubuntu-16.04 ghostscript imagick
add a comment |
I am getting an error while converting pdf to image file on server but working on local system.
My Php Script
$img = new Imagick();
$image = file_get_contents($file);
$img->readImageBlob($image);
$response = $img->getnumberimages();
Error Occurred
Unrecoverable error: typecheck in .bind
Operand stack:
--nostringval-- typecheck --nostringval-- currentglobal .currentglobal
System Configurations
Local System Configuration
Imagick: ImageMagick 6.7.7-10 2018-09-28
UBUNTU: 14.04 LTS
PHP: PHP 7.0.32-4+ubuntu14.04.1+deb.sury.org+1
gs: 9.25
Server System Configuration
Imagick: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28
UBUNTU: 16.04.1 LTS
PHP: PHP 7.0.32-0ubuntu0.16.04.1
gs: 9.25
I have trying to revert version of Imagick to 6.7 but not able to revert the version
Also I have try to change policy.xml file but no luck.
php ubuntu-14.04 ubuntu-16.04 ghostscript imagick
I am getting an error while converting pdf to image file on server but working on local system.
My Php Script
$img = new Imagick();
$image = file_get_contents($file);
$img->readImageBlob($image);
$response = $img->getnumberimages();
Error Occurred
Unrecoverable error: typecheck in .bind
Operand stack:
--nostringval-- typecheck --nostringval-- currentglobal .currentglobal
System Configurations
Local System Configuration
Imagick: ImageMagick 6.7.7-10 2018-09-28
UBUNTU: 14.04 LTS
PHP: PHP 7.0.32-4+ubuntu14.04.1+deb.sury.org+1
gs: 9.25
Server System Configuration
Imagick: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28
UBUNTU: 16.04.1 LTS
PHP: PHP 7.0.32-0ubuntu0.16.04.1
gs: 9.25
I have trying to revert version of Imagick to 6.7 but not able to revert the version
Also I have try to change policy.xml file but no luck.
php ubuntu-14.04 ubuntu-16.04 ghostscript imagick
php ubuntu-14.04 ubuntu-16.04 ghostscript imagick
edited Nov 16 '18 at 9:38
Aabir Hussain
asked Nov 16 '18 at 9:28
Aabir HussainAabir Hussain
4331520
4331520
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Reverting Image Magick most likely won't do you any good anyway, since that is a Ghostscript error message.
Without seeing the input file I can't guess at what's wrong, but in the absence of that you have 2 choices;
1) Revert your Ghostscript version to 9.23 and try again.
2) Try building Ghostscript from source, its possible that the package maintainers have made some change which isn't in the vanilla sources, and is only exposed on the later version of Ubuntu.
You could also try running Ghostscript on the command line and see what happens on the two systems. You'll need to get the command line from polixy.xml and replace the various variables with the correct filenames.
You can try that on both systems to see what happens. Finally, you can compare the binary size of the Ghostscript executable, to see if they are actually the same on the two systems. If they are not you could copy the working one from your local system to your server and see if that works.
thanks for time. But how do I revert gs version. I have try sudo apt-get install ghostscript=9.23 but giving me error like => E: Version '9.23' for 'ghostscript' was not found
– Aabir Hussain
Nov 16 '18 at 11:05
Sorry I'm not a Linux expert. If it were me I'd just get the binary from the Ghostscript download site at www.ghostscript.com and try that (old binaries are still available I think), or build the executable from source.
– KenS
Nov 16 '18 at 13:11
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53334905%2fphp-imagick-not-working-after-ubuntu-upgrade%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Reverting Image Magick most likely won't do you any good anyway, since that is a Ghostscript error message.
Without seeing the input file I can't guess at what's wrong, but in the absence of that you have 2 choices;
1) Revert your Ghostscript version to 9.23 and try again.
2) Try building Ghostscript from source, its possible that the package maintainers have made some change which isn't in the vanilla sources, and is only exposed on the later version of Ubuntu.
You could also try running Ghostscript on the command line and see what happens on the two systems. You'll need to get the command line from polixy.xml and replace the various variables with the correct filenames.
You can try that on both systems to see what happens. Finally, you can compare the binary size of the Ghostscript executable, to see if they are actually the same on the two systems. If they are not you could copy the working one from your local system to your server and see if that works.
thanks for time. But how do I revert gs version. I have try sudo apt-get install ghostscript=9.23 but giving me error like => E: Version '9.23' for 'ghostscript' was not found
– Aabir Hussain
Nov 16 '18 at 11:05
Sorry I'm not a Linux expert. If it were me I'd just get the binary from the Ghostscript download site at www.ghostscript.com and try that (old binaries are still available I think), or build the executable from source.
– KenS
Nov 16 '18 at 13:11
add a comment |
Reverting Image Magick most likely won't do you any good anyway, since that is a Ghostscript error message.
Without seeing the input file I can't guess at what's wrong, but in the absence of that you have 2 choices;
1) Revert your Ghostscript version to 9.23 and try again.
2) Try building Ghostscript from source, its possible that the package maintainers have made some change which isn't in the vanilla sources, and is only exposed on the later version of Ubuntu.
You could also try running Ghostscript on the command line and see what happens on the two systems. You'll need to get the command line from polixy.xml and replace the various variables with the correct filenames.
You can try that on both systems to see what happens. Finally, you can compare the binary size of the Ghostscript executable, to see if they are actually the same on the two systems. If they are not you could copy the working one from your local system to your server and see if that works.
thanks for time. But how do I revert gs version. I have try sudo apt-get install ghostscript=9.23 but giving me error like => E: Version '9.23' for 'ghostscript' was not found
– Aabir Hussain
Nov 16 '18 at 11:05
Sorry I'm not a Linux expert. If it were me I'd just get the binary from the Ghostscript download site at www.ghostscript.com and try that (old binaries are still available I think), or build the executable from source.
– KenS
Nov 16 '18 at 13:11
add a comment |
Reverting Image Magick most likely won't do you any good anyway, since that is a Ghostscript error message.
Without seeing the input file I can't guess at what's wrong, but in the absence of that you have 2 choices;
1) Revert your Ghostscript version to 9.23 and try again.
2) Try building Ghostscript from source, its possible that the package maintainers have made some change which isn't in the vanilla sources, and is only exposed on the later version of Ubuntu.
You could also try running Ghostscript on the command line and see what happens on the two systems. You'll need to get the command line from polixy.xml and replace the various variables with the correct filenames.
You can try that on both systems to see what happens. Finally, you can compare the binary size of the Ghostscript executable, to see if they are actually the same on the two systems. If they are not you could copy the working one from your local system to your server and see if that works.
Reverting Image Magick most likely won't do you any good anyway, since that is a Ghostscript error message.
Without seeing the input file I can't guess at what's wrong, but in the absence of that you have 2 choices;
1) Revert your Ghostscript version to 9.23 and try again.
2) Try building Ghostscript from source, its possible that the package maintainers have made some change which isn't in the vanilla sources, and is only exposed on the later version of Ubuntu.
You could also try running Ghostscript on the command line and see what happens on the two systems. You'll need to get the command line from polixy.xml and replace the various variables with the correct filenames.
You can try that on both systems to see what happens. Finally, you can compare the binary size of the Ghostscript executable, to see if they are actually the same on the two systems. If they are not you could copy the working one from your local system to your server and see if that works.
answered Nov 16 '18 at 10:46
KenSKenS
22.6k12233
22.6k12233
thanks for time. But how do I revert gs version. I have try sudo apt-get install ghostscript=9.23 but giving me error like => E: Version '9.23' for 'ghostscript' was not found
– Aabir Hussain
Nov 16 '18 at 11:05
Sorry I'm not a Linux expert. If it were me I'd just get the binary from the Ghostscript download site at www.ghostscript.com and try that (old binaries are still available I think), or build the executable from source.
– KenS
Nov 16 '18 at 13:11
add a comment |
thanks for time. But how do I revert gs version. I have try sudo apt-get install ghostscript=9.23 but giving me error like => E: Version '9.23' for 'ghostscript' was not found
– Aabir Hussain
Nov 16 '18 at 11:05
Sorry I'm not a Linux expert. If it were me I'd just get the binary from the Ghostscript download site at www.ghostscript.com and try that (old binaries are still available I think), or build the executable from source.
– KenS
Nov 16 '18 at 13:11
thanks for time. But how do I revert gs version. I have try sudo apt-get install ghostscript=9.23 but giving me error like => E: Version '9.23' for 'ghostscript' was not found
– Aabir Hussain
Nov 16 '18 at 11:05
thanks for time. But how do I revert gs version. I have try sudo apt-get install ghostscript=9.23 but giving me error like => E: Version '9.23' for 'ghostscript' was not found
– Aabir Hussain
Nov 16 '18 at 11:05
Sorry I'm not a Linux expert. If it were me I'd just get the binary from the Ghostscript download site at www.ghostscript.com and try that (old binaries are still available I think), or build the executable from source.
– KenS
Nov 16 '18 at 13:11
Sorry I'm not a Linux expert. If it were me I'd just get the binary from the Ghostscript download site at www.ghostscript.com and try that (old binaries are still available I think), or build the executable from source.
– KenS
Nov 16 '18 at 13:11
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53334905%2fphp-imagick-not-working-after-ubuntu-upgrade%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown