Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Sep 2004
    Posts
    523

    Lightbulb php5 and php4 at the same time is the same?

    I have both php 5 (as main) and php 4 running as cgi.
    When a user uploads a script written in php4, apache automatically detects that is php4 and let it run or do I have to specify via .htaccess when is a php4 script??

    Thanks

  2. #2
    Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    675

    Default

    If the script is meant for PHP 4 specifically and PHP 5 is the default, the user then must manually specify that 4 runs the script otherwise the default will run it.
    Upload Guardian 2.0 - Sign up for our early beta
    ServerProgress - Server security, consulting and assistance

  3. #3
    Member SuperBaby's Avatar
    Join Date
    Nov 2003
    Location
    Malaysia
    Posts
    306

    Default

    How to tell the script to run under PHP4 instead of the default PHP5?
    SuperBaby

  4. #4
    Member
    Join Date
    Jul 2005
    Location
    Sticky On Internet
    Posts
    555

    Default

    use htaccess to declare which php version should be used to parse php files under that a/c.
    Learn atleast A word Daily

    7+1 Dedicated Boxes with cPanel...

  5. #5
    Member
    Join Date
    Sep 2004
    Posts
    523

    Default

    yeah but php4 and php5 extensions are the same (.php)

    How the .htaccess should be??

    Thanks

  6. #6
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    You will want to create the following directives in the .htaccess, the first one basically tells a script of ours not to edit this out of the way:


    # Use PHP5 as default
    AddHandler application/x-httpd-php5 .php


    .php4 and .php5 are always parsed by their respective version of php.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

Similar Threads & Tags
Similar threads

  1. How to php4 and php5 (.php5) in same server?
    By strikinado in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-09-2007, 11:01 AM
  2. PHp4 and PHP5 at the same time?
    By mrcpu in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-18-2006, 08:36 PM
  3. Possible to have php4 and php5 installed and usable at one time?
    By surfdue in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-21-2006, 01:24 AM
  4. PHP4 or PHP5
    By geraldo in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-03-2004, 11:59 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube