*

netbauer

  • **
  • 14 posts
API key validation failed, response from server is empty.
« on: June 21, 2023, 05:46:45 PM »
[21-Jun-2023 17:24:54 Europe/Zurich] PHP Warning:  Undefined array key "host" in /home/domain/public_html/oc-includes/osclass/utils.php on line 979

// parse URL
  $aUrl = parse_url($sourceFile);
  $host = $aUrl['host'];
  if ('localhost' === strtolower($host)) {
    $host = '127.0.0.1';
  }




Server information

Server information: Linux zeus 5.15.0-75-generic #82-Ubuntu SMP Tue Jun 6 23:10:23 UTC 2023 x86_64
Server software version: ()
PHP version: 8.1.2-1ubuntu2.11
Memory limit: 128M
Max execution time: 30s
Upload max file size: 2M
Max input vars: 1000
Allow URL Fopen: Enabled

Permissions information
In case folder is not readable or writtable, it may be issue when updating or upgrading osclass, themes or plugins.
Folders those are not readable:
All folders are readable
Folders those are not writtable:
All folders are writtable

Osclass version: 8.1.2
Web URL: https://prod.domain.com/
Web path: /home/prod-domain-com/public_html/
Oc-admin URL: https://prod.domain.com/oc-admin/
Last update check: 2023-06-20 17:39:55
Using dev cron: Yes
Current front theme: Sigma Osclass Theme (sigma)
Current oc-admin theme: Omega Admin Theme (omega)
PHP error log: Disabled
PHP errors output to file: Disabled
Database debug mode: Disabled
Cache: Disabled

Subdomains setup
Status: Disabled
Type: None
Count of available subdomains: 0
Is subdomain?: No
Base host: -
Landing page: Disabled
Automatic redirect: Disabled
Restricted countries: -
List of first 20 subdomains: -


Newly installed system (Ubuntu/Virutalmin)

The host has the name zeus.XXX.com and the domain under which OsClass runs is prod.XXX.com. All on the same host. Why doesn't it work with the API key?

*

netbauer

  • **
  • 14 posts
Re: API key validation failed, response from server is empty.
« Reply #1 on: June 22, 2023, 10:32:00 AM »
Hello
Could someone please help here?
Thank you very much.
Greetings

*

netbauer

  • **
  • 14 posts
Re: API key validation failed, response from server is empty.
« Reply #2 on: June 22, 2023, 10:38:31 AM »
debug.log

[22-Jun-2023 10:36:14 Europe/Zurich] PHP Warning:  Undefined array key "host" in /home/domain/public_html/oc-includes/osclass/utils.php on line 979
[22-Jun-2023 10:36:14 Europe/Zurich] PHP Deprecated:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /home/domain/public_html/oc-includes/osclass/utils.php on line 980
[22-Jun-2023 10:36:14 Europe/Zurich] PHP Deprecated:  json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /home/domain/public_html/oc-admin/controller/settings/main.php on line 50

*

MB Themes

Re: API key validation failed, response from server is empty.
« Reply #3 on: June 22, 2023, 03:26:37 PM »
Try to enable allow furl open setting
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

netbauer

  • **
  • 14 posts
Re: API key validation failed, response from server is empty.
« Reply #4 on: June 22, 2023, 05:06:56 PM »
Unfortunately, that is not the problem. Was enabled.

allow_url_fopen = On

*

MB Themes

Re: API key validation failed, response from server is empty.
« Reply #5 on: June 22, 2023, 05:19:23 PM »
Probably not able to help, there is something wrong with your host/localhost as I never seen these issues before...
Can you send error related to that host like full with tracing where it starts?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

netbauer

  • **
  • 14 posts
Re: API key validation failed, response from server is empty.
« Reply #6 on: June 22, 2023, 05:20:12 PM »
What is interesting is that everything works completely clean so far except the API key.  The system is completely new. OsClass is still in the default state.

It would be great if someone could explain to me how the process works, because I can't figure it out from the logs. This would have to be looked at by someone who wrote the code.


*

netbauer

  • **
  • 14 posts
Re: API key validation failed, response from server is empty.
« Reply #8 on: June 22, 2023, 06:10:38 PM »
I have now changed the PHP version from 8.1.2 to 8.0.29. After the adjustment now the key validation works. I am of the opinion that the dev team should check what exactly is going on. Because now I get no more errors in the php log.

*

netbauer

  • **
  • 14 posts
Re: API key validation failed, response from server is empty.
« Reply #9 on: June 22, 2023, 06:14:19 PM »
Version 8.2.7 seems to work as well.