![]() Memcached was installed on my OSX Lion by default but in-case it is not, we can surely download the source and compile it to get the latest and greatest. Information about Memcached should be printed in the terminal window. Then run this command to verify that memcached is running: memcached- h This can be accomplished just by running the following command as your regular user and not sudo. We need to start memcached which is the daemon that the PHP memcache extension uses. Memcache should now be listed on this info page. Let's verify that our extension has been added by clicking the Open start page button within the MAMP Status window and clicking on the PHP Info link in the top header of the MAMP start page. Restart Apache using the MAMP status window by clicking on the Stop Servers button and then clicking on the Start Servers buttons. configure -with-libmemcached-dir/opt/local make sudo make install. You can paste it at the top of the file just under or the preferred place is just under the Dynamic Extensions section header: Andrei Zmievski (developer of the memcached plugin) kindly answered my email request with the following instructions: pecl download memcached tar zxvf memcached-1.0.0.tgz (or whatever version downloads) cd memcached-1.0.0 phpize. sudo emacs /Applications/MAMP/bin/php/php5.3.6/conf/php.ini sudo /Applications/MAMP/bin/php/php5.3.6/bin/pecl install memcacheĪfter PECL is done building memcache, add the extension extension=memcache.so to your php.ini file using your favorite text editor or using a fancy shell command. If you see these two lines, MAMP's PHP has found our included directory of source code: -include-dir -php-binary Īlright, now we should be able to finally run pecl and install the memcache extension. You will receive php-config information printed out in the terminal. Let's verify that MAMP's PHP has found our included source files by running: sudo /Applications/MAMP/bin/php/php5.3.6/bin/php-config sudo /Applications/MAMP/bin/php/php5.3.6/include/php/configure We need to run (configure) so that PHP recognizes our new included source files. The end result should be in this directory: /Applications/MAMP/bin/php/php5.3.6/include/php that contains the PHP 5.3.6 source code. ![]() sudo mkdir /Applications/MAMP/bin/php/php5.3.6/includeĬd /Applications/MAMP/bin/php/php5.3.6/include It is important that the version of the PHP source files match the MAMP installed PHP version. Now that we have the autoconf and m4 installed, we need to download the source files for PHP 5.3.6 (or the version of php you are using within mamp) and include it as an extension for MAMP's PHP. (Not necessary for memcache, but handy for php, pecl, and pear cd ~ curl -O Load the m4 dependency, decompress, configure, make and install it. Load the autoconf dependency, decompress, configure, make and install it. Move the nf file from the php directory you are working with to the home directory as a backup sudo mv /Applications/MAMP/bin/php/php5.3.6/conf/nf ~/
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |