webmaster1 Posted May 27, 2010 Share Posted May 27, 2010 I'm installing a software on a hosted web account. My web host doesn't allow use of shell_exec() unless I upgrade to a private server. I need this for object caching. Does anyone know of a work-around? I read an article that suggested replacing the function with something like curl. Here's the installation report: PHP 5.2.8 installed Found database drivers for: MySQL SQLite PHP server API is cgi; using ugly URLs (index.php?title=Page_Title) Have XML / Latin1-UTF-8 conversion support. Session save path (/tmp) appears to be valid. PHP's memory_limit is 32M. Couldn't find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching. Warning: shell_exec() has been disabled for security reasons in /home/... Warning: shell_exec() has been disabled for security reasons in /home/... GNU diff3 not found. Found GD graphics library built-in, image thumbnailing will be enabled if you enable uploads. Installation directory: /home/... Script URI path: /anstrell/wiki Installing MediaWiki with php file extensions Environment checked. You can install MediaWiki. Quote Link to comment https://forums.phpfreaks.com/topic/203072-alternative-function-for-shell_exec/ Share on other sites More sharing options...
watsmyname Posted May 27, 2010 Share Posted May 27, 2010 may be you can use backtick operator?? I m not sure this gonna work for you...you can try though. <?php $output = `c:\mybat.bat`; // NOTE THAT ` ` ARE NOT SINGLE QUOTES. PHP WILL ATTEMPT TO EXECUTE BACKTICKS AS A SHELL COMMAND echo "<pre>$output</pre>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/203072-alternative-function-for-shell_exec/#findComment-1064088 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.