• WWW: PHP
  • serv7 server gives error in php files

serv7 server gives error in php files Dear admin, I believe you will solve it in a short time.

    vanessa87 We didn't notice any problems with s7. Can you give us an error example?

      admin Hello,

      The same PHP file is giving the following errors on servers 7 and 16:

      • Warning: Undefined array key "response" (line 31) - "response" key not found
      • Warning: Trying to access array offset on value of type null (line 31, 50, 62) - Trying to access a null value
      • Warning: Undefined array key 0 (line 50, 62) - Key 0 not found
      • Deprecated: str_replace(): Passing null to parameter #3 (line 62 and another file at line 4684) - Null value being passed

      These errors occur on both server 7 and server 16. However, the same file works without issues on other servers, meaning there’s no problem with the code itself; the issue seems to be with the servers.

      • Server 7 was working fine yesterday, but it started throwing errors today. Was there any change made between yesterday and today?
      • Server 16 has been giving these errors for about a month.
      • What are the PHP versions on servers 7 and 16? Are they the same as the ones on the working servers?

      I’d appreciate your help with this. Thank you!

        admin I wasn’t getting any errors with the PHP file yesterday, but today it’s giving errors. I had previously used the same file on server 16, where it also gave errors, so I started using it on server 7. Now, today, it’s throwing the same errors on server 7 as well. My question is: this isn’t an issue with the file or me, because I tested it in different places and it works fine there. My guess is that you might have made a change related to the PHP version

        vanessa87 All those warnings are problems in the code. Recommend way is to fix them.
        You can also check if the script is executed by correct PHP version (displaying deprecated often mean the code was written for older PHP version).

          I can open the same PHP file from a different server (Server 9) without any issues. At first, I thought there was an error in the PHP file itself, but it turns out the problem isn’t in the file—that’s why I’m writing about it; otherwise, I wouldn’t have bothered. I tried changing the PHP version randomly, but let me explain it like this: my PHP file, which was working on Server 7 yesterday and is currently working fine on a different hosting provider, isn’t working on Server 7 today. There’s no error in the code itself—I can access it without any problems from the same address through a different hosting provider right now, but it’s throwing an error on Server 7.

            vanessa87 All our servers are configured the same way - there are no differences. Check and fix your code - there is the issue.

            admin First of all, admin, thank you so much. It was really an issue related to the PHP version, I solved it. Thank you for your help, sorry for bothering you, and have a good day.

              vanessa87 I'm glad the issues are solved now!

              admin locked the discussion .