Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated with missing modules and required libraries

More testing and debugging output added to deploy functions
  • Loading branch information...
commit c9d8f6ad0278f6ab657f5808ec80681c87c0c9a6 1 parent 842a4fc
Tom Burton authored
View
2  Makefile
@@ -4,7 +4,7 @@ publish_bucket = cloudbees-clickstack
publish_repo = testing
publish_url = s3://$(publish_bucket)/$(publish_repo)/
-pkg_files = README.md LICENSE setup functions lib php/lib conf control \
+pkg_files = README.md LICENSE setup functions lib php/lib conf control modules \
php/php-setup php/conf php/control php/php-functions
include plugin.mk
View
18 conf/symfony-php.ini
@@ -36,7 +36,8 @@ disable_functions = php_uname, getmyuid, getmypid, passthru, leak, listen,
phpinfo
register_globals = Off
-allow_url_fopen = Off
+;allow_url_fopen = Off <-- old Default, Light OpenId requires it to be on
+allow_url_fopen = On
allow_url_include = Off
session.cookie_httponly = 1
expose_php = Off
@@ -64,21 +65,22 @@ extension = uploadprogress.so
; Stack inserts go here
; Additional Extensions for Symfony & my initial Symfony Application
-extension=php_curl.so
+extension=curl.so
extension=php_fileinfo.so
-extension=php_gmp.so
+extension=gmp.so
extension=php_intl.so
-extension=php_mbstring.so
-extension=php_openssl.so
-extension=php_pdo_mysql.so
+extension=mbstring.so
+extension=openssl.so
+extension=pdo_mysql.so
;extension=php_pdo_oci.so
;extension=php_pdo_odbc.so
;extension=php_pdo_pgsql.so
extension=php_pdo_sqlite.so
+extension=zip.so
+extension=soap.so
-extension=php_soap.dll
+;TODO: can this be moved applications that need it and appended here on app deploy?
-;TODO: can I move this to SymfonyResume and append it here on app deploy?
;SOAP - required for PHP LiveDocX used by my Resume Template Site.
[soap]
; Enables or disables WSDL caching feature.
View
7 conf/symfony.site.conf
@@ -13,15 +13,14 @@ Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
-# Make Drupal handle any 404 errors.
+# Make Symfony handle any 404 errors.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php index.html index.htm
-# Override PHP settings that cannot be changed at runtime. See
-# sites/default/default.settings.php and drupal_environment_initialize() in
-# includes/bootstrap.inc for settings that can be changed at runtime.
+# Override PHP settings that cannot be changed at runtime.
+# See sites/default/default.settings.php for settings that can be changed at runtime.
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
View
85 functions
@@ -7,11 +7,31 @@ config_symfony()
# echo "Configuring Symfony"
# mkdir -m 700 "$app_dir/.drushini"
# install -m 600 "$plugin_dir/conf/drush.ini" "$app_dir/.drushini/php.ini"
-# sed -i "2iapp_dir = $app_dir" "$app_dir/.drushini/php.ini"
+# sed -i "$app_dir = $app_dir" "$app_dir/.drushini/php.ini"
# install -m 550 "$plugin_dir/control/start-php.sh" "$control_dir/start-php.sh"
cp "$plugin_dir/lib/libpng15.so.15" "$app_dir/lib/"
- cp "$plugin_dir/lib/libjpeg.so.62" "$app_dir/lib/"
+ cp "$plugin_dir/lib/libjpeg.so.62" "$app_dir/lib/"
+
+ cp "$plugin_dir/modules/curl.a" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/curl.la" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/curl.so" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/gmp.a" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/gmp.la" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/gmp.so" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/mbstring.a" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/mbstring.la" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/mbstring.so" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/openssl.a" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/openssl.la" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/openssl.so" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/pdo_mysql.a" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/pdo_mysql.la" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/pdo_mysql.so" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/zip.so" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/soap.a" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/soap.la" "$app_dir/lib/php/modules/"
+ cp "$plugin_dir/modules/soap.so" "$app_dir/lib/php/modules/"
}
install_symfony()
@@ -42,6 +62,7 @@ install_symfony()
sed -i 's%${account}%'"$app_user"'%g' "$app_dir/conf/php.ini"
sed -i 's%${log_dir}%'"$log_dir"'%g' "$app_dir/conf/php.ini"
sed -i 's%${pkg_dir}%'"$pkg_dir"'%g' "$app_dir/conf/php.ini"
+ #sed -i 's%${app_dir}%'"$pkg_dir"'%g' "$app_dir/conf/php.ini"
#sed -i 's%${max_post}%'"$max_post"'%g' "$app_dir/conf/php.ini"
#sed -i 's%${default_basedir}%'"$default_basedir"'%g' "$app_dir/conf/php.ini"
@@ -52,6 +73,7 @@ install_symfony()
echo "Rewriting permissions post-install"
chmod -R g-w,o-rwx "$app_dir/app"
chmod -R g-w,o-rwx "$pkg_dir/app"
+ chmod -R g-w,o-rwx "$pkg_dir/web"
echo "app dir"
ls -l $app_dir
@@ -59,38 +81,19 @@ install_symfony()
ls -l $pkg_dir
echo "app/lib"
ls -l $app_dir/lib
+ echo "Available PHP modules"
+ ls -l "${app_dir}/lib/php/modules"
-
- chmod -R g-w,o-rwx "$pkg_dir/web"
-
- echo "updating permissions ACLS"
+ echo "ensuring necessary directorys get created"
rm -rf "$pkg_dir/app/logs/"
- mkdir "$pkg_dir/app/logs/"
+ mkdir "$pkg_dir/app/logs/"
rm -rf "$pkg_dir/app/cache/"
- mkdir "$pkg_dir/app/cache/"
+ mkdir "$pkg_dir/app/cache/"
- setfacl -R -m u:"$app_user":rwX "$pkg_dir/app/cache" "$pkg_dir/app/logs"
+ echo "updating permissions ACLS"
+ setfacl -R -m u:"$app_user":rwX "$pkg_dir/app/cache" "$pkg_dir/app/logs"
setfacl -dR -m u:"$app_user":rwX "$pkg_dir/app/cache" "$pkg_dir/app/logs"
- #TODO: verify the loop will change the necessary perms.
-
- #for _dir in \
- #Symfony Symfony/app Symfony/app/cache Symfony/app/cache/prod Symfony/app/cache/dev Symfony/app/logs Symfony/src/* Symfony/web/*
- #do
- # if [ -e "$_dir" ]; then
- # chmod -R g+w "$_dir"
- # fi
- #done
-
- #chmod g+w `find . -type d`
-
- #chmod -R g+w app/cache
- #chmod -R g+w app/logs
-
- #cd "$_curdir"
-
- #unzip $app_dir/php/lib/php.zip
-
echo "Adding Libraries"
LD_LIBRARY_PATH=$app_dir/lib/:/usr/local/lib/:/usr/lib/
PATH=\$PATH:\$LD_LIBRARY_PATH
@@ -99,16 +102,34 @@ install_symfony()
export LD_LIBRARY_PATH=$app_dir/lib/:\$LD_LIBRARY_PATH
#export PATH=\$PATH:\$LD_LIBRARY_PATH
echo "-----------------------------------------"
+ #echo "PHP.ini"
+ #echo "-----------------------------------------"
+ #/usr/bin/cat "$app_dir/conf/php.ini"
+ #echo "-----------------------------------------"
+ #echo "PHP phpinfo();"
+ #echo "-----------------------------------------"
+ $app_dir/lib/php/bin/php -c "$app_dir/conf/php.ini" -i
echo "Before check.php"
- #$app_dir/lib/php/bin/php -c "$app_dir/conf/php.ini" $pkg_dir/app/check.php
+ echo "-----------------------------------------"
+ $app_dir/lib/php/bin/php -c "$app_dir/conf/php.ini" $pkg_dir/app/check.php
+ echo "-----------------------------------------"
echo "After check.php"
+ echo "-----------------------------------------"
+
+ echo "Before checking for successful Zip install"
+ echo "-----------------------------------------"
+ $app_dir/lib/php/bin/php -c "$app_dir/conf/php.ini" -r "new ZipArchive();"
+ echo "-----------------------------------------"
+
+ #uncomment to force an error and check all this output
+ #LD_LIBRARY_PATH=""
echo "Symfony deploy tasks"
pushd $pkg_dir
- $app_dir/lib/php/bin/php app/console cache:clear --env=prod --no-debug
- $app_dir/lib/php/bin/php app/console assetic:dump --env=prod --no-debug
+ $app_dir/lib/php/bin/php -c "$app_dir/conf/php.ini" app/console cache:clear --env=prod --no-debug --quiet
+ $app_dir/lib/php/bin/php -c "$app_dir/conf/php.ini" app/console assetic:dump --env=prod --no-debug --quiet
- $app_dir/lib/php/bin/php app/console assets:install --env=prod --no-debug
+ $app_dir/lib/php/bin/php -c "$app_dir/conf/php.ini" app/console assets:install --env=prod --no-debug --quiet
popd
}
View
BIN  lib/libjpeg.so.62
Binary file not shown
View
BIN  lib/libpng15.so.15
Binary file not shown
View
BIN  lib/zlib.zip
Binary file not shown
View
BIN  modules/curl.a
Binary file not shown
View
35 modules/curl.la
@@ -0,0 +1,35 @@
+# curl.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='curl.so'
+
+# Names of this library.
+library_names='curl.so curl.so curl.so'
+
+# The name of the static archive.
+old_library='curl.a'
+
+# Libraries that this one depends upon.
+dependency_libs=' -lcurl -lcurl -L/usr/local/lib -lcurl -lcurl'
+
+# Version information for curl.
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=yes
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/root/downloads/php-5.4.24/modules'
View
BIN  modules/curl.so
Binary file not shown
View
BIN  modules/gmp.a
Binary file not shown
View
35 modules/gmp.la
@@ -0,0 +1,35 @@
+# gmp.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='gmp.so'
+
+# Names of this library.
+library_names='gmp.so gmp.so gmp.so'
+
+# The name of the static archive.
+old_library='gmp.a'
+
+# Libraries that this one depends upon.
+dependency_libs=' -L/usr/local/lib -lgmp'
+
+# Version information for gmp.
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=yes
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/root/downloads/php-5.4.24/modules'
View
BIN  modules/gmp.so
Binary file not shown
View
BIN  modules/mbstring.a
Binary file not shown
View
35 modules/mbstring.la
@@ -0,0 +1,35 @@
+# mbstring.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='mbstring.so'
+
+# Names of this library.
+library_names='mbstring.so mbstring.so mbstring.so'
+
+# The name of the static archive.
+old_library='mbstring.a'
+
+# Libraries that this one depends upon.
+dependency_libs=' -L/usr/local/lib'
+
+# Version information for mbstring.
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=yes
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/root/downloads/php-5.4.24/modules'
View
BIN  modules/mbstring.so
Binary file not shown
View
BIN  modules/openssl.a
Binary file not shown
View
35 modules/openssl.la
@@ -0,0 +1,35 @@
+# openssl.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='openssl.so'
+
+# Names of this library.
+library_names='openssl.so openssl.so openssl.so'
+
+# The name of the static archive.
+old_library='openssl.a'
+
+# Libraries that this one depends upon.
+dependency_libs=' -lcrypto -lcrypto -L/usr/local/lib -lcrypto -lssl -lcrypto'
+
+# Version information for openssl.
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=yes
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/root/downloads/php-5.4.24/modules'
View
BIN  modules/openssl.so
Binary file not shown
View
BIN  modules/pdo_mysql.a
Binary file not shown
View
35 modules/pdo_mysql.la
@@ -0,0 +1,35 @@
+# pdo_mysql.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='pdo_mysql.so'
+
+# Names of this library.
+library_names='pdo_mysql.so pdo_mysql.so pdo_mysql.so'
+
+# The name of the static archive.
+old_library='pdo_mysql.a'
+
+# Libraries that this one depends upon.
+dependency_libs=' -L/usr/local/lib'
+
+# Version information for pdo_mysql.
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=yes
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/root/downloads/php-5.4.24/modules'
View
BIN  modules/pdo_mysql.so
Binary file not shown
View
BIN  modules/soap.a
Binary file not shown
View
35 modules/soap.la
@@ -0,0 +1,35 @@
+# soap.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='soap.so'
+
+# Names of this library.
+library_names='soap.so soap.so soap.so'
+
+# The name of the static archive.
+old_library='soap.a'
+
+# Libraries that this one depends upon.
+dependency_libs=' -L/usr/local/lib -lxml2 -lz -lm -ldl'
+
+# Version information for soap.
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=yes
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/root/downloads/php-5.4.24/modules'
View
BIN  modules/soap.so
Binary file not shown
View
BIN  modules/zip.so
Binary file not shown
View
1  setup
@@ -10,6 +10,7 @@ set -e
. "$plugin_dir/php-setup"
# Installs symfony-specific content
+install_libs "zlib"
config_symfony
install_symfony
Please sign in to comment.
Something went wrong with that request. Please try again.