-
Posts
15,227 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
Trying to access array of offset with if statement
requinix replied to PNewCode's topic in PHP Coding Help
What will your code do if there aren't any rows from the query? (I know the answer - I want you to read through it and think about what will happen) -
Given that the CSS you wrote is invalid and what you're trying to do isn't supported, Either restructure your HTML so that the input and your <p> are sibling elements, thus allowing you to use ~ or +, or use Javascript to apply a CSS class somewhere useful or to show/hide the paragraph element itself.
-
Let me put it this way: you can't use Javascript to show or hide something without also using CSS.
-
That describes the "ListDevicesDB" API you can call. 1. It uses the GET method. 2. You need to include a "token" header that includes some value. If the value is what you included in your post then that needs to change because this was (probably) supposed to be a secret value and you've now shared it with the whole internet. 3. The URL is as given there. It optionally supports a "deviceSerial" query string parameter, as the description indicates. 4. It doesn't describe what the return value is. So you need to get a basic API calling thing in place. You can use libraries for it, or you can write the API calls yourself using cURL. Your first step should be to understand more about making API calls through PHP. It's all the same everywhere - only differences being exactly what the API wants, and that's the information they gave you. Once you understand a little more about API calls, then you can deal with the PHP code to try to make them. It's pretty simple but you do need to know more about what this is all about to be effective at it.
-
Are you sure you edited the right file? Did you restart Apache to pick up the changes?
-
Create link out of a global and set a variable
requinix replied to LeonLatex's topic in PHP Coding Help
Print out the value of the DOCUMENT_ROOT and see what happens when you try to add "../includes/db.php" to it. -
RDP servers are notoriously risk-prone. It's almost always a bad idea to have them open to the internet for anyone to connect to. By "tunneling" through the VPN, the RDP server remains disconnected from the internet, but you can still access it by connecting to the VPN (which is going to be much more secure). Ditto for the remote server. In your case apparently you need two hops, presumably because it's not accessible over the VPN directly, but the point is the same. It's very common to have a database server not connected to the internet, to minimize risk, so to allow access you can VPN or SSH into the network and then tunnel to get a direct database connection.
-
If we're still talking about the original issue, my reply was trying to point out that you were rewriting everything when you should be rewriting only the things that don't exist. Also, followed by is funny.
-
Preview? They might not have a name per se...
-
It's rather unlikely that GoDaddy is running a PHP that isn't using mysqlnd. And I'm not sure that existed in the time of PHP 5.2. So this situation you're describing seems backwards. First things first, though: PHP 5.2 is extremely out of date. You need an version of XAMPP that has PHP 7.4 - to match what your real website is running. Frankly, I'm amazed XAMPP even provides PHP 5.2...
-
If you're looking to hire somebody, try the Job Offerings forum. If you need some help doing the work yourself, we have a few forums according to the topic, such as PHP Coding Help and MySQL Help.
-
Optimal table order for mySQL "join style" query
requinix replied to ChenXiu's topic in PHP Coding Help
Basically no. The query optimizer will rearrange the query as it sees fit according to heuristics that are probably better informed than you are. Generally, you want to write the query in the most logical way and let MySQL execute it however it wants. Post your query and an EXPLAIN for it. -
get_result is only available if you're using mysqlnd, the exact details of that being mostly irrelevant as virtually everyone should be using it by now. What version of PHP are you using locally, and what version is on your server?
-
Could not receive registration validation email
requinix replied to jcarney1987's topic in PHPFreaks.com Website Feedback
I don't see anything in our regular logs... Are you sure the message didn't get dumped into a spam folder? Ever had problems with signups (or just emails in general) from other sites? And a fun fact: the last person to sign up with an sbcglobal.net email was back in 2015... -
Once again: the "latest version" of Webalizer, this 2.23-08 that you found, is ten years old. https://webalizer.net/news.html Webalizer is dead, and the longer you insist on using it the worse things will be for you. No updates. No features. You're going to fall further and further behind on the sorts of things everybody else is using because they're using modern tools. Changing software sucks, I know, but it's very much worth the temporary discomfort.
-
Warning: file_exists(): open_basedir restriction in effect. File
requinix replied to kako0000000's topic in PHP Coding Help
I can't think of a reason this code should be in place: it modifies where PHP stores session files, which PHP is quite capable of handling by itself. Why do you think you need this code? -
Has it always been slow/occasionally not returning, or did that change recently?
-
Warning: Trying to access array offset on value of type bool
requinix replied to bobl61's topic in Third Party Scripts
Sounds like a query failed. -
I don't see anything in this code that has to do with your PHPSESSID.
-
what do i need to do to make the code mountain safe and mountain good
requinix replied to egemen's topic in PHP Coding Help
I don't know what you're asking or how to answer it either, but I can definitely confirm that the code you posted doesn't make any sense whatsoever and there is no reason it needs to exist. -
How do promises program flow work in javascript?
requinix replied to eaglehopes's topic in Javascript Help
Basically anything that has "await" and/or "async" keywords works the same way.