Debugging PHP? I'm a newbie to PHP in general. I know some basic concepts but not a programer by any means. I have a script that used to run just fine under PHP4 .... I do # php quarantine_report.php and it generates and email reports for quarantined spam. After an upgrade to PHP5 i excuate the same command and get nothing at all. I tried to turn on error reporting and debuging optoins in php.ini but no luck. I there a way to debug php script while running? Can someone point me in the right direction? Thanks
You could put some echo and print_r commands in the file to print out the values of certain variables or arrays during the script.
You have xdebug that let you put some breaks in your code and watch variables https://www.google.com/search?q=xdebug&ie=utf-8&oe=utf-8&client=firefox-b-ab But if error_reporting doesn't work you probably did not modify the right php.ini. To know exactly where is the php.ini used by your script add a <?php echo phpinfo() ?> in it