Couchbase PHP Connect Hello World! on Mac -



Couchbase PHP Connect Hello World! on Mac -

i installed couchbase server , php sdk through brew install libcouchbase on mac. server admin console running/working fine on http://127.0.0.1:8091/. added hello.php file below code in /library/webserver/documents/hello.php.

<?php $cb = @new couchbase("http://127.0.0.1:8091/",'username','password'); if($cb->getresultcode() != couchbase_success){ throw exception('cannot connect couchbase!'); } else { echo "hello world!"; }

when go http://127.0.0.1:8091/hello.php, error saying not found.. problem?

when go http://127.0.0.1:8091/hello.php, below error not found.. problem?

you going wrong port. port 8091 couchbase server console interface. looks trying deploy hello.php script using apache server shipped os x uses default http port (80). script located in wrong folder. believe /library/webserver/documents/ static content only.

given problem have ran create me suspect trying larn many new things @ once. should seek running script outside of apache first , working there.

php hello.php

it worth pointing out using older 1.x version of couchbase php sdk, want utilize new 2.x version.

php couchbase

Comments

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -