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]: How can I enabled the default xsl extension. #145

Closed
tecnoe opened this issue Aug 25, 2023 · 11 comments
Closed

[Bug]: How can I enabled the default xsl extension. #145

tecnoe opened this issue Aug 25, 2023 · 11 comments

Comments

@tecnoe
Copy link

tecnoe commented Aug 25, 2023

Operating system version

macOs Ventura 13.5

System architecture

ARM64 (M1, M2, etc)

Herd Version

1.2.0

PHP Version

PHP 8.2

Bug description

How can I enable the PHP-XSL extension. PHP includes the XSL extension by default, but I do not how to enable it.

Steps to reproduce

No response

Relevant log output

No response

@sschlein
Copy link
Member

Herd only includes the extensions that are listed at the FAQs at https://herd.laravel.com/ at the moment but you can install others with the process described in the docs: https://herd.laravel.com/docs/1/advanced-usage/additional-extensions

@ElRochito
Copy link

@sschlein xsl can't be install via pecl

pecl install xsl prompt

No releases available for package "pecl.php.net/xsl"
install failed

@ElRochito
Copy link

@sschlein any ideas to install it other than pecl ?

@zupolgec
Copy link

zupolgec commented Sep 6, 2023

There are various extensions that can't be installed with PECL. Any other solution? Thanks!

@SagarNaliyapara
Copy link

@ElRochito @zupolgec Found any solutions? I'm also finding how to install xsl extension

@zupolgec
Copy link

@ElRochito @zupolgec Found any solutions? I'm also finding how to install xsl extension

Nope. Only solution at the moment is to go back to Homebrew PHP

@SagarNaliyapara
Copy link

@zupolgec I downloaded extension manually from here - https://packages.macports.org/php81-xsl/ and then found .so file in it, added into php.ini and it fixed the issue for me

@robbanl
Copy link

robbanl commented Feb 5, 2024

I found this thread some time earlier. New computer, same problem :-)

I downloaded the corresponding xsl.so file and saved it in:

/Users/myusername/Library/Application Support/Herd/config/php/81

Then added the following line to the PHP file in the same directory:

extension=/Users/myusername/Library/Application Support/Herd/config/php/81/xsl.so

After running php -v, I had to authorize the xsl.so file in OSX system settings, like any other unverified application.

Hopefully I won't need to find this thread again, but the above might help someone else.

@marlonbasten
Copy link

marlonbasten commented Feb 14, 2024

Well, I tried to do the same but I'm getting this error after loading the xsl.so:

Warning: PHP Startup: Unable to load dynamic library '/Users/username/.extensions/php/83/xsl.so' (tried: /Users/username/.extensions/php/83/xsl.so (dlopen(/Users/username/.extensions/php/83/xsl.so, 0x0009): Library not loaded: /opt/local/lib/libexslt.0.dylib

Any ideas what that could be? Already installed libxml2 and libxslt via homebrew to no avail.

@marlonbasten
Copy link

marlonbasten commented Feb 14, 2024

Ok, I fixed it (for me at least).

This solved it for me:

brew install libxml2 libxslt
sudo mkdir -p /opt/local/lib
sudo ln -s /opt/homebrew/opt/libxslt/lib/libexslt.0.dylib /opt/local/lib/
sudo ln -s /opt/homebrew/opt/libxslt/lib/libxslt.1.dylib /opt/local/lib/
sudo ln -s /opt/homebrew/opt/libxml2/lib/libxml2.2.dylib /opt/local/lib/

@robbanl
Copy link

robbanl commented Feb 14, 2024

@marlonbasten Nice, this looks like a much nicer solution than mine :-) I'll give it a try!

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

7 participants