PHP trace for form post

A bit of background, I have a client that has an old php site that has been converted to python / django in the last 12 months. However, they still use the php site, while its phasing out. Some new data is still collected in the old system and database structure from users, but customers would like it to be available on the new site as well, which means inserting another mysql insert statement into PHP code to write to the new site database.

So the problem is that the php developer is missing and unavailable. In addition, the code is a mess with multiple versions of each php file in multiple directories, without version control. Therefore, I can find a piece of code that is written to the database, however it is in more than 20 places. What I would like to do is something comparable to django, insert the line "assert Error" in the form code in POST and see the django error report trace page, but this is php. So what are my best options? Remember that I am a python developer and a PHP hack at best. Is there anything built into php that would allow me to see some kind of trace without too much hacking?

+4
source share
2 answers

If the MySQL server has version> = 5.0.2, you can use triggers to update the data on the new site. This may turn out to be easier than digging all the PHP codes (which you suggested you are not comfortable with).

0
source

phptrace - a simple tool to track threads executed by php

$ ./phptrace -p 3130 -s # phptrace -p <PID> -s phptrace 0.2.0 release candidate, published by infra webcore team process id = 3130 script_filename = /home/xxx/opt/nginx/webapp/block.php [0x7f27b9a99dc8] sleep /home/xxx/opt/nginx/webapp/block.php:6 [0x7f27b9a99d08] say /home/xxx/opt/nginx/webapp/block.php:3 [0x7f27b9a99c50] run /home/xxx/opt/nginx/webapp/block.php:10 
+1
source

All Articles