Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8049877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:54:32+00:00 2026-06-05T06:54:32+00:00

I have ImageMagick, IIS 6, Ghostscript, and PHP 5.3.1 installed on a Windows Server

  • 0

I have ImageMagick, IIS 6, Ghostscript, and PHP 5.3.1 installed on a Windows Server 2008 box and am trying to convert a PDF file into a JPG thumbnail.

However, it doesn’t seem to be working– the call to exec() produces a return code of 1 (which to my understanding, means that some general error has occurred). The output variable is simply an empty array. $output is simply an empty array. The same occurs if I use system() instead of exec()

Running the command from the command line seems to work, so my initial guess would be a simple permission issue… The directory is writable by PHP because the script that uploads a PDF to the directory works, and I have verified that everyone has permission to write to the directory as well.

Also, safe mode is off.

Any ideas as to what the issue could be?

Relevant code:

<?php
    $output = array();
    $ret = 0;
    echo exec('convert D:\content\myfile.pdf[0] D:\content\myfile_thumb_1.jpg', $output, $ret);
    var_dump($ret);
?>

Note: While I would test this on Apache on Mac OS X, I can’t seem to get ImageMagick or Ghostscript installed correctly.

I’ve also ensured the following:

  • Correct case for the file names (all lowercase anyways)
  • Using the full path of convert.exe in addition to simply convert.exe

UPDATE:

After checking the task manager, convert.exe is being run and is taking up CPU time, suggesting to me that it is file permissions of some sort… I’m going to check it out now.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:54:33+00:00Added an answer on June 5, 2026 at 6:54 am

    It turns out there was a permission issue with something in IIS– the website ran under a different user than the command from CMD, which obviously results in it not working under IIS because it has lesser permissions than from CMD.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have ImageMagick installed on my CentOS linux server. I am trying to get
I have ghostscript and imagemagick installed in my C drive and i have my
I have to use imagemagick convert command from php. So I'm using shell_exec but
I have this code running in CentOS 5.5 ,PHP 5.1.6 ,Apache/2.2.3 ,ImageMagick 6.2.8 $convert
I'm trying to use Imagemagick convert.exe with Flex4 NativeProcess. I know I have it
I have a text files which I'm trying to convert into images. I know
I have just started doing some ImageMagick work. I am currently trying to convert
I have had been on a roller coaster trying to get ImageMagick to work
I have been trying to call the NewPixelRegionIterator function in ImageMagick's library from C#
I have some websites that use ImageMagick to convert images and place them in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.