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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 14:52:22
Script start
Timing: Jan 18 2025 14:52:22
Module start 'layout'
Timing: Jan 18 2025 14:52:22
Module start 'content'
Timing: Jan 18 2025 14:52:23
Module end 'content'
Timing: Jan 18 2025 14:52:23
Script end

Main resources:

Total runtime1.5363 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.9141152.6250
Module start 'layout' 0.00580.0029 740.539139.4453
Module start 'content' 0.00871.5261 779.9844525.5469
Module end 'content' 1.53480.0014 1,305.53138.1641
Script end 1.5362  1,313.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2009160.0002
Check MTime0.00120.0805160.0001
Mysql Total
Database connection0.00060.038710.0006
Mysqli_queries1.492097.1210540.0276
Looping result0.00060.0358520.0000
Template Total1.490597.020.7452
Template load0.00210.133820.0010
Template processing1.488496.885620.7442
Template load and register function0.00020.011510.0002
states
state_id_array0.00170.110310.0017
state_identifier_array0.00330.215120.0017
Override
Cache load0.00170.1114170.0001
Sytem overhead
Fetch class attribute can translate value0.00060.040620.0003
Fetch class attribute name0.00110.070030.0004
XML
Image XML parsing0.00070.042820.0003
class_abstraction
Instantiating content class attribute0.00000.000430.0000
General
dbfile0.00080.0521160.0000
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs