humanmade/BackUpWordPress — Issue #106: pwd command isn't available on Windows
Author: willmot
Created: 2012-03-08 11:14:06+00:00
State: open

We should use something else.

````
private function shell_exec_available() {

// Are we in Safe Mode
if ( $this->is_safe_mode_active() )
return false;

// Is shell_exec disabled?
if ( in_array( 'shell_exec', array_map( 'trim', explode( ',', ini_get( 'disable_functions' ) ) ) ) )
return false;

// Can we issue a simple command
if ( ! @shell_exec( 'pwd' ) )
return false;

return true;

}
````