-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
sqlsrv connection problem: Can't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1' #592
Comments
@SlimDeluxe Can you use get into the container shell (using shell.sh or shell.bat) and ls the lib file? |
@science695 I remember checking and it was there, I can check again when I get home later today. |
@science695, yes, it exists
Btw. the same error occurs with PHP 7.3 set in |
Maybe related to microsoft/msphpsql#745 (comment) I thought they fixed it in msodbcsql17 (17.3), but it's not.
|
@whuhacker
But you are on to something, they really are not registered correctly. Any idea how to fix this?
I tried searching for the specified files globally but there are no results :( |
Got the same error here, is by any changes related to microsoft/msphpsql#1002 ? |
@Tbaile someone on gitter told me "this dockerfile works well", but I haven't tried it. Devilbox is my first contact with docker, so I don't know what to do with it and I haven't googled it yet :) I want to find a solution within devilbox.
|
Well, this Dockerfile is exactly devilbox, just with a few add-ons 😄, don't worry if it's your first approach, once you got into the mindset it's easier. |
I realise DevilBox is just a wrapper for Docker. I only meant to say that I want a solution that's easy to implement and manage with updates (git pull), portability to other systems/developers... in mind.
However I still think the startup script distributed with DevilBox should be fixed, so I will leave this bug report open. Maybe some developer will get around and attend to it. |
Just found out that the PHP-FPM image used as a base recently got updated
to Debian 9, the script should be fixed, using version 9 as you used above
Il giorno sab 27 lug 2019 alle 18:53 Omer Sabic <notifications@github.com>
ha scritto:
… I want to find a solution within devilbox
Well, this Dockerfile is exactly devilbox, just with a few add-ons , don't
worry if it's your first approach, once you got into the mindset it's
easier.
I realise DevilBox is just a wrapper for Docker. I only meant to say that
I want a solution that's easy to implement and manage with updates (git
pull), portability to other systems/developers... in mind.
With that said, I converted the above script to a startup shell script and *it
works fine* :) The only downside is that now the PHP container needs some
more time to startup - the apt update command is somewhat slow.
Anyway, here's the script which you should put in cfg/php-startup-7.3/
(for a specific PHP version) or autostart/ (for all versions).
#!/bin/bash
apt update
apt install -y wget gpg apt-transport-https ca-certificates
cd ~
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/debian/9/prod.list
mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
chown root:root /etc/apt/sources.list.d/microsoft-prod.list
apt update
ACCEPT_EULA=Y apt install -y msodbcsql17
However I still think the startup script distributed with DevilBox should
be fixed, so I will leave this bug report open. Maybe some developer will
get around and attend to it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#592?email_source=notifications&email_token=AB5N7INQB3DQ5MTT5KJ4VOLQBR4RDA5CNFSM4HX6MBJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD26O5KQ#issuecomment-515698346>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB5N7IO5FNGCSEGQ2PI3FVLQBR4RDANCNFSM4HX6MBJQ>
.
|
Considering your last reply, I tried changing the startup script to use the version 9 and it works :) And it's much faster to start than the apt one. So all you need to do is change this line in
to this:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
ISSUE TYPE
Checklist
.env
file is attacheddocker-compose.override.yml
is attached (if it exists)cfg/
dir are attached (if customized)docker-compose logs
andlog/
output is added(the above files are not allowed as attachments, let me know if you need them and I can zip them)
OS / ENVIRONMENT
SUMMARY
When connecting to remote SQL server an error is returned.
STEPS TO REPRODUCE
PHP_MODULES_DISABLE=oci8,PDO_OCI,pdo_sqlsrv,rdkafka,swoole
02-ms-odbc-driver.sh-example
and set the ACCEPT_EULA to YEXPECTED BEHAVIOUR
Being able to connect.
ACTUAL BEHAVIOUR
sqlsqv_errors() returns the following array:
OTHER INFORMATION
Start command
File and user permissions (Linux & MacOS)
The text was updated successfully, but these errors were encountered: