in config.inc.php for your z_server url it needs to be the actual IP address or domain name, not localhost.
The user you are using in that config file as well needs to have API access.
The user you are using in that config file as well needs to have API access.

Comment