This 12 year old php script is acting up as usual.
Orders from a specific user are being approved via Paypal, but for some reason not being logged as approved in our script.
So configuring MySQL to log it’s queries to a file.
I’m expecting that possible one of the parameters for the query that enters the order is missing or otherwise broken.
I may also look at logging or emailing the query and/or it’s components on the php side. Goodness. Logging all of the SQL queries definitely not the answer and from what I read, definitely slows the website down.
So now I’m using php file_put_contents
like this:
file_put_contents('logfile.txt', print_r($sql, true), FILE_APPEND | LOCK_EX);
And I also need to allow apache to write to the file so changed permissions to 777
and ownership as well:
chown me:www-data logfile.txt