jari Posted February 25, 2007 Share Posted February 25, 2007 Hello I'm having a problem when I try to convert file test.ps to test.png with ghostscript using <?php $cmd = "gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngmono -sOutputFile=test.png test.ps"; system($cmd,$return_val); ?> and nothing happens. $return_val is 1. I'm running the script on /public_html/php/ that has full read/write/exec permissions for all. I also tried with passthru and exec, with no better results. If I execute the same command in command prompt, gs generates the png-file without any problems. Also, if $cmd = "gs -h" the script gives me full listing of ghostscript's help. Could anybody tell me what's wrong? --Jari Link to comment https://forums.phpfreaks.com/topic/40039-cant-execute-ghostscript/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.