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

Heroku failure for sqlsrv.so #2

Closed
danielborowski opened this issue Dec 3, 2024 · 1 comment
Closed

Heroku failure for sqlsrv.so #2

danielborowski opened this issue Dec 3, 2024 · 1 comment

Comments

@danielborowski
Copy link

danielborowski commented Dec 3, 2024

Had two issues when following your instructions and just wanted to post here for posterity (maybe I had missed something as well, feel free to let me know). I had to install 5.11.1 on Ubuntu 22.04. My composer.json file is below:

{
  "require" : {
    "php": "~8.2.0",
    "ext-sqlsrv": "^5.11",
    "ext-pdo_sqlsrv": "^5.11",
    ....
}
  • First I noticed an error when using this file: https://github.com/heroku-softtrends/mssql-server-drivers-for-php/raw/main/5.11.1/ubuntu/22.04/php/8.2/nts/packages.json I had the following error when trying to push:
remote:  !     >     - composer.json/composer.lock requires ext-sqlsrv ^5.11 -> satisfiable by ext-sqlsrv[5.11.1].
remote:  !     >     - ext-sqlsrv 5.11.1 requires php ~8.1.0 || ~8.2.0 -> your php version (8.3.14) does not satisfy that requirement

If I changed the keys below then this error was fixed. Someone else also mentioned this as a fix here.

"require": {
    "php": "~8.1.0 || ~8.2.0",
    "heroku/installer-plugin": "^1.2.0"
}
"require": {
    "heroku-sys/php": "~8.2.0",
    "heroku-sys/heroku": "^22.0.0",
    "heroku/installer-plugin": "^1.2.0"
},
  • The second error came from using this file in your packages.json: https://github.com/heroku-softtrends/mssql-server-drivers-for-php/raw/main/5.11.1/ubuntu/22.04/php/8.2/nts/ext-sqlsrv-5.11.1_php-8.2.tar.gz

This tar unpacks the following file: /lib/php/extensions/no-debug-non-zts-20220829/sqlserv.so but when pushing to Heroku I kept getting the error below.

PHP Warning:  PHP Startup: Unable to load dynamic library 'sqlsrv.so' (tried: /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20220829/sqlsrv.so (/app/.heroku/php/lib/php/extensions/no-debug-non-zts-20220829/sqlsrv.so: cannot open shared object file: No such file or directory)

I managed to fix this by changing the filename from sqlserv.so to sqlsrv.so and creating a new tar and linking to that instead.

@heroku-softtrends
Copy link
Owner

heroku-softtrends commented Dec 4, 2024

Sorry for the inconvenience. reported issue fixed, please again copy or download aptfile and follow the instructions based on driver and ubuntu versions

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

2 participants