I am using IIS.
I tried what you suggested and I also tried the attached code.
Any other ideas? I don't need any information sent back to the php script, I just want it to run the command.
Main Topics
Browse All TopicsI am trying to convert a pdf to a jpg with php. I have installed ghostscript and imagemagick. On the webserver I can run the following code from the command prompt successfully.
C:\ convert a.pdf a.jpg
When I try it in PHP I get the folloing error.
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.
Thanks for any help.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi,
Here is some information:
http://answers.google.com/
It sounds like IIS is causing the permission problems, as they elaborates more in the discussion, however at the end no immediate solutions were found.
Another suggestion may be to try apache as oppose to IIS?
Goodluck :)
In order for this to work, the user running PHP (typically the IUSR or similar account) needs read and execute access to the directory holding the executable, read access (and possibly execute) to any supporting files used by the executable, and modify access to the directories in which the work is being done. There may be other permissions involved as well...exec'ing from IIS is a complicated topic.
You'll want this:
http://live.sysinternals.c
Business Accounts
Answer for Membership
by: nizsmoPosted on 2009-01-08 at 09:17:50ID: 23327214
Try to output a set of correct headers, such as:
print "HTTP/1.0 200 OK\n";
print "Content-Type: text/html\n\n\n";
And see if it solves the problem.
Are you using IIS or apache? This is a common problem/bug on IIS.