• 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.

PHP 5.3.3 and 5.2.17

F

Funstar

Guest
Hey there,

I got Plesk 10.2 running on Debian 6 (x64) with PHP 5.3.3. Now I need to use PHP 5.2.17 for a single subdomain, cause it needs the old Zend Optimizer to run. Now I have no idea how to do this. PHP 5.2.17 has been installed to /usr/local/bin/php and linked to /usr/lib/cgi-bin/php52:

Code:
root@srv01:/usr/lib/cgi-bin# ./php52 -v
PHP 5.2.17 (cli) (built: Jun 10 2011 17:58:22)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
root@srv01:/usr/lib/cgi-bin# ./php -v
PHP Warning:  Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
PHP 5.3.3-7+squeeze1 with Suhosin-Patch (cgi-fcgi) (built: Mar 18 2011 20:10:03)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v4.0.7, Copyright (c) 2002-2011, by ionCube Ltd., and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
root@srv01:/usr/lib/cgi-bin#

Now I am stuck. Nothing I tried to write into the subdomains vhost.conf made it using PHP 5.2.17, always 5.3.3. Thanks for your help.
 
This is for installing a different php version. you need to change the mysql location in the config

Adjust php version to the wanted/needed.
Adjust php configuration to the wanted/needed.

Tested on centos 5
no warranties, help or questions answered.

PHP Install 5.3 Install
===========================
----------------------
cd /usr/local/src/
wget http://in3.php.net/get/php-5.3.1.tar.gz/from/us.php.net/mirror
tar xzvf php-5.3.1.tar.gz
cd php-5.3.1
./configure --enable-bcmath --enable-calendar --enable-exif --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-mbstring --enable-sockets --prefix=/usr/local/php53/ --with-freetype-dir=/usr --with-gd --with-gettext --with-mysql=/usr/local/mysql51 --with-mysql-sock=/var/lib/mysql51/mysql.sock --with-mysqli=/usr/local/mysql51/bin/mysql_config --with-openssl=/usr --with-openssl-dir=/usr --with-png-dir=/usr --with-sqlite=shared --with-xmlrpc --with-zlib --with-zlib-dir=/usr --with-config-file-path=/usr/local/etc/
make
make install

----------------------

Inorder to use PHP 5.3 in a domain, you need to add the following in the domain's corresponding configuration file under the virtualhost entry and restart the apache.

-----------
ScriptAlias /local-bin /usr/local/php53/bin
AddHandler application/x-httpd-php5 php
Action application/x-httpd-php5 /local-bin/php-cgi
-----------

regards
Jan
 
Simply adding a domain in plesk inerface will over-write you config in te vhost file!
webmgsrv will re-write all vhosts!
# AddHandler application/x-httpd-php5 php
Plesk is currently running on php 5.1!

I am curios if this is working!
 
plesk overwrites the http.include file

plesk does not overwrite the vhost.conf file, this is intented to enter domain-specific apache config.

I have no doubt that you understood that you dont ad php to the domain trough plesk and that in your readings of the knowledgebase you came across this artikel

http://kb.odin.com/en/5464

regards
Jan
 
Back
Top