Results 1 to 8 of 8
  1. #1

    Running Multiple versions of PHP?

    Does anyone know how I can allow customers on a WHM server to run a php version of their choice.

    For example some prefer v5.2.16 and others v5.3.x

    So, can I allow people to have a different versions depending on their preference?
    Last edited by kshazad86; 02-14-2011 at 07:48 AM.

  2. #2
    Join Date
    Apr 2009
    Location
    whitehouse
    Posts
    656
    Compile php cgi for both the version and add the following in .htacess for individual users.

    AddHandler php-script .php
    Action php-script /usr/bin/php5.2
    or
    Action php-script /usr/bin/php5.3
    James B
    EzeeloginSetup your Secure Linux SSH Gateway.
    |Manage & Administer Multiple Linux Servers Quickly & Securely.

  3. #3
    Thanks man,

    the server is currently running v5.6.12 and was installed via EasyApache.

    Can you guide me on how I can install v5.3.4 so that I don't mess up the earlier version?

  4. #4
    You need manyally compile v5.3.4 and manyally enable php-cgi file in some Virtualhosts.

    For example create /usr/php53
    Fetch php source from http://php.net/ and extract
    ./configure --prefix=/usr/php53
    make
    make install

    And after you will have php-cgi executable file in /usr/php53/bin/php-cgi

    Use it for some sites in you httpd.conf

  5. #5
    Ok, Ive now installed v5.3.5 from source like you said, and the install went through fine but I got a message saying:

    "Warning! a PEAR user config file already exists from a previous PEAR installation at '/root/.pearrc'. You may probably want to remove it."

    Is this something I should be worried about?

    Also, you mentioned changing the httpd.conf file, but what do I change?

    I thought I was supposed to change the .htaccess file for each user, or do I have to do both?

  6. #6
    Anybody????

  7. #7
    Do not worry about PEAR.

    You need crete link with php to your site

    ln /usr/php53/bin/php-cgi ~/site.com/cgi/php-cgi

    And .htaccess for site must be

    AddHandler php-cgi .php5 .php
    Action php-cgi /cgi-bin/php-cgi

  8. #8
    When I place the .htaccess file in the root folder or the public_html folder, I get an internal server error message when I try to access phpinfo page, and an additional 404 error message.

Similar Threads

  1. Multiple PHP 5+ versions
    By FLCLFan in forum Hosting Security and Technology
    Replies: 3
    Last Post: 03-16-2010, 04:38 AM
  2. 2 versions PHP 5.x running?
    By jlestrade in forum Hosting Security and Technology
    Replies: 6
    Last Post: 12-17-2009, 03:30 PM
  3. Anyone ever tried running two php versions at same times?
    By linuxfan in forum Hosting Security and Technology
    Replies: 4
    Last Post: 09-12-2009, 07:39 AM
  4. problem running two different versions of asp.net
    By nitaish in forum Hosting Security and Technology
    Replies: 1
    Last Post: 04-14-2006, 07:39 AM
  5. What versions are you running?
    By Gavin Miller in forum Hosting Security and Technology
    Replies: 10
    Last Post: 03-05-2005, 07:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •