• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

How to install php 5.2 in plesk

Status
Not open for further replies.

LuckyH

New Pleskian
Hello kindly send me the easy way to install 5.2 with plesk i try all old threads but these not working :(

Please help me.
 
Problem solved i use this code

# FROM: http://forum.parallels.com/showthre...nstall-Script-for-Multiple-PHP-CentOS-6-4-x64

yum -y install gcc make gcc-c++ cpp kernel-headers.x86_64 libxml2-devel openssl-devel bzip2-devel libjpeg-devel libpng-devel freetype-devel openldap-devel postgresql-devel aspell-devel net-snmp-devel libxslt-devel libc-client-devel libicu-devel gmp-devel curl-devel libmcrypt-devel unixODBC-devel pcre-devel sqlite-devel db4-devel enchant-devel libXpm-devel mysql-devel readline-devel libedit-devel recode-devel libtidy-devel

phpconfigureflagscommon="--with-libdir=lib64 --cache-file=./config.cache --prefix=/usr/local/php-\$phpversion-\$phptype --with-config-file-path=/usr/local/php-\$phpversion-\$phptype/etc --disable-debug --with-pic --disable-rpath --with-bz2 --with-curl --with-freetype-dir=/usr/local/php-\$phpversion-\$phptype --with-png-dir=/usr/local/php-\$phpversion-\$phptype --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr/local/php-\$phpversion-\$phptype --with-openssl --with-pspell --with-pcre-regex --with-zlib --enable-exif --enable-ftp --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-kerberos --with-unixODBC=/usr --enable-shmop --enable-calendar --with-libxml-dir=/usr/local/php-\$phpversion-\$phptype --enable-pcntl --with-imap --with-imap-ssl --enable-mbstring --enable-mbregex --with-gd --enable-bcmath --with-xmlrpc --with-ldap --with-ldap-sasl --with-mysql=/usr --with-mysqli --with-snmp --enable-soap --with-xsl --enable-xmlreader --enable-xmlwriter --enable-pdo --with-pdo-mysql --with-pdo-pgsql --with-pear=/usr/local/php-\$phpversion-\$phptype/pear --with-mcrypt --without-pdo-sqlite --without-pdo_sqlite --with-config-file-scan-dir=/usr/local/php-\$phpversion-\$phptype/php.d"


declare -A phpconfigureflagsspecific
phpconfigureflagsspecific[5.2.17-cgi]="--enable-fastcgi"
phpconfigureflagsspecific[5.3.27-cgi]="--without-sqlite3 --enable-intl"
phpconfigureflagsspecific[5.4.25-cgi]="--without-sqlite3 --without-pdo_sqlite3 --enable-intl"
phpconfigureflagsspecific[5.5.9-cgi]="--without-sqlite3 --without-pdo_sqlite3 --enable-intl"
phpconfigureflagsspecific[5.3.27-fpm]="--enable-fpm --without-sqlite3 --enable-intl"
phpconfigureflagsspecific[5.4.25-fpm]="--enable-fpm --without-sqlite3 --without-pdo_sqlite3 --enable-intl"
phpconfigureflagsspecific[5.5.9-fpm]="--enable-fpm --without-sqlite3 --without-pdo_sqlite3 --enable-intl"
declare -A phpdownloadurl
phpdownloadurl[5.2.17-cgi]="http://museum.php.net/php5/php-5.2.17.tar.gz"
phpdownloadurl[5.3.27-cgi]="http://be2.php.net/get/php-5.3.27.tar.gz/from/this/mirror"
phpdownloadurl[5.4.25-cgi]="http://ie2.php.net/get/php-5.4.25.tar.gz/from/this/mirror"
phpdownloadurl[5.5.9-cgi]="http://ie2.php.net/get/php-5.5.9.tar.gz/from/this/mirror"
phpdownloadurl[5.3.27-fpm]="${phpdownloadurl[5.3.27-cgi]}"
phpdownloadurl[5.4.25-fpm]="${phpdownloadurl[5.4.25-cgi]}"
phpdownloadurl[5.5.9-fpm]="${phpdownloadurl[5.5.9-cgi]}"


install_php () {
cd /usr/local/src/
phpversion=$1
phptype=$2
[[ -z "$2" ]] && echo "Usage: install_php phpversion phptype" && return 1
wget ${phpdownloadurl[$phpversion-$phptype]} -O /usr/local/src/php-$phpversion-$phptype.tar.gz
mkdir /usr/local/src/php-$phpversion-$phptype/
tar xzvf /usr/local/src/php-$phpversion-$phptype.tar.gz -C /usr/local/src/php-$phpversion-$phptype/ --strip 1
cd /usr/local/src/php-$phpversion-$phptype/
eval ./configure $phpconfigureflagscommon ${phpconfigureflagsspecific[$phpversion-$phptype]}
make -j $(grep processor /proc/cpuinfo | wc -l)
[ ! -d "/usr/local/php-$phpversion-$phptype/" ] && make install
# These ifs need a rewrite, CentOS 5.9 still ships PHP 5.2.10 as default and so /etc/php.ini will not work for PHP 5.3+ #
if [ "$phpversion" == "5.2.17" ]
then
cp /usr/local/src/php-$phpversion-$phptype/php.ini-recommended /usr/local/php-$phpversion-$phptype/etc/php.ini
sed -i "s#;date.timezone =#date.timezone = $timezone#" /usr/local/php-$phpversion-$phptype/etc/php.ini
else
cp -a /etc/php.ini /usr/local/php-$phpversion-$phptype/etc/php.ini
fi
[ "$phptype" == "cgi" ] && /usr/local/psa/bin/php_handler --add -displayname "$phpversion" -path "/usr/local/php-$phpversion-$phptype/bin/php-cgi" -phpini "/usr/local/php-$phpversion-$phptype/etc/php.ini" -type fastcgi -id "fastcgi-$phpversion"
[ "$phptype" == "fpm" ] && /usr/local/psa/bin/php_handler --add -displayname "$phpversion-$phptype" -path "/usr/local/php-$phpversion-$phptype/bin/php-cgi" -phpini "/usr/local/php-$phpversion-$phptype/etc/php.ini" -type fastcgi -id "fpm-$phpversion"
}


install_php 5.2.17 cgi
install_php 5.3.27 cgi
install_php 5.4.25 cgi
install_php 5.5.9 cgi

Source
https://gist.github.com/davidbehan/9061023
 
Status
Not open for further replies.
Back
Top