第一次连接阻止了对 PHP 的多个请求 [英] Multiple requests to PHP blocked by first connection

查看:48
本文介绍了第一次连接阻止了对 PHP 的多个请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,这可能是对一个小问题的大量解释,所以这里是.

OK this will probably be a lot of explanation for a small question, so here goes.

我有一个测验系统,我使用相对较新的应用程序发明者(快速原型 Android 应用程序)构建该应用程序发明者系统是使用拼图代码块构建的,然后在幕后将整个内容呈现给 Java 并进行编译.其实挺漂亮的.好吧,有一个名为 tinywebdb 的代码块,它基本上允许您将 GET 请求打包成(我相信它的 JSON 格式)并将其发送到您喜欢的互联网上的任何地方.

I have a quiz system I built using the relatively new app inventor (quickly prototypes android apps) this app inventor system is built using jigsaw blocks of code and then behind the scenes renders the whole thing to java and compiles. Pretty nifty actually. Well there is a code block called tinywebdb which essentially allows you to package a GET request into (i believe its JSON format) and send it to whatever place on the wide internet you'd like.

因此,对于这个测验系统,我用 PHP 构建了一个中央 Web 应用程序,该应用程序根据数据库中的问题构建了一个测验,然后运行它们,将它们一个一个地发送到任何已连接到该个人构建的测验的移动设备.

So for this quiz system I've build a central web app out of PHP that builds a quiz out of questions in a database and then runs through them sending them one by one to any mobile that has connected to that individual built quiz.

为了完成这项工作,我让 PHP 循环处理它选择的问题并更新数据库中的状态.手机正在做的是每隔几秒钟读取该数据库,如果他们没有在测验中回答该特定问题并且状态显示为开始",则将问题拉下来并显示出来.然后用户回答,循环重复.

To make that work I'm getting the PHP to cycle though questions it has chosen and update a status in the database. What the mobiles are doing is every so many seconds reading that database and if they haven't answered that particular question in the quiz and the status says go, pulls the question down and displays it. The user then answers it and the cycle repeats.

一切正常.在运行 Web 应用程序的 PHP 旁边有一个单独的 PHP,所有移动设备都调用它来连接到数据库并阅读问题或更新分数等.所以选择、更新和插入命令取决于他们调用 php.ini 的原因.

That's all working fine. Next to the PHP running the web app there is an individual PHP that all mobiles call to connect to the database and read questions or update scores or the like. So Select, Update and Insert commands depending on the reason they are calling the php.

现在对于这个问题,我最近开始用多部手机而不是我一直使用的手机来测试系统,但它不起作用.一部手机将始终连接,而其他任何一部手机都会停止.没有关联.我检查了错误日志,但没有列出任何内容.

Now for the question, I recently started testing the system with multiple mobiles instead of the one I've always used and it doesn't work. One phone will always connect and any other phone will just balk. No connection. I've checked error logs and nothing is listed.

我曾假设移动设备与 PHP 建立的每个连接都是与数据库的单独连接.但是有些东西阻止了多个连接.

I had assumed that each connection that a mobile device made to the PHP would be an individual connection to the database. But something is blocking multiple connections.

有什么建议吗?我的想法已经不多了.我想我正在寻找的是可以尝试或研究的东西的想法,这些想法可能有助于我了解出了什么问题,以便我可以解决它.

Any suggestions? I'm running out of ideas of things to look at. I guess what I'm looking for is ideas of things to attempt or research that might help me understand what is going wrong so I can fix it.

感谢您提供的任何帮助.

Thanks for any help you can offer.

推荐答案

结果证明这是 Web 主机提供商的未知问题.尽管有十多个详细要求他们方面阻止了什么,但我总是提到我自己的设备或自己的代码是如何出错的.

This turned out to be an unknown issue with the Web Host provider. Despite more than a dozen detailed requests for what on their side was blocking things I was always referred to how my own equipment or own code was at fault.

给自己设置一个 VPS 并快速更改-o 我有一个没有修改代码或设备的工作系统.

Set myself up a VPS and presto change-o I have a working system with no modifications to the code or the equipment.

我不喜欢那些通过指责别人来掩盖自己无能的人.

TIL I don't like people who cover up their incompetency by blaming others.

这篇关于第一次连接阻止了对 PHP 的多个请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆