Forums / Developer / system() blocked in my ISP

system() blocked in my ISP

Author Message

Piotr Switkowski

Tuesday 15 January 2008 3:04:49 am

The hosting company informed me, that for security reasons they blocked access to system(). Insted, they adviced me to use shell_exec. system() is used to call imageMagick and it seems to me, that would need to modify ezPublish code. Could someone advice a better solution.

Could anyone tell me if

system($command, $result) 

is equivalent to

$result=shell_exec( $command)

And suggestion, if more people is facing same problem, maybe it is worth to add a ini setting in ezPublish to allow to select system or shell_exec

Marco Zinn

Tuesday 15 January 2008 7:57:32 am

Hello Piotr,

just a comment: If possible, you may want to try using the GD extension in PHP. I think, in most PHP builds, the GD extension is compiled in.
If this is true for your ISP, you can tell eZ to use PHP's GD functions instead of ImageMagick. This removes the need for system calls (for images manipulation, at least).

You can check for GD with a phpinfo()-File or in an existing eZ installation in Admin Interface -> Setup -> System information, then look for "Extensions" in the "PHP" block.
Or ask your ISP ;)

Maybe this is a valid work-around for you.

Marco
http://www.hyperroad-design.com