Search code examples
phpmysqlparameterserror-log

Add URL parameters to PHP error log on Hostgator


I've got a PHP error_log which return a few MySQL-errors, but in order to replicate and fix those, I need to be able to see which parameters were passed to the page. I have tried to find this using both the PHP error_log file and the Apache logs from my Hostgator hosting, but cannot work out which one belongs to which, as the times don't seem to match up. Is there a way to store the URL with parameters in the error_log, or is there a better way to do this?

Many thanks, Ron


Solution

  • have a look at using:

    error_log($url);
    error_log($param1);
    

    You should be able to push to the log any data you wish