diff --git a/bin/compile b/bin/compile index 2ce1e0368..fedc09aa3 100755 --- a/bin/compile +++ b/bin/compile @@ -5,9 +5,9 @@ set -e # config -APACHE_VERSION="2.2.19" +APACHE_VERSION="2.2.22" APACHE_PATH="apache" -PHP_VERSION="5.3.6" +PHP_VERSION="5.3.10" PHP_PATH="php" EXT_PATH="extensions" REDIS_EXT="$EXT_PATH/redis.so" @@ -32,35 +32,19 @@ if [ -f www/Procfile ]; then mv www/Procfile . fi -# unpack cache -for DIR in $APACHE_PATH $PHP_PATH ; do - rm -rf $DIR - if [ -d $CACHE_DIR/$DIR ]; then - cp -r $CACHE_DIR/$DIR $DIR - fi -done +APACHE_URL="https://s3.amazonaws.com/php-lp/apache-$APACHE_VERSION.tar.gz" +echo "-----> Bundling Apache version $APACHE_VERSION" +curl --silent --max-time 60 --location "$APACHE_URL" | tar xz -# install apache if needed -if [ ! -d $APACHE_PATH ]; then - APACHE_URL="https://s3.amazonaws.com/php-lp/apache-$APACHE_VERSION.tar.gz" - echo "-----> Bundling Apache v$APACHE_VERSION" - curl --silent --max-time 60 --location $APACHE_URL | tar xz -fi +PHP_URL="https://s3.amazonaws.com/php-lp/php-$PHP_VERSION.tar.gz" +echo "-----> Bundling PHP version $PHP_VERSION" +curl --silent --max-time 60 --location "$PHP_URL" | tar xz -# install php if needed -if [ ! -d $PHP_PATH ]; then - PHP_URL="https://s3.amazonaws.com/php-lp/php-$PHP_VERSION.tar.gz" - echo "-----> Bundling PHP v$PHP_VERSION" - curl --silent --max-time 60 --location $PHP_URL | tar xz -fi -# install redis if needed -if [ ! -f $REDIS_EXT ]; then - mkdir -p $(dirname $REDIS_EXT) - REDIS_EXT_URL="https://s3.amazonaws.com/rbrainard-public/redis.so" - echo "-----> Bundling Redis extension" - curl --silent --max-time 60 --location $REDIS_EXT_URL > $REDIS_EXT -fi +mkdir -p $(dirname $REDIS_EXT) +REDIS_EXT_URL="https://s3.amazonaws.com/rbrainard-public/redis.so" +echo "-----> Bundling Redis extension" +curl --silent --max-time 60 --location $REDIS_EXT_URL > $REDIS_EXT # update config files cp $LP_DIR/conf/httpd.conf $APACHE_PATH/conf @@ -71,7 +55,6 @@ mkdir -p bin ln -s /app/php/bin/php bin/php cat >>boot.sh <> /app/apache/conf/httpd.conf; done @@ -87,9 +70,5 @@ EOF chmod +x boot.sh -# repack cache -mkdir -p $CACHE_DIR -for DIR in $APACHE_PATH $PHP_PATH ; do - rm -rf $CACHE_DIR/$DIR - cp -R $DIR $CACHE_DIR/$DIR -done +# clean the cache +rm -rf $CACHE_DIR/* diff --git a/conf/httpd.conf b/conf/httpd.conf index c586e08a1..ccdc144c0 100644 --- a/conf/httpd.conf +++ b/conf/httpd.conf @@ -37,7 +37,7 @@ ServerRoot "/app/apache/" # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 -Listen 80 +Listen ${PORT} ServerLimit 1 MaxClients 1 diff --git a/conf/php.ini b/conf/php.ini index 5eb313edd..7255cad43 100644 --- a/conf/php.ini +++ b/conf/php.ini @@ -528,7 +528,7 @@ error_reporting = E_ALL & ~E_NOTICE ; Development Value: On ; Production Value: Off ; http://php.net/display-errors -display_errors = On +display_errors = Off ; The display of errors which occur during PHP's startup sequence are handled ; separately from display_errors. PHP's default behavior is to suppress those @@ -946,6 +946,7 @@ default_socket_timeout = 60 ; extension=soap.so extension=/app/extensions/redis.so +extension=apc.so ;extension=php_bz2.dll ;extension=php_curl.dll ;extension=php_fileinfo.dll @@ -995,7 +996,7 @@ extension=/app/extensions/redis.so [Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone -;date.timezone = +date.timezone = UTC ; http://php.net/date.default-latitude ;date.default_latitude = 31.7667