Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

couchbase.so not loading OSX (Re-compilled and still no go)

3 replies [Last post]
  • Login or register to post comments
Mon, 11/19/2012 - 17:37
alek
Offline
Joined: 11/19/2012
Groups: None

Hey guys - trying to connect my local MAMP install to Couchbase for testing.

I'm using MAMP with PHP 5.4.4 mac OSX Mountain Lion

I downloaded the couchbase.so from the website and tried linking that in my PHP.INI file with no success. After I found several posts claiming to recompile the PHP extension, I did so. Now, getting another error message.

PHP Warning:  PHP Startup: couchbase: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
[20-Nov-2012 00:24:07 UTC] PHP Fatal error:  Class 'Couchbase' not found in /Users/alek/Sites/index.php on line 3

As you can see, I can't load the Couchbase class using PHP. My theory is that when I compiled the extension, it was using an older version of PHP that comes with the Mac. However, because I'm using MAMP theres a PHP mismatch?

Grasping at straws, can anyone shed some light on this? Anyone have this successfully running with MAC OSX and MAMP?

Oh, incase anyone needs to know what I did to compile the source, here's the steps, perhaps I missed a step.

$ unzip couchbaselabs-php-ext-couchbase-2680b64.zip
$ cd couchbaselabs-php-ext-couchbase-2680b64 
$ phpize
$ ./configure
$ make
$ sudo make install

Thanks,
Alek

Top
  • Login or register to post comments
Tue, 11/20/2012 - 03:02
avsej
avsej's picture
Offline
Joined: 06/15/2011
Groups: None

could you post here output of the commands? in particular output of phpize? and also it would be goo to know that all components match:

- php version
- phpize version when you are building couchbase.so
- config path for your php version
- extension patch (location) in the php config

__________________

Find me on FreeNode IRC in #libcouchbase channel

Top
  • Login or register to post comments
Tue, 11/20/2012 - 14:22
alek
Offline
Joined: 11/19/2012
Groups: None

Ok I got it working. Was really annoying but the issue is in phpize's version and my inability to understand how to use it correctly.

The problem is that if you use phpize on OSX it will compile your extension based on the OS PHP version not on MAMPs. So if you're running MAMP with PHP 5.4.4 it won't work.

The biggest confusion came when I tried to use MAMPs version of phpize thats located in the MAMPs bin folder. It gave me errors in regards to missing zen libraries and such. Even when I got the source code from the MAMP site, it didn't have the proper zen extensions for the version of PHP I was using.

So the solution for me was to purchase MAMP PRO and use PHP 5.3.14 as thats the version OSX uses. Seems to load fine.
This isn't really an ideal fix, because I know people out there will struggle with this extension and MAMP installs but I'm past the point of messing with it.

Wish there was a clear tutorial on how to get couchbase.so integrated in a MAMP environment properly.

Cheers,
Alek

Top
  • Login or register to post comments
Sat, 11/24/2012 - 00:47
daschl
Offline
Joined: 05/19/2012
Groups: None

Hey, if you use those binaries on your system: http://php-osx.liip.ch/

You can compile it with 5.4 too which should then work on your MAMP stack.

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker