Activity Stream
48,167 MEMBERS
6871 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 9 of 9
  1.     
    #1
    Member
    Website's:
    CoursesWeb.net MarPlo.net

    Default Run different PHP versions on virtual hosts in apache 2.2

    Hi,
    How can I configure Apache 2.2 server to have PHP 5.3 in all virtual hosts, except one virtual host in which to run PHP 4.4? I have all the php and .dll files.

    ---------- Post added at 02:49 PM ---------- Previous post was at 01:43 PM ----------

    If it is useful for someone, I found this example on the net:
    Code: 
    # Port-based virtual hosting: every php install uses a vhost on a different port
    Listen 8447
    Listen 8423
    
    ### BASE virtualhost
    ### set up the main php version we're using
    <VirtualHost *:80>
        LoadModule php5_module "E:/php5/php5apache2_2.dll"
        PHPIniDir "E:/php5"
        php_value extension_dir "E:/php5/ext/"
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php-source .phps
    </VirtualHost>
    
    <VirtualHost *:8447>
        # it would be handy to use php_value directives, but CGI versions of php will not grok them,
        # so we rely on different php.ini
        SetEnv PHPRC "E:/php4/"
        ScriptAlias /php447/ "E:/php4/"
        Action application/x-httpd-php447 "/php447/php.exe"
        AddType application/x-httpd-php447 .php .inc
        # apache 2.2 denies access to the php cgi executable, unless it is explicitly granted
        <Directory "E:/php4/">
          <Files "php.exe">
            Allow from all
          </Files>
        </Directory>
    </VirtualHost>
    
    <VirtualHost *:8423>
        SetEnv PHPRC "E:/php423/"
        ScriptAlias /php423/ "E:/php423/"
        Action application/x-httpd-php423 "/php423/php.exe"
        AddType application/x-httpd-php423 .php .inc
        <Directory "E:/php423/">
          <Files "php.exe">
            Allow from all
          </Files>
        </Directory>
    </VirtualHost>
    MarPlo Reviewed by MarPlo on . Run different PHP versions on virtual hosts in apache 2.2 Hi, How can I configure Apache 2.2 server to have PHP 5.3 in all virtual hosts, except one virtual host in which to run PHP 4.4? I have all the php and .dll files. ---------- Post added at 02:49 PM ---------- Previous post was at 01:43 PM ---------- If it is useful for someone, I found this example on the net: # Port-based virtual hosting: every php install uses a vhost on a different port Listen 8447 Listen 8423 Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    redinit.com
    Why would anyone need PHP 4? Just curious
    - RedIniT Unmetered VPS Hosting http://redinit.com || XEN Powered

  4.     
    #3
    Member
    Website's:
    CoursesWeb.net MarPlo.net
    To test some old scripts which use functions deprecated in PHP 5.2 +.
    There are good scripts created with php 4.4, and they need to be tested before rewrite them with php 5.3 .

  5.     
    #4
    Member
    Website's:
    redinit.com
    Wouldn't your tests be invalid once you rewrite it in PHP 5.4? Which is a complete rewrite from PHP4
    - RedIniT Unmetered VPS Hosting http://redinit.com || XEN Powered

  6.     
    #5
    Respected Member
    There are just some clients that refuse to upgrade so as a developer you might want to keep both versions available on one server for yourself rather than using a clients machine to develop each system.

  7.     
    #6
    Member
    I also have some problems regarding PHP, few days ago PHP stopped working , i mean one of my clients script stopped working , Don't know what it stopped , i was trying but it couldn't be ok.

  8.     
    #7
    Member
    Website's:
    imdber.org justpaste.me
    Start checking the logs.

  9.     
    #8
    Member
    Website's:
    redinit.com
    Quote Originally Posted by kirtan View Post
    I also have some problems regarding PHP, few days ago PHP stopped working , i mean one of my clients script stopped working , Don't know what it stopped , i was trying but it couldn't be ok.
    "Stopped working" is such a broad term. What error message did it display?
    - RedIniT Unmetered VPS Hosting http://redinit.com || XEN Powered

  10.     
    #9
    Member
    Website's:
    prewebhost.com
    Is it just plain server or any control panel installed on it? If you run cPanel, you can easily run dual php versions.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Similar Threads

  1. [Selling] SceneRelease - .psd - 3 Versions
    By Faizann20 in forum Marketplace (Buy, Sell and Trade)
    Replies: 9
    Last Post: 5th Apr 2012, 07:34 AM
  2. troubles with virtual hosts help ^_^
    By chiwan in forum Server Management
    Replies: 4
    Last Post: 23rd Sep 2011, 09:50 PM
  3. MultiPost All versions
    By Daniel_Archer in forum File Host Discussion
    Replies: 6
    Last Post: 8th Sep 2011, 03:41 PM
  4. MultiPost All versions
    By Forolockerz in forum File Host Discussion
    Replies: 2
    Last Post: 26th Aug 2011, 11:08 PM
  5. PhpBB3 SEO Title versions:(3.4-3.5-3.6)
    By smoky in forum phpBB
    Replies: 8
    Last Post: 22nd Mar 2010, 01:36 PM

Tags for this Thread

BE SOCIAL