1

I use the PHP 5.4 that comes with XAMPP 1.8.2-6 and try to implement get trainedmodels function with the following code.

require_once 'google-api-client/vendor/autoload.php';

$client = new Google_Client();
$client->setApplicationName('Testing Application');
$client->addScope(Google_Service_Prediction::PREDICTION);
$client->setAuthConfig('auth.json');
$predictionService = new Google_Service_Prediction($client);
$projectId = 'some-project-id';
$predictionService->trainedmodels->listTrainedmodels($projectId);

The server is started by using PHP Internal Development Server. However, when listTrainedmodels is executed, the browser returns "ERR_CONNECTION_RESET".

Tried to add cacret.pem to php.ini and enabled openssl, but still no luck.

0 Answers0