couchbase.so not loading OSX (Re-compilled and still no go)
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
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
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.
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