RVM equivalent for PHP?

前端 未结 7 2056
逝去的感伤
逝去的感伤 2021-01-30 10:07

I can\'t seem to find a way to switch versions of PHP quickly. Is there something equivalent to ruby version manager for php? I need to switch between 5.3 and 5.2 on OS X.

7条回答
  •  情书的邮戳
    2021-01-30 11:04

    If you are not use php-cgi and Install different versions of PHP to different locations

    1. Find different version libphp5.so,and copy into the different location

    2. If use php5.3.11 or php5.4.11

       ln -s php5.3.11 php  || ln -s php5.4.11
      
    3. Depoly your apache httpd.conf

       LoadModule php5_module        YOUR_PHP_PATH/php/libphp5.so
      
    4. restart apache

       sudo apachectl restart
      

提交回复
热议问题