GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - griddb/php_client: GridDB PHP Client

This repository was archived by the owner on Oct 29, 2026. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

48 Commits
48 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
include
include
 
 
sample
sample
 
 
src
src
 
 
test
test
 
 
CLA_rev1.1.pdf
CLA_rev1.1.pdf
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 

Repository files navigation

GridDB PHP Client

Maintenance Status

This repository is currently archived and is not actively maintained.
The software was developed and tested with older versions of PHP and related dependencies, which are no longer supported.
The repository may be unarchived when support for newer environments is implemented.


Overview

GridDB PHP Client is developed using GridDB C Client and SWIG (Simplified Wrapper and Interface Generator).

Operating environment

Building of the library and execution of the sample programs have been checked in the following environment.

OS:              CentOS 7.9(x64)
SWIG:            4.1.0 (commit: d22b7dfaea1f7abd4f3d0baecc1a1eddff827561)
GCC:             4.8.5
PHP:             8.0/8.1
GridDB Server:   4.6 (CE)
GridDB C Client: 4.6 (CE)

OS:              CentOS 8.5(x64)
SWIG:            4.1.0 (commit: d22b7dfaea1f7abd4f3d0baecc1a1eddff827561)
GCC:             8.3.1
PHP:             8.0/8.1
GridDB Server:   4.6 (CE)
GridDB C Client: 4.6 (CE)

OS:              Ubuntu 18.04(x64)
SWIG:            4.1.0 (commit: d22b7dfaea1f7abd4f3d0baecc1a1eddff827561)
GCC:             7.5.0
PHP:             8.0/8.1
GridDB Server:   4.6 (CE)
GridDB C Client: 4.6 (CE)

OS:              Ubuntu 20.04(x64)
SWIG:            4.1.0 (commit: d22b7dfaea1f7abd4f3d0baecc1a1eddff827561)
GCC:             10.3.0
PHP:             8.0/8.1
GridDB Server:   4.6 (CE)
GridDB C Client: 4.6 (CE)

QuickStart

Preparations

Install SWIG as below.

$ git clone https://github.com/swig/swig.git
$ cd swig
$ git checkout d22b7dfaea1f7abd4f3d0baecc1a1eddff827561
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

Note: If CentOS, you might need to install pcre in advance.
$ sudo yum install pcre2-devel.x86_64

Install PHP 8 and GridDB C Client.

Examples of installing PHP 8.1 are as below.

(CentOS 7)
$ sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
$ sudo yum install -y --enablerepo=remi-php81 php php-cli php-devel

(Ubuntu 18.04/20.04)
$ sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common -y
$ sudo add-apt-repository ppa:ondrej/php -y
$ sudo apt update
$ sudo apt install php8.1 php8.1-dev

Set LIBRARY_PATH.

export LIBRARY_PATH=$LIBRARY_PATH:<C client library file directory path>

Build and Run

1. Execute the command on project directory.

$ make

How to run sample (with Command Line)

GridDB Server need to be started in advance.

1. Write the following desctiption in /etc/php.ini.

    extension=<PHP client library file directory path>

2. Set LD_LIBRARY_PATH.

    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:<C client library file directory path>

3. The command to run sample

    $ php sample/sample1.php <GridDB notification address> <GridDB notification port>
        <GridDB cluster name> <GridDB user> <GridDB password>
      -->Person: name=name02 status=false count=2 lob=ABCDEFGHIJ

How to run sample (with Web Browser)

GridDB Server need to be started in advance.

In the case of Web Server: Apache/2.4.6, please use the following steps.

1. Store sample/sample1_web.php in /var/www/html.

2. Store griddb_php_client.so in /usr/lib64/php/modules.

3. Add extension for griddb_php_client.so in /etc/php.ini

4. Set LD_LIBRARY_PATH.

    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:<C client library file directory path>

5. Restart httpd/apache.

6. In web browser, run : http://localhost/sample1_web.php.

7. Click submit button after entering address, port, cluster, user and password.

Function

(available)

  • STRING, BOOL, BYTE, SHORT, INTEGER, LONG, FLOAT, DOUBLE, TIMESTAMP, BLOB type for GridDB
  • put single row, get row with key
  • normal query, aggregation with TQL

(not available)

  • Multi-Put/Get/Query (batch processing)
  • GEOMETRY, Array type for GridDB
  • timeseries compression
  • timeseries-specific function like gsAggregateTimeSeries, gsQueryByTimeSeriesSampling in C client
  • trigger, affinity

Please refer to the following files for more detailed information.

  • PHP Client API Reference

About API:

  • When an error occurs, an exception GSException is thrown.

Community

  • Issues Use the GitHub issue function if you have any requests, questions, or bug reports.
  • PullRequest Use the GitHub pull request function if you want to contribute code. You'll need to agree GridDB Contributor License Agreement(CLA_rev1.1.pdf). By using the GitHub pull request function, you shall be deemed to have agreed to GridDB Contributor License Agreement.

License

GridDB PHP Client source license is Apache License, version 2.0.

About

GridDB PHP Client

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

15 stars

Watchers

8 watching

Forks

10 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.