Installing extra PHP libraries / Using Alternate PHP install

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Installing extra PHP libraries / Using Alternate PHP install

Postby gurudev » 16. April 2018 22:36

Hello,

I am a longtime XAMPP user with a dev environment on macOS High Sierra.

I have been struggling for days to find a way to get the GMP extensions installed on my current XAMPP installation.

I have tried using BREW to install a version of PHP that includes GMP. I have verified that the brew installation DOES include gmp support (e.g. php_info() shows "gmp_support: enabled").

I have then directed my XAMPP apache to load THAT version of PHP by replacing the "LoadModule" in the httpd-xampp.conf file.

Unfortunately, when I do that the apache server will not start. The "Application Log" window reports:
Code: Select all
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started


No further errors are reported. However, the server indicator icon switches from yellow to red.

I cannot seem to find a gmp.so file, neither under the XAMPP installation, nor under the BREW installation, (nor anywhere else). So simply enabling it as an extension doesn't seem possible either.

Can anyone recommend a way to recompile XAMPP's PHP to include the --with-gmp directive? Or a way to successfully redirect XAMPP to the BREW installation that has gmp? Or another method to add GMP to XAMPP?
gurudev
 
Posts: 1
Joined: 16. April 2018 22:18
XAMPP version: 7.1.16
Operating System: OSX

Re: Installing extra PHP libraries / Using Alternate PHP ins

Postby Nobbie » 22. April 2018 11:06

In order to use your own PHP installation instead of Xampps, i recommend not to load PHP as a Module, instead run PHP in CGI Mode.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 9 guests