Skip to content

Commit

Permalink
Merge pull request cloudfoundry#17 from wbean1/freetds
Browse files Browse the repository at this point in the history
add mssql & pdo_dblib support via freetds for php5/6
  • Loading branch information
RochesterinNYC authored and bonfilsd committed Oct 12, 2017
2 parents 70b428f + dc81732 commit 7c2991e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions recipe/php5_meal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def configure_options
'--enable-pdo=shared',
'--with-pdo-sqlite=shared,/usr',
'--with-pdo-mysql=shared,mysqlnd',
'--with-mssql=shared',
'--with-pdo-dblib=shared',
'--with-gd=shared',
'--with-jpeg-dir=/usr',
'--with-freetype-dir=/usr',
Expand Down Expand Up @@ -101,6 +103,7 @@ def setup_tar
cp -a /usr/lib/x86_64-linux-gnu/libcassandra.so* #{path}/lib
cp -a /usr/lib/x86_64-linux-gnu/libuv.so* #{path}/lib
cp -a /usr/local/lib/x86_64-linux-gnu/librabbitmq.so* #{path}/lib/
cp -a /usr/lib/x86_64-linux-gnu/libsybdb.so* #{path}/lib/
# Remove unused files
rm "#{path}/etc/php-fpm.conf.default"
Expand Down Expand Up @@ -128,6 +131,7 @@ def cook
sudo apt-get -y upgrade
sudo apt-get -y install \
automake \
freetds-dev \
libaspell-dev \
libc-client2007e-dev \
libcurl4-openssl-dev \
Expand All @@ -145,13 +149,15 @@ def cook
libsnmp-dev \
libsqlite3-dev \
libssl-dev \
libsybdb5 \
libxml2-dev \
libzip-dev \
libzookeeper-mt-dev \
snmp-mibs-downloader
sudo ln -fs /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
sudo ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so
sudo ln -fs /usr/lib/x86_64-linux-gnu/libldap_r.so /usr/lib/libldap_r.so
sudo ln -fs /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/libsybdb.so
eof

install_cassandra_dependencies
Expand Down
1 change: 1 addition & 0 deletions spec/integration/php5_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
expect(tar_contains_file('php/lib/libgearman.so.7')).to eq true
expect(tar_contains_file('php/lib/libcassandra.so.2')).to eq true
expect(tar_contains_file('php/lib/libuv.so.1')).to eq true
expect(tar_contains_file('php/lib/libsybdb.so.5')).to eq true

expect(tar_contains_file('php/lib/php/extensions/*/ioncube.so')).to eq true
expect(tar_contains_file('php/lib/php/extensions/*/phalcon.so')).to eq true
Expand Down

0 comments on commit 7c2991e

Please sign in to comment.