diff --git a/src/modules/stack/install/ee_mod_setup_php.sh b/src/modules/stack/install/ee_mod_setup_php.sh index 59c643e5..f44720d9 100644 --- a/src/modules/stack/install/ee_mod_setup_php.sh +++ b/src/modules/stack/install/ee_mod_setup_php.sh @@ -79,5 +79,11 @@ function ee_mod_setup_php() # Setup PHP Memcache as per RAM sed -i "s/-m.*/-m ${EE_MEMCACHE_SIZE}/" /etc/memcached.conf \ || ee_lib_error "Unable to change Memcache memory value, exit status = " $? + + # Resolve php session Error Ref: #302 + chmod a+t+w /var/lib/php5 && + chmod go-r /var/lib/php5 \ + || ee_lib_error "Unable to setup PHP session error permissions, exit status = " $? + fi } diff --git a/src/vendor/ee_ven_install_phpmyadmin.sh b/src/vendor/ee_ven_install_phpmyadmin.sh index 64cd4bac..60d66b3f 100644 --- a/src/vendor/ee_ven_install_phpmyadmin.sh +++ b/src/vendor/ee_ven_install_phpmyadmin.sh @@ -4,7 +4,9 @@ function ee_ven_install_phpmyadmin() { if [ ! -d /var/www/22222/htdocs/db/pma ]; then - # Setup phpMyAdmin + local ee_random=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 7 | head -n1) + + # Setup phpMyAdmin directory mkdir -p /var/www/22222/htdocs/db/pma/ \ || ee_lib_error "Unable to create phpMyAdmin directory: /var/www/22222/htdocs/db/pma/, exit status = " $? @@ -20,5 +22,12 @@ function ee_ven_install_phpmyadmin() # Remove unwanted files rm -f /var/www/22222/htdocs/db/pma/pma.tar.gz + # Setup phpMyAdmin + cp -v /var/www/22222/htdocs/db/pma/config.sample.inc.php /var/www/22222/htdocs/db/pma/config.inc.php &>> $EE_COMMAND LOG \ + || ee_lib_error "Unable to setup phpMyAdmin, exit status = " $? + + sed -i "s/a8b7c6d/$ee_random/" /var/www/22222/htdocs/db/pma/config.inc.php \ + || ee_lib_error "Unable to setup phpMyAdmin, exit status = " $? + fi }