javascript - How to catch and log every PHP and JS error in production website? -


i have website that's written in php , uses intense level of js coding. 1 of clients has strange error. site empty , nothing displayed. can not reproduce error in spite use same browser, same os , have same addons , firewall , antivirus.

so catch every 1 php , js error or warning , put in error log (best - database). there ready, simple solution acomplish this? address question experienced web-developers.

or there way dump every data user session while error occurs easy acomplish no-tech user? see way: when user has error, clicks (for example in extension or something) , sends session, error informations me can figure out going on. know solution of kind?

mplungjan's idea good.

i ask client view source of page , send me make sure looks ok.

your web server (e.g. apache) should keep log file of every single php request , tell whether errors occurred.

i don't know if there way report javascript errors server. if able catch error , send ajax request in error handler logged on server, work. think javascript errors (like syntax errors?) can not caught catch. ask client open javascript console (or whatever called in browser) , tell me errors sees. should eliminate errors eventually, , strategy focus on first error occurred.

i run page through w3c validator see if valid html/css.

also, should try universal technique of simplifying code down simplest possible thing should work doesn't work. either let find problem or produce small , simple can post stack overflow.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -