diff --git a/mod_php_install.sh b/mod_php_install.sh index 1e76fb4..8b7eb5f 100755 --- a/mod_php_install.sh +++ b/mod_php_install.sh @@ -2,12 +2,12 @@ # php ( fuer Apache 2 ) # -_VERSION=7.1.6 +_VERSION= #WITHOUT_APACHE_MOD_PHP=true _APACHE_MOD_PHP=no -_APACHE_VERSION=2.4.25 +_APACHE_VERSION= _HTTPD_USER=www-data @@ -1105,14 +1105,27 @@ if [ "$MYSQL_INSTALL_DIR" != "not_installed" ]; then if [ -f "/etc/mysql/my.cnf" ]; then _mysql_socket="`cat /etc/mysql/my.cnf | grep -E \"^\s*socket\" | head -1 | awk '{print$3}'`" if [ -S "$_mysql_socket" ]; then - config_params="$config_params \ + if [[ "$MAJOR_VERSION" = "5.4" ]]; then + config_params="$config_params \ + --with-mysql \ + --with-pdo-mysql \ + --with-mysql-sock" + else + config_params="$config_params \ --with-mysqli \ --with-pdo-mysql \ --with-mysql-sock" + fi else - config_params="$config_params \ + if [[ "$MAJOR_VERSION" = "5.4" ]]; then + config_params="$config_params \ + --with-mysql \ + --with-pdo-mysql " + else + config_params="$config_params \ --with-mysqli \ --with-pdo-mysql " + fi fi else ## - since version 7.0: unrecognized options --with-mysql @@ -1121,9 +1134,15 @@ if [ "$MYSQL_INSTALL_DIR" != "not_installed" ]; then config_params="$config_params \ --with-mysql" fi - config_params="$config_params \ + + if [[ "$MAJOR_VERSION" = "5.4" ]]; then + config_params="$config_params \ + --with-pdo-mysql " + else + config_params="$config_params \ --with-mysqli \ --with-pdo-mysql " + fi fi else ## - since version 7.0: unrecognized options --with-mysql @@ -1132,10 +1151,17 @@ if [ "$MYSQL_INSTALL_DIR" != "not_installed" ]; then config_params="$config_params \ --with-mysql=$MYSQL_INSTALL_DIR" fi - config_params="$config_params \ + + if [[ "$MAJOR_VERSION" = "5.4" ]]; then + config_params="$config_params \ + --with-pdo-mysql=$MYSQL_INSTALL_DIR \ + --with-mysql-sock" + else + config_params="$config_params \ --with-mysqli=${MYSQL_INSTALL_DIR}/bin/mysql_config \ --with-pdo-mysql=$MYSQL_INSTALL_DIR \ --with-mysql-sock" + fi fi fi @@ -2485,7 +2511,11 @@ else fi echononl "\tInstall Net_Socket via pear.." -${PREFIX_PHP}/bin/pear install Net_Socket > /dev/null 2>&1 +if [[ "$MAJOR_VERSION" = "5.4" ]]; then + ${PREFIX_PHP}/bin/pear install Net_Socket-1.0.14 > /dev/null 2>&1 +else + ${PREFIX_PHP}/bin/pear install Net_Socket > /dev/null 2>&1 +fi if [ "$?" = "0" ]; then echo_ok else @@ -2493,7 +2523,11 @@ else fi echononl "\tInstall Net_SMTP via pear.." -${PREFIX_PHP}/bin/pear install Net_SMTP > /dev/null 2>&1 +if [[ "$MAJOR_VERSION" = "5.4" ]]; then + ${PREFIX_PHP}/bin/pear install Net_SMTP-1.7.2 > /dev/null 2>&1 +else + ${PREFIX_PHP}/bin/pear install Net_SMTP > /dev/null 2>&1 +fi if [ "$?" = "0" ]; then echo_ok else @@ -2501,7 +2535,11 @@ else fi echononl "\tInstall Net_Sieve via pear.." -${PREFIX_PHP}/bin/pear install Net_Sieve > /dev/null 2>&1 +if [[ "$MAJOR_VERSION" = "5.4" ]]; then + ${PREFIX_PHP}/bin/pear install Net_Sieve-1.4.1 > /dev/null 2>&1 +else + ${PREFIX_PHP}/bin/pear install Net_Sieve > /dev/null 2>&1 +fi if [ "$?" = "0" ]; then echo_ok else @@ -2532,7 +2570,11 @@ else fi echononl "\tInstall Auth_SASL via pear.." -${PREFIX_PHP}/bin/pear install Auth_SASL > /dev/null 2>&1 +if [[ "$MAJOR_VERSION" = "5.4" ]]; then + ${PREFIX_PHP}/bin/pear install Auth_SASL-1.0.6 > /dev/null 2>&1 +else + ${PREFIX_PHP}/bin/pear install Auth_SASL > /dev/null 2>&1 +fi if [ "$?" = "0" ]; then echo_ok else