I have a bug in my PHP code that processes a form submission in my jQuery Mobile app. When I submit the form, the word “Undefined” shows up on the page, which makes sense since not a complete page is returned to jQuery Mobile.
This question summarizes this problem.
Why am I seeing a value of "undefined" on screen when I submit form in jQuery Mobile?
My question is how can I view the PHP error that occurred? I do not have access to the PHP error log file because I am developing on a shared server. jQuery Mobile just puts “Undefined” on the screen and outputs no error message.
The form submit likely defaults to using Ajax. You can force a new page request by specifying
data-ajax="false"as an attribute on theformelement. This might help you see what PHP is outputting to the page (if anything).If PHP is not writing errors to the page by default, you might be able to use a combination of
ini_set('display_errors', 1)and theerror_reportingfunction to get them to display as you’d like.