title: What is the appropriate SAPI type to debug PHP web applications when configuring PHP executables in Eclipse/Xdebug?
body: <p>What is the appropriate SAPI type to debug PHP web applications when configuring PHP executables in Eclipse with PDT and Xdebug?</p>
  
  <p>The available options for SAPI type under PHP executables in Eclipse PDT are CLI or CGI. </p>
  
  <p>Does this depend simply on what executable is being used to debug... say when PHP.exe is defined as the executable it seems to make sense to setup PHP with SAPI type set to CLI whereas when adding the executable PHP-cgi.exe SAPI type should be set to CGI... </p>
  
  <p>I followed a couple of tutorials;
  <a href="http://eclipse.org/pdt/documents/XDebugGuideForPDT2.0.pdf" rel="nofollow">http://eclipse.org/pdt/documents/XDebugGuideForPDT2.0.pdf</a> 
  <a href="http://www.ibm.com/developerworks/opensource/tutorials/os-php-eclipse-pdt-debug/section4.html" rel="nofollow">http://www.ibm.com/developerworks/opensource/tutorials/os-php-eclipse-pdt-debug/section4.html</a>
  eclipse.org/pdt/articles/debugger/</p>
  
  <p>docs.joomla.org/Configuring_Eclipse_and_Xdebug </p>
  
  <p>but i do not believe they refer to this specific issue.</p>
  
  <p>In my situation PHP is running as a module in Apache. What PHP executable and SAPI type combination should be defined to best debug PHP web applications ?</p>