All Projects → JCotton1123 → php-jdbc-bridge

JCotton1123 / php-jdbc-bridge

Licence: other
Service and library to allow a PHP application to interface with a database via JDBC

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to php-jdbc-bridge

sqlite-jna
Java wrapper and Jdbc driver for SQLite using JNA or Bridj or JNR or JNI or JavaCPP.
Stars: ✭ 20 (+0%)
Mutual labels:  jdbc
jTDS
jTDS JDBC Driver
Stars: ✭ 67 (+235%)
Mutual labels:  jdbc
baymax
铜板街轻量级JDBC层分库分表框架
Stars: ✭ 45 (+125%)
Mutual labels:  jdbc
tekniq
A framework designed around Kotlin providing Restful HTTP Client, JDBC DSL, Loading Cache, Configurations, Validations, and more
Stars: ✭ 31 (+55%)
Mutual labels:  jdbc
migrate-Java-EE-app-to-azure
Migrate an existing Java EE workload to Azure
Stars: ✭ 12 (-40%)
Mutual labels:  jdbc
jnosql.github.io
The JNoSQL is a framework whose has the goal to help Java developers to create Java EE applications with NoSQL, whereby they can make scalable application beyond enjoy the polyglot persistence.
Stars: ✭ 13 (-35%)
Mutual labels:  jdbc
database-metadata-bind
A library for binding information from java.sql.DatabaseMetadata
Stars: ✭ 17 (-15%)
Mutual labels:  jdbc
delta
DDD-centric event-sourcing library for the JVM
Stars: ✭ 15 (-25%)
Mutual labels:  jdbc
spring-data-jdbc-repository
Spring Data JDBC generic DAO implementation in Java (more up-to-date fork)
Stars: ✭ 123 (+515%)
Mutual labels:  jdbc
acolyte
🐯 Mockup/testing JDBC & MongoDB driver (or Chmeee's son on the Ringworld).
Stars: ✭ 58 (+190%)
Mutual labels:  jdbc
oracle-jdbc-tester
A simple command line Java application to test JDBC connection to Oracle database
Stars: ✭ 37 (+85%)
Mutual labels:  jdbc
jdk-source-code-reading
JDK source code reading
Stars: ✭ 19 (-5%)
Mutual labels:  jdbc
dalesbred
Dalesbred - a database access library for Java
Stars: ✭ 50 (+150%)
Mutual labels:  jdbc
JDBCManager
一款操作数据库的小工具
Stars: ✭ 13 (-35%)
Mutual labels:  jdbc
liferay-portal-oracledb-support
Liferay Portal 7 Community Edition Oracle Database Support ** NO LONGER MAINTAINED **. Refer to this repository: https://github.com/amusarra/liferay-portal-database-all-in-one-support
Stars: ✭ 13 (-35%)
Mutual labels:  jdbc
itstack-naive-chat-server
💞 《服务端》| 服务端同样使用Netty4.x作为socket的通信框架,同时在服务端使用Layui作为管理后台的页面,并且我们的服务端采用偏向于DDD领域驱动设计的方式与Netty集合,以此来达到我们的框架结构整洁干净易于扩展。同时我们的通信协议也是在服务端进行定义的,并对外提供可引入的Jar包,这样来保证客户端与服务端共同协议下进行通信。
Stars: ✭ 21 (+5%)
Mutual labels:  jdbc
warpdb
DSL-driven RDBMS interface for Java.
Stars: ✭ 73 (+265%)
Mutual labels:  jdbc
LPU-Java-2022-1
LPU Java JEE Sessions 2022 Batch 1
Stars: ✭ 30 (+50%)
Mutual labels:  jdbc
nimble-orm
一个灵活轻量级的基于Spring jdbcTemplate的ORM
Stars: ✭ 36 (+80%)
Mutual labels:  jdbc
PECI-Java-MAR-2015
Repositorio del curso de Java de Mar 2015
Stars: ✭ 29 (+45%)
Mutual labels:  jdbc

PHP-JDBC Bridge

The PHP-JDBC bridge is a service and library for allowing a PHP application to interface with a database for which only a JDBC driver exists. This is a fork of PJBS.

The java component runs as a service which accepts socket requests from the PHP component allowing the transfer of request and response between PHP and the JDBC database.

Requirements

  • Java 1.6+
  • PHP 5.3+
  • A JDBC driver

Build (Java Service)

To build the PHP-JDBC bridge jar:

cd java
./build.sh

To build a PHP-JDBC RPM:

cd java
./build.sh
./build-rpm.sh

Usage

Java Service

To run the service:

java -cp 'lib/pjbridge.jar:lib/commons-daemon-1.0.15.jar:lib/<JDBC driver>.jar Server <JDBC driver entry point> <port>

Example:

cd java
java -cp 'lib/pjbridge.jar:lib/commons-daemon-1.0.15.jar:lib/dharma.jar' Server dharma.jdbc.DharmaDriver 4444

where the lib directory contains the php-jdbc jar, the commons-daemon jar and your JDBC driver jar.

PHP

Example:

<?php
require "PJBridge.php";

$dbHost = "server";
$dbName = "";
$dbPort = "1990";
$dbUser = "dharma";
$dbPass = "";

$connStr = "jdbc:dharma:T:${dbHost}:${dbName}:${dbPort}";

$db = new PJBridge();
$result = $db->connect($connStr, $dbUser, $dbPass);
if(!$result){
    die("Failed to connect");
}

$cursor = $db->exec("SELECT * FROM \"AR Customer File\"");

while($row = $db->fetch_array($cursor)){
    print_r($row);
}

$db->free_result($cursor);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].