1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

PHP 5.3.3 and 5.2.17

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by Funstar, Jun 11, 2011.

  1. Funstar

    Funstar Guest

    0
     
    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.
     
  2. GravuTrad

    GravuTrad Regular Pleskian

    28
    23%
    Joined:
    Apr 28, 2006
    Messages:
    269
    Likes Received:
    0
    Interesting question. No answer?
     
  3. Linulex

    Linulex Regular Pleskian

    33
    80%
    Joined:
    Aug 4, 2001
    Messages:
    426
    Likes Received:
    61
    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
     
  4. badrd

    badrd Guest

    0
     
    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!
     
  5. Linulex

    Linulex Regular Pleskian

    33
    80%
    Joined:
    Aug 4, 2001
    Messages:
    426
    Likes Received:
    61
    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
     
  6. Mark Muyskens

    Mark Muyskens New Pleskian

    20
     
    Joined:
    Mar 17, 2010
    Messages:
    21
    Likes Received:
    0
    Couldn't you change the handler with an .htaccess?
     
  7. Linulex

    Linulex Regular Pleskian

    33
    80%
    Joined:
    Aug 4, 2001
    Messages:
    426
    Likes Received:
    61
Loading...