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

[Bug]: Unable to load dynamic library #8

Open
mboisvertdupras opened this issue Sep 22, 2024 · 3 comments
Open

[Bug]: Unable to load dynamic library #8

mboisvertdupras opened this issue Sep 22, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@mboisvertdupras
Copy link

Description

After going through the steps in the documentation, I'm unable to start/restart my php process because of an error loading the liblibsql_php.so library.

Minimal Reproduction

composer global require darkterminal/turso-php-installer
turso-php-installer install
valet restart

Exception or Error

Unable to load dynamic library '/Users//.turso-client-php/liblibsql_php.so' (tried: /Users//.turso-client-php/liblibsql_php.so (dlopen(/Users//.turso-client-php/liblibsql_php.so, 0x0009): symbol not found in flat namespace '_sqlite3_wal_manager')

@mboisvertdupras mboisvertdupras added the bug Something isn't working label Sep 22, 2024
@darkterminal
Copy link
Collaborator

Unable to load dynamic library '/Users//.turso-client-php/liblibsql_php.so' (tried: /Users//.turso-client-php/liblibsql_php.so (dlopen(/Users//.turso-client-php/liblibsql_php.so, 0x0009): symbol not found in flat namespace '_sqlite3_wal_manager')

When viewed from the error that appears here, extension is not directed to the right location. It's should:

/Users/<your-username>/.turso-client-php/liblibsql_php.so

When you ls -la | grep .turso from your $HOME, it's should look something like this:

> ls -la | grep .turso
drwxrwxr-x   2 username username      4096 Sep 20 15:48 .turso-client-php

> ls ~/.turso-client-php
liblibsql_php.so  libsql_php_extension.stubs.php

And when it's failed to load, you need to add the relative path:

# php.ini
extension=/Users/<your-username>/.turso-client-php/liblibsql_php.so

@mboisvertdupras
Copy link
Author

It's odd that an extra / is added because this is what I have in my php.ini:
extension=/Users/user/.turso-client-php/liblibsql_php.so

And this is the output of the 2 commands:

❯ ls -la | grep .turso 
drwxr-xr-x    6 user  staff       192 22 Sep 11:24 .turso-client-php

~ 
❯ ls ~/.turso-client-php
liblibsql_php.dylib		liblibsql_php.so		libsql_php_extension.stubs.php

@darkterminal
Copy link
Collaborator

Yes that odd... cz I have never tried it directly with herd. If you can fix that It will awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants