Android-PHP-mysql其他设备无法写入数据

时间:2021-12-05 08:43:32

I have create an android app which use register and login at my website using PHP and mysql. I have test it couple of time on my device and on emulator and it work just fine.

我已经创建了一个Android应用程序,使用PHP和mysql在我的网站上使用注册和登录。我已经在我的设备和模拟器上测试了几次,它工作得很好。

And then I ask my friend to try it on his device, but when he try to register(which is write data to mysql via php and json from his device, from his internet connection) it failed. The application hang for a while and then show warning app stop... or something like that...

然后我让我的朋友在他的设备上尝试它,但是当他尝试注册时(这是通过php和json从他的设备写入数据到mysql,来自他的互联网连接)它失败了。该应用程序挂了一段时间,然后显示警告应用程序停止...或类似的东西......

What make this happen? is it from php side which cause this? the file permission? from mysql side? or something else?

是什么让这件事发生?它是从PHP端导致这个?文件权限?从mysql方面?或者是其他东西?

2 个解决方案

#1


0  

Is the webserver at your location? Maybe it's a setting in the way you configured your settings. Make sure that your ports are forwarded correctly

网络服务器在您的位置吗?也许这是您配置设置的方式中的设置。确保您的端口正确转发

#2


0  

Please provide more information, improve your question, for example:

请提供更多信息,改进您的问题,例如:

  • Is your friend able to connect to the php website via a browser?
  • 你的朋友能通过浏览器连接到php网站吗?

  • Have you checked the log files of your web-server (is your friend actually connecting to your web server?)
  • 您是否检查了Web服务器的日志文件(您的朋友实际连接到您的Web服务器?)

You might try to debug data-traffic and check 'what' is going on by using a debugging proxy-tool, for example: http://www.fiddler2.com/fiddler2/

您可以尝试使用调试代理工具调试数据流量并检查“发生了什么”,例如:http://www.fiddler2.com/fiddler2/

#1


0  

Is the webserver at your location? Maybe it's a setting in the way you configured your settings. Make sure that your ports are forwarded correctly

网络服务器在您的位置吗?也许这是您配置设置的方式中的设置。确保您的端口正确转发

#2


0  

Please provide more information, improve your question, for example:

请提供更多信息,改进您的问题,例如:

  • Is your friend able to connect to the php website via a browser?
  • 你的朋友能通过浏览器连接到php网站吗?

  • Have you checked the log files of your web-server (is your friend actually connecting to your web server?)
  • 您是否检查了Web服务器的日志文件(您的朋友实际连接到您的Web服务器?)

You might try to debug data-traffic and check 'what' is going on by using a debugging proxy-tool, for example: http://www.fiddler2.com/fiddler2/

您可以尝试使用调试代理工具调试数据流量并检查“发生了什么”,例如:http://www.fiddler2.com/fiddler2/