-
Posts
15,266 -
Joined
-
Last visited
-
Days Won
431
Everything posted by requinix
-
Docblocks recommended for a class and for the methods
requinix replied to block34's topic in Application Design
I don't put comments on classes. They tend to be somewhat self-explanatory just by reading the (namespace and) name alone. Unless there's something particular complicated about them... but most of the time any complexity is with what that happens inside a method. But definitely put comments on the methods. -
Looking for help with what part, exactly? Are you not sure what the SELECT query should be? Having problems integrating it into the code and displaying the results?
-
Make sure you have something set up to handle errors on the server side of things. Like your Pusher::onError is empty.
- 18 replies
-
- php
- websockets
-
(and 1 more)
Tagged with:
-
Have you tried running post.php twice? Does the second time work? If you restart the server and then don't do anything else, can you connect with telnet then?
- 18 replies
-
- php
- websockets
-
(and 1 more)
Tagged with:
-
For the most part. The timeout is happening for one of two reasons: it can't connect at all, or it can connect but the server was there but somehow able to complete the handshake. The latter is unlikely. - Can you manually telnet to the port? To test whether you can connect at all. Run post.php and confirm the server received the message, telnet, and run post.php again. - What does the browser show for the WSS connection in its networking request monitoring thing?
- 18 replies
-
- php
- websockets
-
(and 1 more)
Tagged with:
-
Are you running all this on your local server, or is any part of it deployed remotely?
- 18 replies
-
- php
- websockets
-
(and 1 more)
Tagged with:
-
I may be misreading, but isn't post.php is connecting to port 5555? And over TCP without the SSL layer?
- 18 replies
-
- php
- websockets
-
(and 1 more)
Tagged with:
-
header('Content-Disposition: inline; filename="imagename.jpg"');
-
Do you have a WebSocket-enabled server ready on port 8443?
- 18 replies
-
- php
- websockets
-
(and 1 more)
Tagged with:
-
When submitting a form, how to make it appear the chosen content?
requinix replied to alexndrre's topic in PHP Coding Help
That is the wrong way to redirect a user. Don't do that. Then do that. I've told you how to redirect (properly) so now you have to figure out where to redirect them to. Because I can't possibly how your application works. -
Yeah. Because they're not your problem, and there's nothing you can do about them.
-
Sigh. Do you control any of those domains?
-
I'm sure, but you never actually said what the warning is. I don't see a Set-Cookie in the response. Delete the session cookie manually and try again.
-
See if something submitted (best practices 2019)
requinix replied to StevenOliver's topic in PHP Coding Help
Dead, but not buried: various sources are still giving it 1-9% market share. -
Working for me. What does your browser report for the Set-Cookie response header? What is the Chrome warning?
-
What's the rest of the code?
-
When submitting a form, how to make it appear the chosen content?
requinix replied to alexndrre's topic in PHP Coding Help
If by "protocol" you mean the HTTP response code (like 301, 302, 303, and 307) then you have it backwards: http_response_code() will do exactly what you say, header(Location:) will default to 302 for GET/HEAD and 303 for everything else. And note that header() supports setting a custom response code at the same time: header('Location: ' . $destination_url, true, 302); -
What does the + operator do?
-
When submitting a form, how to make it appear the chosen content?
requinix replied to alexndrre's topic in PHP Coding Help
Your form is going to simulador.php. Make that script process the form and decide where the user is supposed to go. The URL of the page. Don't output anything, only send the user to that page with header("Location: " . $url_to_send_the_user_to); exit; -
The cookie parameters are not validated, as far as I know. You can hijack the path or domain settings to inject a SameSite= value. session.cookie_domain = ".example.com; SameSite=None"
-
White mage? Oh, no, nevermind. First use phpinfo() to see what the "master" (original) setting was. If that's 32M then the setting is coming from the php.ini, or another INI, or .htaccess, or something like that. If the master value is correct and the local value is 32M then... well, that's going to be kinda hard to track down since it could happen anywhere. Search your codebase for "memory_limit" or "32M".
-
Where is the PHP script I said you needed to create?
-
Then you must have realized that isn't the whole truth. It may very well say 500M in the php.ini you saw but something somewhere is setting it to 32M instead.
-
33554432 bytes is 32MB...
-
See if something submitted (best practices 2019)
requinix replied to StevenOliver's topic in PHP Coding Help
Older IE versions didn't do a lot of things they were supposed to. edit: Technically, hitting Enter to submit a form ("implicit submission") isn't actually an implementation requirement. But it is "strongly encouraged".