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

后端 未结 4 1818
别那么骄傲
别那么骄傲 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 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

提交回复
热议问题