title: Setup Xdebug and PHPStorm with remote server
body: <p>I'm trying to debug a PHP script using Xdebug and PHPStorm on a remote server, and am quite new to remote debugging.  I do not have full access to the server but have FTP (not SFTP) access to most of the files (I can't get to php.ini for example).</p>
  
  <p>Xdebug is installed on the server correctly according to the wizard on their website and uses default values.</p>
  
  <p>I have all project files downloaded and setup in a project, which is setup for deployment.  This works fine.</p>
  
  <p>To setup debugging I've installed WAMP on my local box (not the remote server, obviously) and set it as my PHP interpreter. It uses the same version of PHP as the remote server. </p>
  
  <p>I set a breakpoint and tried to establish the connection by setting PHPStorm to listen and using the bookmarklet to set the browser to start debugging.  It didn't work so I then tried to setup a new PHP Remote Debug server in run > edit configurations.  The "Validate remote environment" button says "Remote host: localhost".  I'm still not able to get a connection either by setting to listen, or clicking debug with the server I setup, or both.</p>
  
  <p>What do I need to do to get PHPStorm to establish the connection?</p>
  
  <p>Edit:</p>
  
  <p>I am debugging a Magento module.</p>
  
  <p>If any changes need to be made on the remote server I can request them, but my current understanding is that the remote server is setup correctly, and the problem is me and my setup.</p>
  
  <p>from the xdebug.org wizard about the remote server- </p>
  
  <blockquote>
    <p>Tailored Installation Instructions</p>
    
    <p>Summary</p>
    
    <ul>
    <li>Xdebug installed: 2.2.2</li>
    <li>Server API: FPM/FastCGI</li>
    <li>Windows: no</li>
    <li>Zend Server: no</li>
    <li>PHP Version: 5.3.24</li>
    <li>Zend API nr: 220090626</li>
    <li>PHP API nr: 20090626</li>
    <li>Debug Build: no</li>
    <li>Thread Safe Build: no</li>
    <li>Configuration File Path: /etc</li>
    <li>Configuration File: /etc/php.ini</li>
    <li>Extensions directory: /usr/lib64/php/modules</li>
    </ul>
  </blockquote>
  
  <p>edit 2:
  I wanted to post some screen caps, but I'm a single rep point shy.</p>
  
  <p>I've tried it with both the IDE Key PHPSTORM and none.  neither worked.</p>
  
  <p>here is the Xdebug section of phpinfo().  You can also read it on a <a href="https://docs.google.com/document/d/1qXTqXImb9yjz3CQkIaxh0K6P-PJTEDghFwfrjnpNty8/edit?usp=sharing" rel="nofollow">google doc here</a> that has the formatting intact, so it's much easier to follow:</p>
  
  <pre><code>xdebug
  
  xdebug support  enabled
  Version 2.2.2
  IDE Key PHPSTORM
  
  Supported protocols Revision
  DBGp - Common DeBuGger Protocol $Revision: 1.145 $
  
  Directive   Local Value Master Value
  xdebug.auto_trace   Off Off
  xdebug.cli_color    0   0
  xdebug.collect_assignments  Off Off
  xdebug.collect_includes On  On
  xdebug.collect_params   0   0
  xdebug.collect_return   Off Off
  xdebug.collect_vars Off Off
  xdebug.coverage_enable  On  On
  xdebug.default_enable   On  On
  xdebug.dump.COOKIE  no value    no value
  xdebug.dump.ENV no value    no value
  xdebug.dump.FILES   no value    no value
  xdebug.dump.GET no value    no value
  xdebug.dump.POST    no value    no value
  xdebug.dump.REQUEST no value    no value
  xdebug.dump.SERVER  no value    no value
  xdebug.dump.SESSION no value    no value
  xdebug.dump_globals On  On
  xdebug.dump_once    On  On
  xdebug.dump_undefined   Off Off
  xdebug.extended_info    On  On
  xdebug.file_link_format no value    no value
  xdebug.idekey   no value    no value
  xdebug.max_nesting_level    100 100
  xdebug.overload_var_dump    On  On
  xdebug.profiler_aggregate   Off Off
  xdebug.profiler_append  Off Off
  xdebug.profiler_enable  Off Off
  xdebug.profiler_enable_trigger  Off Off
  xdebug.profiler_output_dir  /tmp    /tmp
  xdebug.profiler_output_name cachegrind.out.%p   cachegrind.out.%p
  xdebug.remote_autostart Off Off
  xdebug.remote_connect_back  Off Off
  xdebug.remote_cookie_expire_time    3600    3600
  xdebug.remote_enable    On  On
  xdebug.remote_handler   dbgp    dbgp
  xdebug.remote_host  localhost   localhost
  xdebug.remote_log   /var/log/xdebug.log /var/log/xdebug.log
  xdebug.remote_mode  req req
  xdebug.remote_port  9000    9000
  xdebug.scream   Off Off
  xdebug.show_exception_trace Off Off
  xdebug.show_local_vars  Off Off
  xdebug.show_mem_delta   Off Off
  xdebug.trace_enable_trigger Off Off
  xdebug.trace_format 0   0
  xdebug.trace_options    0   0
  xdebug.trace_output_dir /tmp    /tmp
  xdebug.trace_output_name    trace.%c    trace.%c
  xdebug.var_display_max_children 128 128
  xdebug.var_display_max_data 512 512
  xdebug.var_display_max_depth    3   3
  </code></pre>