Question

Hi all I am creating an application and I am trying to store user details on a mysql database using android as front end and JSON/php to post email address, first name, last name etc.

When I try to store/post data I get the following logcat output log, can anyone suggest any tips through better interpretation of the log. Note I have declared 'Email_address' in 'index.php'.

07-29 19:20:48.463: E/JSON(340): <br />n<font size='1'><table class='xdebug-error xe-notice xe-scream' dir='ltr' border='1' cellspacing='0' cellpadding='1'>n<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> SCREAM: Error suppression ignored for</th></tr>n<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Email_address in C:\wamp\www\socialeyes\index.php on line <i>57</i></th></tr>n<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>n<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>n<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0019</td><td bgcolor='#eeeeec' align='right'>267768</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='C:\wamp\www\socialeyes\index.php' bgcolor='#eeeeec'>..\index.php<b>:</b>0</td></tr>n</table></font>n{"tag":"register","success":0,"error":2,"error_msg":"User already existed"}n

07-29 19:20:48.481: E/JSON Parser(340): Error parsing data org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject
07-29 19:20:48.481: D/AndroidRuntime(340): Shutting down VM
07-29 19:20:48.491: W/dalvikvm(340): threadid=1: thread exiting with uncaught exception (group=0x40015560)
07-29 19:20:48.523: E/AndroidRuntime(340): FATAL EXCEPTION: main
07-29 19:20:48.523: E/AndroidRuntime(340): java.lang.NullPointerException
07-29 19:20:48.523: E/AndroidRuntime(340):  at wavedevelopment.socialeyes.RegisterActivity$1.onClick(RegisterActivity.java:78)
07-29 19:20:48.523: E/AndroidRuntime(340):  at android.view.View.performClick(View.java:2485)
07-29 19:20:48.523: E/AndroidRuntime(340):  at android.view.View$PerformClick.run(View.java:9080)
07-29 19:20:48.523: E/AndroidRuntime(340):  at android.os.Handler.handleCallback(Handler.java:587)
07-29 19:20:48.523: E/AndroidRuntime(340):  at android.os.Handler.dispatchMessage(Handler.java:92)
07-29 19:20:48.523: E/AndroidRuntime(340):  at android.os.Looper.loop(Looper.java:123)
07-29 19:20:48.523: E/AndroidRuntime(340):  at android.app.ActivityThread.main(ActivityThread.java:3683)
07-29 19:20:48.523: E/AndroidRuntime(340):  at java.lang.reflect.Method.invokeNative(Native Method)
07-29 19:20:48.523: E/AndroidRuntime(340):  at java.lang.reflect.Method.invoke(Method.java:507)
07-29 19:20:48.523: E/AndroidRuntime(340):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
07-29 19:20:48.523: E/AndroidRuntime(340):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
07-29 19:20:48.523: E/AndroidRuntime(340):  at dalvik.system.NativeStart.main(Native Method)
07-29 19:20:50.981: I/Process(340): Sending signal. PID: 340 SIG: 9
Was it helpful?

Solution

There are some errors and notices in your script output and you have the xdebug extension which is trying to make them look pretty by wrapping them in HTML.
You can check your server's php error log or maybe try to copy this and paste it into a HTML file (with a little luck you might be able to read it).

You are only interested in the 1-st line.


SCREAM: Error suppression ignored for( ! ) Notice: Undefined index: Email_address in C:\wamp\www\socialeyes\index.php on line 57nCall Stackn#TimeMemoryFunctionLocationn10.0019267768{main}( )..\index.php:0nn{"tag":"register","success":0,"error":2,"error_msg":"User already existed"}

Apparently there is an Undefined index: Email_address in C:\wamp\www\socialeyes\index.php on line 57

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top