title: How to run a PHP script placed on a remote server via ssh from local server, both servers are running on redhat linux?
body: <p>Using PUTTY as ssh client</p>
  
  <p>The below errors appear on the console after running the script. I am not sure whats wrong here as the script runs perfectly fine on the remote server but when i try running it from local server, it doesn't work. Both machines have different applications running on them ,both support PHP although different versions. Maybe i am doing something wrong here</p>
  
  <pre><code>  root@remoteserver&gt; php -v
    PHP 5.3.3 (cli) (built: Jul 25 2016 05:47:24)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
  
    root@localserver&gt; php -v
    PHP 5.4.16 (cli) (built: Jul 22 2016 04:50:37)
    Copyright (c) 1997-2013 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
  </code></pre>
  
  <p><strong>Errors:</strong></p>
  
  <pre><code>    root@localserver&gt; ssh remoteserver "/path/script" 
      PHP Warning:  include_once(/mach7gui/oam/data/ui/m7in/php- 
      scripts/inc/AMGT_map.php): failed to open stream: No such file or 
      directory in /path/script on line 5
      PHP Warning:  include_once(): Failed opening 
     '/mach7gui/oam/data/ui/m7in/php-scripts/inc/AMGT_map.php' for inclusion 
     (include_path='.:/usr/share/pear:/usr/share/php') in /path/script on 
     line 5
  
     sh: /tools/mon/db_wrap: No such file or directory
     sh: /tools/mon/db_wrap: No such file or directory
     sh: /tools/mon/db_wrap: No such file or directory
     sh: /tools/mon/db_wrap: No such file or directory
     sh: /tools/mon/db_wrap: No such file or directory
     sh: /tools/mon/db_wrap: No such file or directory
  
     PHP Fatal error:  Uncaught exception 'PDOException' with message 'could 
     not find driver' in /path/script:41
     Stack trace:
     #0 /path/script(41): PDO-&gt;__construct('mysql:host=;dbn...', '', '')
     #1 {main}
     thrown in /path/script on line 41
  </code></pre>