-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Can not install mssql extension on php-fpm #3042
Comments
I also have a problem since yersterday with MSSQL. |
@bestlong thanks for workspace fix, will see what I can do on php-fpm |
It seems like i'm not able to install mssql odbc drivers on debian ... Will investigate more It seems like the problem is coming from debian 11 released recently. Maybe we should try to stay on debian 10 for now ? |
Hi @GautierDele php-fpm image now base on Debian 11 (bullseye). unfortunately Microsoft ODBC 17 not support it. Maybe I will locked php-fpm base image on Debian 10 (buster) or change into FreeTDS. |
I have pulled all changes and also experiencing the same issue as OP @dinhchuong7913 |
Hi @bestlong, Yeah maybe waiting a bit for packages to release could be a good idea, For now, all users can use a former image from php-fpm / workspace. Did you have time to look at my PR ? Thanks |
How can i solve that problem with laradock/php-fpm msodbcsql17 install? |
I agree with @GautierDele - should hardcode to Debian 10 for now. @arthr you can try changing the base image to use the php-buster variant. |
https://github.com/MicrosoftDocs/sql-docs/issues/6494#issuecomment-907890630 |
Temp workaround: 1 - Comment the line 17 from the file https://github.com/laradock/laradock/blob/master/php-fpm/Dockerfile on your installation of laradock, and paste this:
2 - Create a file Dockerfile-7.4 inside the folder
3 - Inside the laradock directory, rebuild the php-fpm image with this command:
then
It should build without errors. Now you can start up your containers, with
It worked for me. I hope it works for you as well. |
When i try to run the second step i got this error: and then build fail. |
PHP_FPM_BASE_IMAGE_TAG_PREFIX=20210814 |
Thx for the help! <3 |
Hi 👋 this issue has been automatically marked as |
…is workspace elasticsearch php-worker php-fpm mongo failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to parse stage name "laradock/php-fpm:20210814 # laradock#3042 (comment)": invalid reference format
Hi again 👋 we would like to inform you that this issue has been automatically |
It seems Microsoft finally released an update https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15, just need to check if the issue healed itselfs... |
I couldn't fix it with this Does anyone have another solution? My error
UPDATE: |
Description:
After change config
PHP_FPM_INSTALL_MSSQL=true
WORKSPACE_INSTALL_MSSQL=true
I run build php by running command docker compose build php-fpm
I get the error
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c set -eux; if [ ${INSTALL_MSSQL} = true ]; then if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then apt-get -yqq install freetds-dev libsybdb5 && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/libsybdb.so && docker-php-ext-install mssql pdo_dblib && php -m | grep -q 'mssql' && php -m | grep -q 'pdo_dblib' ;else apt-get install -yqq apt-transport-https gnupg && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list && apt-get update -yqq && ACCEPT_EULA=Y apt-get install -yqq unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && ln -sfn /etc/locale.alias /usr/share/locale/locale.alias && locale-gen && if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "2" ]; then pecl install pdo_sqlsrv-5.8.1 sqlsrv-5.8.1 ;elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ]; then pecl install pdo_sqlsrv-5.6.1 sqlsrv-5.6.1 ;elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then pecl install pdo_sqlsrv-5.3.0 sqlsrv-5.3.0 ;else pecl install pdo_sqlsrv sqlsrv ;fi && docker-php-ext-enable pdo_sqlsrv sqlsrv && php -m | grep -q 'pdo_sqlsrv' && php -m | grep -q 'sqlsrv' ;fi ;fi]: exit code: 100
System info: Mac, Windows or Linux. Include which disto/version
Mac 11.5.2
Please help me
The text was updated successfully, but these errors were encountered: