php.sh 1.0 KB

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. # TODO double check this, it's logically different from original php code.
  3. # Two path checks would both always run in php. In this code the check
  4. # for apc.so only happens if the check for php fails. Is that ok?
  5. RETCODE=$(fw_exists /usr/local/bin/php)
  6. [ ! "$RETCODE" == 0 ] || { \
  7. echo "Moving PHP config files into place";
  8. sudo cp $FWROOT/config/php.ini /usr/local/lib/php.ini
  9. sudo cp $FWROOT/config/php-fpm.conf /usr/local/lib/php-fpm.conf
  10. return 0; }
  11. fw_get http://museum.php.net/php5/php-5.4.13.tar.gz
  12. fw_untar php-5.4.13.tar.gz
  13. cd php-5.4.13
  14. ./configure --with-pdo-mysql --with-mysql --with-mcrypt --enable-intl --enable-mbstring --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --with-openssl
  15. make
  16. sudo make install
  17. cd ..
  18. sudo cp $FWROOT/config/php.ini /usr/local/lib/php.ini
  19. sudo cp $FWROOT/config/php-fpm.conf /usr/local/lib/php-fpm.conf
  20. RETCODE=$(fw_exists /usr/local/lib/php/extensions/no-debug-non-zts-20100525/apc.so)
  21. [ ! "$RETCODE" == 0 ] || { return 0; }
  22. cd php-5.4.13
  23. printf "\n" | sudo pecl install apc-beta