Having problems while try to install OAUTH with PECL in MAMP on mac OS lion

后端 未结 4 1788
别那么骄傲
别那么骄傲 2020-11-28 04:20

i am new to setting php servers, and i had go though other related post, seems like nobody have the same error as i have. I am using MAMP 2.0.2, and running PHP 5.3.6, and I

相关标签:
4条回答
  • 2020-11-28 04:54

    I had the same problem whilst trying to pecl install -f ssh2 with MAMP.

    Here's how I fixed it:

    1. MAMP doesn't provide the source code archive for PHP 5.4.10 so download it from php.net
    2. Extract the source code archive to /Applications/MAMP/bin/php/php5.4.10/include/php
    3. Run ./configure to configure the source code for your platform (without this step the pecl install will fail looking for a bunch of header files)
    4. Retry your pecl install

    (much thanks to Stephen's answer which is pretty much the same)

    0 讨论(0)
  • 2020-11-28 04:54

    PECL Modules are compiled modules, in order to install them, you need the PHP headers. You can found the headers on php.net/downloads.php make sure you download a version which match with your PHP version. Then you can follow this : Installing PHP OAuth in MAMP environment

    0 讨论(0)
  • 2020-11-28 05:10

    This is a complement to Stephen's answer and Greg's comment

    When compiling xdebug 2.3.2 for php 5.6.2 on OSX 10.10.2, I could not get rid of the

    'zend_config.h' file not found

    error until I added the following option to ./configure in the php folder:

    ./configure --without-iconv

    Credits to Cameron Browning

    0 讨论(0)
  • 2020-11-28 05:19

    I know this is old but I found this question while having a similar issue.

    MAMP doesn’t ship with a bunch of the PHP sources

    • Download MAMP components and configure
    • URL: http://www.mamp.info/en/downloads/index.html (i.e. MAMP_components_2.0.2.zip)
    • Unpack your MAMP_components_2.0.2.zip
    • Identify your php-5.x.x.tar.gz file (where 5.x.x is your version of PHP)
    • If you are using php > 5.4.10 then download the sources from http://php.net/releases as they are not in the MAMP components download (credit pulkitsinghal in comments)
    • Create directory for your PHP sources:

      mkdir -vp /Applications/MAMP/bin/php5/include

    • Untar php-5.x.x.tar.gz into /Applications/MAMP/bin/php/php5.*/include or /Applications/MAMP/bin/php5/ include:

      tar zxvf php-5.x.x.tar.gz -C /Applications/MAMP/bin/php/php5.?.??/include

    • Rename your php-5.x.x directory to php (without the version numbering):

      mv /Applications/MAMP/bin/php/php5.2.17/include/php-5.?.?? /Applications/ MAMP/bin/php/php5.2.17/include/php

    • Configure PHP sources (it’ll create necessary files i.e. zend_config.h, tsrm_config.h, etc.):

      cd /Applications/MAMP/bin/php/php5.?.??/include/php

      ./configure

    The process was for another fix but this resolved the issues with php.h not being found

    Credit to where I found the answers - :

    Thomas Hunter Blog

    Google Doc detailing process

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