I’m trying to use MAMP pro 5 to setup a PHP dev environment. But my sites are not running properly. I keep getting 500 errors.
I found out I need the XSL extension for PHP. I tried php version 7.3.19 and 7.4.2. I did a lot of research online. The solution I found is to uncomment ;extension=php_xsl.dll
in php.ini. But I don’t have this line in php.ini.
I tried manually adding a php_xsl.dll file to ext folder and add extension=php_xsl.dll
in php.ini file but the extension is not showing up in phpinfo(). I checked the log file and found the error
"Unable to load dynamic library ‘php_xsl.dll’ (tried: C:MAMPbinphpphp7.3.25extphp_xsl.dll (The specified procedure could not be found.),"
How can I install the xsl extension?
2
Answers
I originally got the file from IIS version of PHP. I guess it's a non thread version of php which is different from the one MAMP use. I ended up downloading a thread safe version of php and grabbed the dll file in there. The problem is finally solved.
You have to download a newer version of PHP through MAMP software.
Go to
Languages
>PHP
and click on+
and select7.4.30
.After the download you can see that the folder
MAMP/bin/php/php7.4.30/ext/
will have thephp_xsl.dll
extension. By default it’s enabled, so no need to touchphp.ini
file.