title: Wordpress symbols undefined in proxy called AJAX script
body: <p>I am working hard to populate an ExtJS data grid in my Wordpress plugin. I am totally new to web programming so the following may be a stupid question.</p>
  
  <p>I managed to write a PHP script that delivers a webpage with embedded Java Sript code that creates a ExtJS data grid in the front side and sucessfully queries data using a ExtJS proxy, model and data store. That json proxy calls a separate getdata.php script (by its URL) that queries the database, converts the retrieved data to json format and returns them by echo. This works.</p>
  
  <p>Now I intended to add some debugging code to the getdata.php script. Unfortunately when using <code>if (WP_DEBUG) {}</code> I get an error telling me <code>Use of undefined constant WP_DEBUG</code> (which I found out by debugging the network access since the database script is called by the proxy and does not produce visible output). In other scripts I can use the WP_DEBUG symbol without problems.</p>
  
  <p>Any idea why my getdata.php doesn't know WP_DEBUG while other scripts of the plugin do?</p>
  
  <p>UPDATE: Seems all the Wordpress smybols are unknown in the getdata.php.</p>
  
  <p>UPDATE2: AJAX scripts need to be called using special WordPress methods. See my answer below.</p>