Bug #55221 [NEW]: shell_exec works very slow with Apache

From: Date: Sun, 17 Jul 2011 16:56:31 +0000
Subject: Bug #55221 [NEW]: shell_exec works very slow with Apache
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-161937@lists.php.net to get a copy of this message
From:             
Operating system: Mac OS X 10.6.8
PHP version:      5.3.6
Package:          Performance problem
Bug Type:         Bug
Bug description:shell_exec works very slow with Apache

Description:
------------
Running commands with shell_exec in browser is working very slower than
CLI. I'm 
having same problem with system() and proc_open(). 

Running from shell takes 0.11 sec, but running from browser takes 16.96
second. 
I tested out same code in Linux Ubuntu, same problem happens. 

CLI
------------

float(0.11125087738037)
string(211) "graph_left = 67
graph_top = 33
graph_width = 800
graph_height = 200
image_width = 882
image_height = 273
graph_start = 1310835249
graph_end = 1310921349
value_min = 0.0000000000e+00
value_max = 1.1000000000e+00
"

Browser / Apache
------------

float 16.960417032242
string 'graph_left = 67
graph_top = 33
graph_width = 800
graph_height = 200
image_width = 882
image_height = 273
graph_start = 1310834364
graph_end = 1310920464
value_min = 0.0000000000e+00
value_max = 1.1000000000e+00
' (length=211)

Test script:
---------------
<?php

$start = microtime(1);
$output = shell_exec($executor->getCommandString());
$end = microtime(1);
var_dump($end - $start, $output);


-- 
Edit bug report at https://bugs.php.net/bug.php?id=55221&edit=1
-- 
Try a snapshot (PHP 5.2):            https://bugs.php.net/fix.php?id=55221&r=trysnapshot52
Try a snapshot (PHP 5.3):            https://bugs.php.net/fix.php?id=55221&r=trysnapshot53
Try a snapshot (trunk):              https://bugs.php.net/fix.php?id=55221&r=trysnapshottrunk
Fixed in SVN:                        https://bugs.php.net/fix.php?id=55221&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55221&r=needdocs
Fixed in release:                    https://bugs.php.net/fix.php?id=55221&r=alreadyfixed
Need backtrace:                      https://bugs.php.net/fix.php?id=55221&r=needtrace
Need Reproduce Script:               https://bugs.php.net/fix.php?id=55221&r=needscript
Try newer version:                   https://bugs.php.net/fix.php?id=55221&r=oldversion
Not developer issue:                 https://bugs.php.net/fix.php?id=55221&r=support
Expected behavior:                   https://bugs.php.net/fix.php?id=55221&r=notwrong
Not enough info:                     https://bugs.php.net/fix.php?id=55221&r=notenoughinfo
Submitted twice:                     https://bugs.php.net/fix.php?id=55221&r=submittedtwice
register_globals:                    https://bugs.php.net/fix.php?id=55221&r=globals
PHP 4 support discontinued:          https://bugs.php.net/fix.php?id=55221&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55221&r=dst
IIS Stability:                       https://bugs.php.net/fix.php?id=55221&r=isapi
Install GNU Sed:                     https://bugs.php.net/fix.php?id=55221&r=gnused
Floating point limitations:          https://bugs.php.net/fix.php?id=55221&r=float
No Zend Extensions:                  https://bugs.php.net/fix.php?id=55221&r=nozend
MySQL Configuration Error:           https://bugs.php.net/fix.php?id=55221&r=mysqlcfg
Try a snapshot (PHP 5.4):            https://bugs.php.net/fix.php?id=55221&r=trysnapshot54



Thread (3 messages)

« previous php.bugs (#161937) next »