Page MenuHomeSolus

Initial commit of php-mssql
AbandonedPublic

Authored by der_eismann on Sep 3 2018, 2:32 PM.

Details

Summary

Include PHP modules for MSSQL database. Resolves T6849

Test Plan
  • Make sure the MS SQL ODBC driver is working (sqlcmd)
  • Execute a query via PHP - sample code:
<?php
    echo "\n";
    $serverName = "tcp:192.168.103.66,1433";
    $connectionOptions = array("Database"=>"master", "Uid"=>"sysop", "PWD"=>"Password");
	
	 //Establishes the connection
	 $conn = sqlsrv_connect($serverName, $connectionOptions);
	 //Select Query
	 $tsql = "SELECT * FROM dbo.MSreplication_options";
	 //Executes the query
	 $getProducts = sqlsrv_query($conn, $tsql);
	 var_dump(sqlsrv_fetch_array($getProducts, SQLSRV_FETCH_ASSOC));
	 die();

Output:

array(6) {
  'optname' =>
  string(13) "transactional"
  'value' =>
  int(1)
  'major_version' =>
  int(90)
  'minor_version' =>
  int(0)
  'revision' =>
  int(0)
  'install_failures' =>
  int(0)
}

Diff Detail

Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

der_eismann created this revision.Sep 3 2018, 2:32 PM
der_eismann requested review of this revision.Sep 3 2018, 2:32 PM
der_eismann edited the test plan for this revision. (Show Details)Sep 4 2018, 11:26 AM
JoshStrobl requested changes to this revision.Sep 19 2018, 7:37 AM
JoshStrobl added a subscriber: JoshStrobl.
JoshStrobl added inline comments.
package.yml
23–26

Shouldn't be necessary, autoreconf does this, which we call in our %reconfigure macro.

This revision now requires changes to proceed.Sep 19 2018, 7:37 AM

Thanks for your comment Josh!
On another note - do you have any suggestions for the naming conventions or are these names okay?

package.yml
23–26

If I replace this block with %reconfigure --with-$plugin I have problems in the build step:

libtool: Version mismatch error.  This is libtool 2.4.6, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6
libtool: and run autoconf again.
make: *** [Makefile:194: pdo_dbh.lo] Error 63

Is this a problem with the macro?

JoshStrobl accepted this revision.Dec 11 2018, 4:32 AM
This revision is now accepted and ready to land.Dec 11 2018, 4:32 AM
JoshStrobl requested changes to this revision.Dec 11 2018, 9:26 PM
JoshStrobl added inline comments.
package.yml
15–16

Does this not need msodbcsql? It's not listed in abi_used_libs.

This revision now requires changes to proceed.Dec 11 2018, 9:26 PM
der_eismann abandoned this revision.Feb 12 2019, 8:33 PM