Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mssql/sybase support through freetds & dblib in php5/6 #157

Closed
wbean1 opened this issue Aug 23, 2016 · 6 comments
Closed

Add mssql/sybase support through freetds & dblib in php5/6 #157

wbean1 opened this issue Aug 23, 2016 · 6 comments

Comments

@wbean1
Copy link

wbean1 commented Aug 23, 2016

Feel free to close if this is an outlandishly complex request... it very well might be.

RHEL7 & Ubuntu 14.4 both supply convenience packages for using mssql through freetds.

Ubuntu has php5-sybase which installs:

# dpkg -L libsybdb5
...
/usr/lib/x86_64-linux-gnu/libsybdb.so.5.0.0
/usr/lib/x86_64-linux-gnu/libsybdb.so.5

# dpkg -L php5-sybase
...
/usr/lib/php5/20121212/pdo_dblib.so
/usr/lib/php5/20121212/mssql.so
...
/usr/share/php5/sybase/pdo_dblib.ini
/usr/share/php5/sybase/mssql.ini

RHEL has php-mssql which installs:

# rpm -ql freetds-0.95.81-1.el7.x86_64
....
/usr/lib64/libsybdb.so.5
/usr/lib64/libsybdb.so.5.1.0

# rpm -ql php-mssql-5.4.16-4.el7.x86_64
/etc/php.d/mssql.ini
/etc/php.d/pdo_dblib.ini
/usr/lib64/php/modules/mssql.so
/usr/lib64/php/modules/pdo_dblib.so

It'd be super fantastic if similar support could be added to the php-buildpack. Alternatively, any guidance on how one might fork the https://github.com/cloudfoundry/binary-builder project, adjust the recipes in there, and create these additional binaries would be appreciated...

I understand that mssql support was removed in PHP7, and that microsoft is working on this thing as the future... https://github.com/Azure/msphpsql. That thing, however, does not look any easier to integrate into a buildpack fork than freetds, unfortunately.

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/128861119

The labels on this github issue will be updated when the story is started.

@RochesterinNYC
Copy link
Contributor

@wbean1 What you're proposing, as we understand it, sounds very similar to what @dmikusa-pivotal did in a recent PR to binary-builder to add optional oracle support to built PHP binaries: cloudfoundry/binary-builder#13

Would you be open to submitting a pull request in a similar vein if that kind of binary-builder support is what you're looking for?

@dmikusa
Copy link

dmikusa commented Aug 30, 2016

For what it's worth, I think this would actually be easier than the Oracle PR. This one doesn't depend on proprietary libraries, it uses FreeTDS which is LGPL software, so it should be easier to package up and no conditional logic.

Off the top of my head, I think you'd just need to...

1.) Edit the ./configure options for PHP to enable the mssql extension here and here.

2.) Have it install the FreeTDS packages here and here.

3.) Have it copy the required FreeTDS shared libraries here and here.

Not sure if that's exactly everything, but it should give you a place to start if you're willing to work on a PR.

@wbean1
Copy link
Author

wbean1 commented Aug 31, 2016

Thanks for the guidance. Just hearing that its not an absurd request that'd be shot down is encouraging. I'll try to get a PR together in the next week or so.

@jchesterpivotal
Copy link
Contributor

In the meantime, do you object to us closing this issue?

@wbean1
Copy link
Author

wbean1 commented Sep 6, 2016

nope, that's fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants