how to connect to couchdb in codeigniter?

Asked

Viewed 50 times

0

someone knows how to connect to Couchdb using codeigniter?

We have tried many tutorials, added the necessary libraries, but we did not succeed. Please help us.

  • Put the tutorial link, the code you tried and the error, ta complicated this Couchdb.

  • ta complicado sim, the link is this (https://github.com/dready92/PHP-on-Couch/) and the "require_once(Couch.php) errors: failed to open stream: No such file or directory require_once(): Failed Opening required 'Couch.php' (include_path='.: /usr/share/php:/usr/share/Pear')"

  • can you run couchdb out of php? know if it works right?

  • couchdb is working properly outside php, the problem is connecting with the bank, we can not yet

1 answer

1

I’m finishing here, thank you, after a lot of effort we got connection, is just load the library in autoload. and start using the methods.

//no autoload.php
$autoload['libraries'] = array('couchdb');

//criar uma database
$dsn ='http://127.0.0.1:5984/';

$couch = new couchClient($dsn, 'testecouch'); // See if we can make a connection
$resp =  $couch->createDatabase();

the library is working perfectly.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.