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.

LuFFy
  • 8,799
  • 10
  • 41
  • 59
Divakar Gujjala
  • 803
  • 8
  • 24
  • This documentation doesn't contains the source to download php_pdo_sqlrelay.dll or to build phppdo extension for sql relay.. – Divakar Gujjala Apr 04 '16 at 11:29
  • voted up for you then, I misunderstood, good luck though – Jaquarh Apr 04 '16 at 11:56
  • How do you execute the command `configure --disable-all --enable-cli --enable-$remains`? – Arleigh Hix Apr 10 '16 at 23:46
  • 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... – Divakar Gujjala Apr 11 '16 at 05:06
  • $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... – Alex Barker Apr 13 '16 at 00:29
  • 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. – Ekin Apr 25 '16 at 05:23
  • 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. – Divakar Gujjala Apr 25 '16 at 05:40
  • [This](http://blog.benoitblanchon.fr/build-php-extension-on-windows/) might be a useful resource on the matter. – Ekin Apr 25 '16 at 05:54
  • Have you tried `configure --help`? Seems you recognize it is just example/placeholder. So why would you expect that would work? – ficuscr Jan 18 '18 at 19:21
  • 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 got – user3647971 Jan 19 '18 at 03:21

1 Answers1

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.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216