PHP Fatal error

I have installed couchbase with the latest version of CentOS, and I built the library from sources without incident.

I have manually added the extension=json.so, and extension=couchbase.so to my /etc/php.ini
When I run couchbase php scripts from the command line they work as expected with no warnings or errors.

When I try to run the same script from apache I get the following errors in my httpd log.

[Sun Jun 01 12:35:22 2014] [error] [client 127.0.0.1] PHP Fatal error: Uncaught exception ‘CouchbaseLibcouchbaseException’ with message ‘Failed to connect libcouchbase to the server: Error while establishing TCP connection (No more bootstrap providers remain)’ in /var/www/html/testcb.php:3\nStack trace:\n#0 /var/www/html/testcb.php(3): Couchbase->__construct(‘127.0.0.1:8091’, ‘beer-sample’, ‘’, ‘beer-sample’)\n#1 {main}\n thrown in /var/www/html/testcb.php on line 3

Here is the code I am running (works great on the command line):

<?php echo "Hello from " . $_SERVER['PHP_SELF']; $cb = new Couchbase("127.0.0.1:8091", "beer-sample", "", "beer-sample"); $result = $cb->view("dev_beer", "beer_by_name"); foreach($result["rows"] as $row) { print $row['key'] . "\n"; } ?>

It prints the “Hello from” message but nothing else. I put that echo statement as a test to see if I could get anything to print. I get a blank page otherwise.

Any ideas?

Thank you.