• Resolved Greg Marshall

    (@timeassistant)


    Hi there,

    Just about to use the plugin for the first time, however I noticed it wants to try and use Shell Exec, so I removed shell_exec from my php.ini (I have root access to our VPS) php.ini no longer has shell_exec disabled, however your plugin still reports that shell_exec is not supported.

    Is there some kind of additional process required for shell_exec to work with your plugin or is there a bug somewhere?

    Version 	4.5.3
    Language 	en-GB
    Charset 	UTF-8
    Memory Limit 	40M (Max 256M)
    PHP
    Version 	5.6.23
    SAPI 	cgi-fcgi
    User 	####
    Safe Mode 	Off
    Memory Limit 	256M
    Memory In Use 	13.75 MB
    Max Execution Time 	90
    Shell Exec 	Not Supported
    Shell Exec Zip 	Not Supported
    MySQL
    Version 	5.5.5
    Charset 	utf8mb4
    Wait Timeout 	300
    Max Allowed Packets 	268435456
    msyqldump Path 	Path Not Found

    https://www.ads-software.com/plugins/duplicator/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hey Greg,

    Did you happen to restart Apache after changing the shell_exec setting? Below is the code we use to detect shell_exec, you might shoot a copy over to your host as ask them if they have anything that prevents the code from working correctly in their enviroments:

    public static function IsShellExecAvailable()
    {
    	$cmds = array('shell_exec', 'escapeshellarg', 'escapeshellcmd', 'extension_loaded');
    
    	//Function disabled at server level
    	if (array_intersect($cmds, array_map('trim', explode(',', @ini_get('disable_functions')))))
    		return false;
    
    	//Suhosin: https://www.hardened-php.net/suhosin/
    	//Will cause PHP to silently fail
    	if (extension_loaded('suhosin'))
    	{
    		$suhosin_ini = @ini_get("suhosin.executor.func.blacklist");
    		if (array_intersect($cmds, array_map('trim', explode(',', $suhosin_ini))))
    			return false;
    	}
    
    	// Can we issue a simple echo command?
    	if (!@shell_exec('echo duplicator'))
    		return false;
    
    	return true;
    }
    Thread Starter Greg Marshall

    (@timeassistant)

    Thanks for the response, its a VPS with root access so no doubt it would be myself that would need to look into this.

    Although I did notice the comment about suhosin, I have that enabled, is that my problem?

    Edit: Yes I did restart apache I also had to perform a full reboot not long after too so it definitely wont be that ??

    It can… You might want to look at the suhsion config setup and make sure that shell_exec is not in the list for suhosin.executor.func.blacklist…

    Thanks

    Thread Starter Greg Marshall

    (@timeassistant)

    Hi there,

    I dont even have the suhosin.executor.func.blacklist defined, I was under the impression it should be in php.ini but it is not, do you know of any other locations it could be disabled there?

    Hey Greg,

    I believe your correct it is a php.ini directive. What if you just create an entry for it and set it to nothing, that may be enough to enable it?

    Thread Starter Greg Marshall

    (@timeassistant)

    I removed suhosin instead, no change still not detected.

    As far as I can see it is enabled on the server (or atleast not disabled)

    That is odd… I would just open the file below on your local server comment out the current code and have it return true.

    https://plugins.svn.www.ads-software.com/duplicator/tags/1.1.14/classes/utility.php

    At this point I’m not sure what the stag is, if you make any progress let me know and I might be able to work it back into the plugin for others…

    Thread Starter Greg Marshall

    (@timeassistant)

    for some reason the plugin won’t activate any more either, I have deleted and reinstalled it but still wont work, I click activate and the page seems to just reload without it activating

    That is odd… Is it just Duplicator or are you seeing it with other plugins?

    Thread Starter Greg Marshall

    (@timeassistant)

    just a duplicator issue, everything else is fine to be honest rather weird

    If you want to submit a ticket I can have a look (just refer to this thread), at this point I’m not really sure, don’t recall having seen this issue before…

    Thread Starter Greg Marshall

    (@timeassistant)

    Sure will do can you provide me a link to your ticket system?

    You can follow the links in the plugin from the help menu or just go here.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Shell Exec issue’ is closed to new replies.