I have some problem in my App. I try to connect Android and Mysql database with PHP.
I want to insert some data trough android Textfield. But It can not save to the database.
1. I use XAMPP
2. I use 10.0.2.2 and my Ip address to connect database.
3. I check from Android Emulator browser check connection. and it successfully.
You need to look into whatever log file PHP writes to, and in the Android logcat output.
Here is logcat 'error'
12-02 09:23:27.497: E/Zygote(33): setreuid() failed. errno: 2
12-02 09:23:38.707: E/Zygote(33): setreuid() failed. errno: 17
12-02 09:23:42.097: E/BatteryService(69): usbOnlinePath not found
12-02 09:23:42.097: E/BatteryService(69): batteryVoltagePath not found
12-02 09:23:42.097: E/BatteryService(69): batteryTemperaturePath not found
12-02 09:23:42.169: E/SurfaceFlinger(69): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
12-02 09:23:50.036: E/EventHub(69): could not get driver version for /dev/input/mouse0, Not a typewriter
12-02 09:23:50.036: E/EventHub(69): could not get driver version for /dev/input/mice, Not a typewriter
12-02 09:23:50.377: E/System(69): Failure starting core service
12-02 09:23:50.377: E/System(69): java.lang.SecurityException 12-02 09:23:50.377: E/System(69): at android.os.BinderProxy.transact(Native Method)
12-02 09:23:50.377: E/System(69): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
12-02 09:23:50.377: E/System(69): at android.os.ServiceManager.addService(ServiceManager.java:72)
12-02 09:23:50.377: E/System(69): at com.android.server.ServerThread.run(SystemServer.java:184)
12-02 09:23:52.717: E/SoundPool(69): error loading /system/media/audio/ui/Effect_Tick.ogg
12-02 09:23:52.736: E/SoundPool(69): error loading /system/media/audio/ui/KeypressStandard.ogg
12-02 09:23:52.746: E/SoundPool(69): error loading /system/media/audio/ui/KeypressSpacebar.ogg
12-02 09:23:52.757: E/SoundPool(69): error loading /system/media/audio/ui/KeypressDelete.ogg
12-02 09:23:52.767: E/SoundPool(69): error loading /system/media/audio/ui/KeypressReturn.ogg
12-02 09:23:55.177: E/ThrottleService(69): Could not open GPS configuration file /etc/gps.conf
12-02 09:23:56.937: E/logwrapper(149): executing /system/bin/tc failed: No such file or directory
12-02 09:23:57.007: E/logwrapper(150): executing /system/bin/tc failed: No such file or directory
12-02 09:23:57.127: E/logwrapper(151): executing /system/bin/tc failed: No such file or directory
12-02 09:24:14.124: E/HierarchicalStateMachine(69): TetherMaster - unhandledMessage: msg.what=3
Chrobione Robinson
Greenhorn
Joined: Dec 06, 2011
Posts: 7
posted
0
Fandy Akhmad wrote:
Tim Moores wrote:
Fandy Akhmad wrote:Nothing errors i found..
You need to look into whatever log file PHP writes to, and in the Android logcat output.
Here is logcat 'error'
12-02 09:23:27.497: E/Zygote(33): setreuid() failed. errno: 2
12-02 09:23:38.707: E/Zygote(33): setreuid() failed. errno: 17
12-02 09:23:42.097: E/BatteryService(69): usbOnlinePath not found
12-02 09:23:42.097: E/BatteryService(69): batteryVoltagePath not found
12-02 09:23:42.097: E/BatteryService(69): batteryTemperaturePath not found
12-02 09:23:42.169: E/SurfaceFlinger(69): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
12-02 09:23:50.036: E/EventHub(69): could not get driver version for /dev/input/mouse0, Not a typewriter
12-02 09:23:50.036: E/EventHub(69): could not get driver version for /dev/input/mice, Not a typewriter
12-02 09:23:50.377: E/System(69): Failure starting core service
12-02 09:23:50.377: E/System(69): java.lang.SecurityException 12-02 09:23:50.377: E/System(69): at android.os.BinderProxy.transact(Native Method)
12-02 09:23:50.377: E/System(69): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
12-02 09:23:50.377: E/System(69): at android.os.ServiceManager.addService(ServiceManager.java:72)
12-02 09:23:50.377: E/System(69): at com.android.server.ServerThread.run(SystemServer.java:184)
12-02 09:23:52.717: E/SoundPool(69): error loading /system/media/audio/ui/Effect_Tick.ogg
12-02 09:23:52.736: E/SoundPool(69): error loading /system/media/audio/ui/KeypressStandard.ogg
12-02 09:23:52.746: E/SoundPool(69): error loading /system/media/audio/ui/KeypressSpacebar.ogg
12-02 09:23:52.757: E/SoundPool(69): error loading /system/media/audio/ui/KeypressDelete.ogg
12-02 09:23:52.767: E/SoundPool(69): error loading /system/media/audio/ui/KeypressReturn.ogg
12-02 09:23:55.177: E/ThrottleService(69): Could not open GPS configuration file /etc/gps.conf
12-02 09:23:56.937: E/logwrapper(149): executing /system/bin/tc failed: No such file or directory
12-02 09:23:57.007: E/logwrapper(150): executing /system/bin/tc failed: No such file or directory
12-02 09:23:57.127: E/logwrapper(151): executing /system/bin/tc failed: No such file or directory
12-02 09:24:14.124: E/HierarchicalStateMachine(69): TetherMaster - unhandledMessage: msg.what=3
Those logs are showing a different issue that is happening before your code is even ran...
Thins I would confirm:
I would check to make sure that my php code is working by passing the following url code through the browser on the phone and on the dev computer.... ******Please change validuser and valid password to a user and password in the database and see if it gets a response. ******
Also clear the log view on logcat prior to running the application and also use the debug mode on eclipse.