PHP extension xmlrpc and MAMP

I am trying to get the xmlrpc extension to work for php5 in MAMP (1.8.4).

I checked which version of PHP 5 was installed:

$ /Applications/MAMP/bin/php5/bin/php -v PHP 5.2.11 (cli) (built: Dec 12 2009 13:19:08) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies 

I downloaded the PHP 5.2.11 source packages and created a shared library for xmlrpc:

 $ LIBS=-lresolv ./configure --prefix=/opt --with-xmlrpc=shared $ make $ ls modules xmlrpc.a xmlrpc.la xmlrpc.so 

I copied these files to MAMP:

 $ cp modules/* /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/ 

I added the extension setting to the ini file:

 $ vi /Applications/MAMP/conf/php5/php.ini extension=xmlrpc.so 

I restarted MAMP:

 $ ./bin/stop.sh $ ./bin/start.sh 

When I make phpinfo only link to xmlrpc , I find this in the PHP Core section:

 xmlrpc_error_number => 0 => 0 xmlrpc_errors => Off => Off 

I am trying to install Moodle and it still tells me that the xmlrpc extension is not available.

I am starting PHP, so if someone can tell me how to confirm the extension, available or not, that would be great, or at least some pointers on how to debug this further.

Thanks.

UPDATE . I found the PHP log file and has the following entry:

 [08-Jan-2010 23:37:52] PHP Warning: PHP Startup: Unable to load dynamic \ library '/Applications/MAMP/bin/php5/lib/php/extensions/ \ no-debug-non-zts- 20060613/xmlrpc.so' - (null) in Unknown on line 0 
+6
php mamp moodle
source share
4 answers

This method worked for me:

  • Download Moodle4Mac (Moodle is software that needs PHP and xmlrpc, and comes with built-in XAMPP);
  • Copied xmlrpc.so from this package (mine was under /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626 ) in the PHP MAMP extension folder (mine - /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/ );
  • Added extension=xmlrpc.so to PHP.INI .

Restarting MAMP, and thatโ€™s it. Hope it helps! :-)

+4
source share

Are you using the MAMP package from moodle? http://download.moodle.org/download.php/macosx/Moodle4Mac-XAMPP-20.dmg This should work.

The reason why PHP could not load the extension may arise by architecture type, PHP and its extension must use the same architecture type parameter in CFLAG.

I had a similar problem, but I did not use MAMP, I compiled PHP using static links, sometimes Mac OS X suffered a problem to load a dynamic library.

0
source share

Just move the xmlrpc.so file to the folder / Applications / MAMP / bin / php5.3 / lib / php / extensions / no-debug-non-zts-20090626 / (the PHP version may also be 5.4 or 5.5) then restart MAMP then in When setting up moodle, just click "Continue", it will still say that you should verify that the installation is just continuing. He will start the installation and complete the installation of all modules and components, when all installed ones will press Command F (MAC) or Control F (Win) and search for xmlrpc.so you will see that this succeeds, so do not worry, it will work.

0
source share
  • Download MAMP components from sourceforge http://sourceforge.net/projects/mamp/files/mamp/2.1.2/
  • Extract zip file
  • Inside the selected folder, you will see several php archives. Extract the one that matches your installed version. (In my case, my installed version was 5.5.9, but the highest version available from mom's components was 5.4.4, so I used this because I was going to create the source anyway).
  • From the cd terminal to the ext folder from the php folder that you extracted, and then cd to the xmlrpc folder.
  • Run the following commands from the terminal

    ./Configure

    to do

  • If successful, copy xmlrpc.so from the builds folder to the extensions folder of your php installation.
  • Add extension = xmlrpc.so in php.ini
0
source share

All Articles