Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build SQL Relay for PDO from source on windows?

I am trying to integrate SQL Relay with PHP PDO on Windows (WAMP). I have installed and compiled Rudiments and SQL Relay on Windows through Visual Studio Developer Command Prompt following the instructions given on the Rudiments and SQL Relay SourceForge pages.

Then I downloaded the pdo_sqlrelay extension source from github and tried to build the dll for this extension.

In the build instructions, I couldn't find the ones pertaining to Windows specifically. I found instructions related to Linux. They are:

cd /path/to/pdo_sqlrelay
phpize
./configure --with-php-config=/path/to/php-config \
--with-pdo-sqlrelay=/path/to/sqlrelay/prefix \
--with-rudiments=/path/to/rudiments/prefix

make
make install

I tried to convert them to the relative Windows commands by following the step by step php extension build instructions on PHP's Wiki for building for Windows.

When I tried to execute the command, it threw a fatal error. (like undefined or invalid $remains).:

configure --disable-all --enable-cli --enable-$remains

I would appreciate if someone could help me out to build the pdo_sqlrelay extension on Windows.

like image 308
Divakar Gujjala Avatar asked Apr 04 '16 04:04

Divakar Gujjala


1 Answers

you need to ...

first run bin\phpsdk_setvars.bat

to set up the build environment, so that $remains will be known as a variable.

then configure the build with buildconf (or buildconf --force for rebuilding).

then configure --disable-all --enable-cli --enable-$remains ... you probably might also want to --disable-zts (depending which PHP is being used).

it's rather nmake to build & nmake clean to clean.

to install & uninstall it's nmake install and nmake uninstall.

the documentation also states ...that:

First build and install Rudiments, then build and install SQL Relay.

like image 146
Martin Zeitler Avatar answered Nov 15 '22 13:11

Martin Zeitler