CONVERT.exe in PHP script doesn't work, but it's OK FROM cmd
Posted: 2008-05-08T05:51:01-07:00
HI All, i'm new with ImageMagick and i'va a very strange problem.
i work on my Windows XP pro sp2 machine, with IIS and PHP 5.2.5
i've installed ghostscript, imagemagick static q16 version, and set the PATH variable correctly (i hope!).
From a command prompt, this command convert a .ps image into a .png image
where "e:\wikimath\imagick" is my application path. All works very fine.
BUT...
if I put the command in a simple php page into my personal webserver, like this
nothing happens, and i've have no error messages.
also, from a phpinfo() command , the system variable is:
Path: e:\wikimath\imagick;e:\wikimath\miktex\miktex\bin;D:\php\;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;D:\Program Files\Microsoft SQL Server\90\Tools\binn\;D:\Program Files\Microsoft SQL Server\90\DTS\Binn\;D:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\Smart Projects\IsoBuster;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;d:\php\ext;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\IrfanView;E:\wikimath\gs\gs8.54\bin
i've also copied and renamed the ghostscript executable gswin32c.exe in gs.exe, and from a command prompt all the executables files run fine.
please, there is a solution on my problem?
regards, stefano
i work on my Windows XP pro sp2 machine, with IIS and PHP 5.2.5
i've installed ghostscript, imagemagick static q16 version, and set the PATH variable correctly (i hope!).
From a command prompt, this command convert a .ps image into a .png image
Code: Select all
e:\wikimath\imagick\convert e:\wikimath\imagick\input.ps e:\wikimath\imagick\output.png
BUT...
if I put the command in a simple php page into my personal webserver, like this
Code: Select all
<?php
echo exec('e:\wikimath\imagick\convert e:\wikimath\imagick\input.ps e:\wikimath\imagick\output.png');
?>
also, from a phpinfo() command , the system variable is:
Path: e:\wikimath\imagick;e:\wikimath\miktex\miktex\bin;D:\php\;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;D:\Program Files\Microsoft SQL Server\90\Tools\binn\;D:\Program Files\Microsoft SQL Server\90\DTS\Binn\;D:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\Smart Projects\IsoBuster;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;d:\php\ext;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\IrfanView;E:\wikimath\gs\gs8.54\bin
i've also copied and renamed the ghostscript executable gswin32c.exe in gs.exe, and from a command prompt all the executables files run fine.
please, there is a solution on my problem?
regards, stefano