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

1

10

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.

Serial answered 4/4, 2016 at 4:38 Comment(10)
This documentation doesn't contains the source to download php_pdo_sqlrelay.dll or to build phppdo extension for sql relay..Serial
voted up for you then, I misunderstood, good luck thoughSubmarine
How do you execute the command configure --disable-all --enable-cli --enable-$remains?Certiorari
I am trying to execute it through Developer command prompt on windows as mentioned in the doc but it is throwing up errors. Could you recommend a way to execute it...Serial
$remains looks like a bash variable that didn't get set, but the docs don't even attempt to outline what that variable should be exported as...Turbit
My guess is that $remains is just an example there ie. --enable-phpdbg/--enable-soap etc. anything. Seems like you're supposed to put the extension you want enabled, not literally $remains.Standish
Correct.. $remains is an example. But I am wondering which extension do we need to replace here so as to make it working on windows.Serial
This might be a useful resource on the matter.Standish
Have you tried configure --help? Seems you recognize it is just example/placeholder. So why would you expect that would work?Anglian
When you build php from the source, you can enable features and libraries with the --enable-* parameter, you can propably just omit the whole command there and add what you need enabled for the sql relay and rudiments. Might be as simple as configure depending what you gotPerdurable
D
1

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.

Dingdong answered 1/2, 2018 at 9:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.