1

I have created a new Apigility project in Zend Studio 12. I want to enable authentication using OAuth2 and a Mongo database.

The form for doing this is very straightforward, asking for a hostname, database name and route for OAuth2. I provided these details and submitted the form. However, the page simply refreshes and states that there is no authentication enabled. I have repeated this several times. There are no other options to choose from, so there's no obvious indication that I'm going wrong at any stage.

I have tried this using both the Zend Studio PHP executable and the one shipping with Zend Server 7. I have tried it with PHP's internal HTTP server and using Apache provided by Zend Server.

Other aspects of Apigility seem to be working fine - I can create APIs, etc.

1 Answers1

0

I had the same problem because I forgot to install the mongo driver.

The error message was in the ajax response body.

To install mongo driver for php:

sudo pecl install mongo

and then you need to update your php.ini file adding

extension=mongo.so

and finally restart apache

sudo service apache2 restart

In case pecl is not installed on your system you can install following the content of this page:

[http://docs.mongodb.org/ecosystem/drivers/php/][1]

Gaetan
  • 16