Troubleshooting?

dgold123 wrote on Tuesday, May 24, 2011:

Is there a way to run the pages from the command line?  For example when I used to do perl/cgi I would just run the script from the command line and it would kick out the http text.  I tried, but it didn’t seem to work for these php pages.  What am I missing?  (basically, I want to add in echos/prints to learn how the code is working)

yehster wrote on Tuesday, May 24, 2011:

You can execute php pages from the command line,  with php <filename>.
However, it won’t work the way you are expecting with a php web application like openemr, because it needs the session information to run properly.  Also there is no good way to submit the post and/or get requests that specify the parameters to a PHP file run on the command line.

You could use the error_log instead of echo/print statements.

Another good tool is using the netbeans IDE and XDEBUG.
http://wiki.netbeans.org/HowToConfigureXDebug
This would allow you to run the php pages in the debugger and step over/into the files as they are executing on the webserver.