Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
stop68025yCross-Origin Resource Sharing. If your content is on another domain, you get errors, because the browser blocks connections. You can see it in the console of the browser.
-
C0D4669025yLocal is using 127.0.0.1/someFile.ext
And online is using 127.0.0.1/someFile.ext
I've done this before π
Seriously give us some errors - open console and go digging. -
C0D4669025y@Afrographics
Can you run the query directly against the db - not through php?
Does the result actually have any records?
Are you actually giving mysqli_query() the db connection in the arguments?
mysqli_num_rows( $result );
Or are you using prepared statements?
So much could be going on without seeing the actual code. -
@C0D4 thanks dude
But i think i figured out what is going on
Actually i'm testing my chat application by using a free hosting service.
And i commit to refresh the messages every 2 seconds. What is probably a lot load on the server
And since the hosting is free i'm probably limited. So my database is crashing) -
@Afrographics Better to use socket.io
Refresh based chat is so so 15 years old. You won't regret using sockets. -
@Afrographics You'll need a relay, which is often a separate service although it can be done over http. 0000webhost gives you a single apache vhost and a database on a shared MySQL instance. So either you use a different service for relaying or you use long-polling and the server waits for messages on, again, some kind of relay, although this time it could be an IPC-based relay. Now, I don't know about their security measures, but I feel like you don't have access to in-memory shared filesystem (/tmp) and you don't have exec() so you can't create a socket or something.
My web app is working on local and not online
π€―π²π²π²π²
How is it possible?
AJAX Call not working.
Not sending dataπ
random