Where to find MAMP server components and Libraries

前端 未结 3 1824
情书的邮戳
情书的邮戳 2021-01-05 09:30

I am trying to install pecl_http in MAMP php. I am getting the following errors.

grep: /Applications/MAMP/bin/php/php5.5.10/include/php/main/php.h: N

相关标签:
3条回答
  • 2021-01-05 10:08

    I've got this running with MAMP 3.2.1 on OS X 10.10.5 Yosemite. Here's the commands I ran:

    download the php source code: http://us2.php.net/get/php-5.6.7.tar.bz2/from/a/mirror

    go to the downloads folder

    cd ~/Downloads
    

    extract the tarball

    tar -xzvf ./php-5.6.7.tar.bz2
    

    rename the resulting folder to php:

    mv php-5.6.7 php
    

    move it

    mv php /Applications/MAMP/bin/php/php5.6.7/include/
    

    install the Xcode command line tools:

    xcode-select --install
    

    run configure and build something!

    cd /Applications/MAMP/bin/php/php5.6.7/include/php
    ./configure
    pecl install uploadprogress
    

    Thanks to:

    Can't phpize or configure an extension in OS X 10.9 Mavericks

    and

    How to fix, 'PHP' make, in Mac OS X (10.9.4)?

    0 讨论(0)
  • 2021-01-05 10:11

    I struggled with the same as well. Installing was a pain because MAMP libraries are no longer publicly available. But once I got what the library components was expected to do as well, it was actually relatively simple.

    You can simply download the latest php version here -: http://php.net/releases/index.php, extract it's content and insert it content below.

    The path looks like this for me /Applications/MAMP/bin/php/php5.5.3/include/php . I manually create the folder include, and then the extracted download content here in the php folder.

    After that ./configure worked, and then I just did pecl install uploadprogress. Add that extension to the relevant php.ini file (for the version) -: extensions=uploadprogress.so into your php.ini

    Cheers Pratik

    0 讨论(0)
  • 2021-01-05 10:13

    Got few tips from some existing posts related to this kind of issues. I found the component for php5.5.10 in http://us2.php.net/get/php-5.5.10.tar.gz/from/a/mirror

    Followed the steps below to install pecl_http on my MAMP on Mac OS 10.8:

    Install brew
    Install autoconf using brew brew install autoconf
    Download the source code for PHP 5.5.10 (or whatever version you are using) from php.net
    Extract the source code into /Applications/MAMP/bin/php/php5.5.10/include
    Rename the extracted file from "php-5.5.10" to "php"
    cd /Applications/MAMP/bin/php/php5.5.10/include/php
    Run ./configure
    Add extension=http.so to my php.ini file
    Restart MAMP
    

    All my extensions are installed.

    Special thanks to joshua.paling and user387049 for all the above information.

    0 讨论(0)
提交回复
热议问题