Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 11 commits
  • 3 files changed
  • 1 commit comment
  • 1 contributor
Showing with 14 additions and 32 deletions.
  1. +10 −29 bin/compile
  2. +1 −1 conf/httpd.conf
  3. +3 −2 conf/php.ini
View
39 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"
BIN_DIR=$(dirname $0)
@@ -30,27 +30,13 @@ 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
-
-# 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
+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 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
+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
# update config files
cp $LP_DIR/conf/httpd.conf $APACHE_PATH/conf
@@ -61,7 +47,6 @@ mkdir -p bin
ln -s /app/php/bin/php bin/php
cat >>boot.sh <<EOF
-sed -i 's/Listen 80/Listen '\$PORT'/' /app/apache/conf/httpd.conf
for var in \`env|cut -f1 -d=\`; do
echo "PassEnv \$var" >> /app/apache/conf/httpd.conf;
done
@@ -77,9 +62,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/*
View
2 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
View
5 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
@@ -945,6 +945,7 @@ default_socket_timeout = 60
; Be sure to appropriately set the extension_dir directive.
;
extension=soap.so
+extension=apc.so
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_fileinfo.dll
@@ -994,7 +995,7 @@ extension=soap.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

Showing you all comments on commits in this comparison.

@dinhkhanh

Hi there,
Could you give me detailed instruction?
I'm newbie and really need your help now?
How can I use this buildpack?

Something went wrong with that request. Please try again.