Code Monkey home page Code Monkey logo

aerospike-client-php's Introduction

Aerospike PHP Client

Build Status Latest Release Downloads License

The Aerospike PHP Client works with PHP 5.3.3+, 5.4, 5.5, and 5.6.

The PHP extension was tested to build on 64-bit

  • Ubuntu 12.04 LTS, 14.04 LTS, Debian 6, 7, 8 and related distros using the apt package manager
  • CentOS 6.x, 7.x, RedHat 6.x, 7.x and related distros using the yum package manager
  • OS X 10.9 (Mavericks), 10.10 (Yosemite)

Windows is currently not supported.

Documentation

Documentation of the Aerospike PHP Client may be found in the doc directory. The API described there is the specification for the PHP Client. Notes on the internals of the implementation are in doc/internals.md.

Example PHP code can be found in the examples/ directory.

Full documentation of the Aerospike database is available at http://www.aerospike.com/docs/

Dependencies

CentOS and RedHat (yum)

sudo yum groupinstall "Development Tools"
sudo yum install openssl-devel
sudo yum install php-devel php-pear # unless PHP was manually installed

Ubuntu and Debian (apt)

sudo apt-get install build-essential autoconf libssl-dev
sudo apt-get install php5-dev php-pear # unless PHP was manually installed

OS X

By default OS X will be missing command line tools. On Mavericks (OS X 10.9) and higher those can be installed without Xcode.

xcode-select --install # install the command line tools, if missing

The dependencies can be installed through the OS X package manager Homebrew.

brew update && brew doctor
brew install automake
brew install openssl

To switch PHP versions see this gist.

Installation

Building with Composer

Using Composer you can download and build the PHP extension:

composer require aerospike/aerospike-client-php "*"
find vendor/aerospike/aerospike-client-php/ -name "*.sh" -exec chmod +x {} \;
cd vendor/aerospike/aerospike-client-php/ && composer run-script post-install-cmd

Building Manually

To build the PHP extension manually you will need to fetch the latest release from Github, then run the build.sh script in the src/aerospike/ directory.

cd src/aerospike
./build.sh

This will download the Aerospike C client SDK if necessary into src/aerospike-client-c/, and initiate make.

Installing the PHP Extension

To install the PHP extension do:

make install
php -i | grep ".ini "

Now edit the php.ini file. If PHP is configured --with-config-file-scan-dir (usually set to /etc/php.d/) you can create an aerospike.ini file in the directory, otherwise edit php.ini directly. Add the following directive:

extension=aerospike.so
aerospike.udf.lua_system_path=/path/to/aerospike/lua
aerospike.udf.lua_user_path=/path/to/aerospike/usr-lua

The aerospike module should now be available to the PHP CLI:

php -m | grep aerospike
aerospike

Remember that if you are using PHP with Nginx or Apache there is likely a separate php.ini config file for the web server Copy the aerospike.ini you have just created into /etc/php5/apache2/conf.d/, /etc/php5/fpm/conf.d/ or wherever the configuration include directory of the web server is, then issue a graceful restart.

License

The Aerospike PHP Client is made availabled under the terms of the Apache License, Version 2, as stated in the file LICENSE.

Individual files may be made available under their own specific license, all compatible with Apache License, Version 2. Please see individual files for details.

aerospike-client-php's People

Contributors

aashishpathak-gslab avatar jumping avatar pavanrao-gslab avatar pratimamane-gslab avatar rbotzer avatar rmondragon avatar rohitmagdum-gslab avatar vishalmene-gslab avatar wchu-citrusleaf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.