Jump to content

Alternative function for shell_exec()?


webmaster1

Recommended Posts

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.

Link to comment
Share on other sites

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>"; ?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.