Bug #69077 [NEW]: system() and exec() functions

From: Date: Thu, 19 Feb 2015 07:21:39 +0000
Subject: Bug #69077 [NEW]: system() and exec() functions
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190798@lists.php.net to get a copy of this message
From: postmaster at angosso dot net Operating system: Linux (Redhat) PHP version: 5.6.5 Package: Built-in web server Bug Type: Bug Bug description:system() and exec() functions Description: ------------ LiveAPI System - The exec() Method The exec() method executes a cPanel tag Test script: --------------- exec() and system() /etc/php.ini/ php_admin_value <?php echo '<?xml version="1.0"?>'; ?> // Execute the feature tag. $cpanel->exec(feature,1); Enable system() and exec() functions on hosting? Expected result: ---------------- <?php echo '<Access the cgi-bin location in the root of my website cd /home/cpanel-user/public-html/cgi-bin php.ini to it cp /usr/local/lib/php.ini /home/angosson/public_html/cgi-bin vi php.ini create php.fcgi file to load the custom php.ini in /home/angosson/public_html/cgi-bin with the following code #!/bin/sh export PHP_FCGI_CHILDREN=1 export PHP_FCGI_MAX_REQUESTS=10 exec /usr/local/cpanel/cgi-sys/php5 /etc/httpd/conf/php.conf Correct the ownership and permssion of the files chown -R user.user /home/cpanel-user/public_html/cgi-bin/ chmod 755 /home/angosson/public_html/cgi-bin/php.fcgi .htaccess file in the root to point to php.fcgi wrapper cd /home/cpanel-user/public_html vi .htaccess AddHandler php5-fastcgi .php Action php5-fastcgi /cgi-bin/php.fcgi # Fastcgi configuration for PHP5 LoadModule fcgid_module modules/mod_fcgid.so MaxRequestsPerProcess 500 AddHandler fcgid-script .php5 .php4 .php .php3 .php2 .phtml Action php5-fastcgi /cgi-bin/php.fcgi AddType application/x-httpd-php .php FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php5 FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php4 FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php3 FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php2 FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .phtml rebuild the apache configurations /usr/local/cpanel/bin/apache_conf_distiller –update /scripts/rebuildhttpdconf /etc/init.d/httpd restart'>; // Outputs all the result of shellcommand "ls", and returns // the last output line into $last_line. Stores the return value // of the shell command in $retval. $last_line = system('ls', $retval); // Printing additional info echo ' </pre> <hr />Last line of the output: ' . $last_line . ' <hr />Return value: ' . $retval; ?> -- Edit bug report at https://bugs.php.net/bug.php?id=69077&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69077&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69077&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69077&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=69077&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=69077&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=69077&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=69077&r=needscript Try newer version: https://bugs.php.net/fix.php?id=69077&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=69077&r=support Expected behavior: https://bugs.php.net/fix.php?id=69077&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=69077&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=69077&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=69077&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69077&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=69077&r=dst IIS Stability: https://bugs.php.net/fix.php?id=69077&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=69077&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=69077&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=69077&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=69077&r=mysqlcfg

« previous php.bugs (#190798) next »