in

Dotnetpanel Forums

Community support forums for DotNetPanel products

Installing both PHP 4.x and PHP 5.x on the same server

Last post 06-12-2008 5:23 AM by Rubal. 61 replies.
Page 1 of 5 (62 items) 1 2 3 4 5 Next >
Sort Posts: Previous Next
  • 07-11-2006 5:10 AM

    Installing both PHP 4.x and PHP 5.x on the same server

    The following instructions describe the process of installing both PHP 4.x and PHP 5.x in CGI mode on the same server:

    1. Unpack PHP 4 distributive to "c:\php4" folder.

    2. Unpack PHP 5 distributive to "c:\php5" folder.

    3. Set "Read" NTFS permissions for "DNPWebUsers" group (or orther specified on WEB service properties page in DNP) on both "c:\php4" and "c:\php5" folders.

    4. Rename "c:\php4\php.ini-recommended" to "c:\php4\php.ini".

    5. Open "c:\php4\php.ini" for editing and change the following settings:

    cgi.force_redirect = 0
    extension_dir = "c:\php4\extensions\"

    6. Save "c:\php4\php.ini" and close.

    7. Rename "c:\php5\php.ini-recommended" to "c:\php5\php-cgi-fcgi.ini".

    8. Open "c:\php5\php-cgi-fcgi.ini" for editing and change the following settings:

    short_open_tag = On
    cgi.force_redirect = 0
    extension_dir = "c:\php5\ext\"

    9. Save "c:\php5\php-cgi-fcgi.ini" and close.

    10. In IIS manager under "Web Service Extensions" node add two new web extensions:

    "PHP 4" with required file "c:\php4\php.exe"

    and

    "PHP 5" with required file "c:\php5\php-cgi.exe"

    11. Set both extensions status to "allowed".

    12. If you have previously installed PHP 4 or PHP 5, please, make sure you don't have a) any PHP libraries in "c:\windows\system32", b) php.ini in "c:\windows" and c) paths to PHP folders in PATH system variable.

    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
  • 07-11-2006 5:12 AM In reply to

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    If somebody can share his experience for ISAPI mode you are welcome to post here.
    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
  • 07-11-2006 6:55 AM In reply to

    • DarkyX
    • Top 50 Contributor
    • Joined on 06-21-2006
    • Los Angeles, CA
    • Posts 147

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    In IIS 6.0 -> Website Properties -> Home Directory Tab -> Configurations -> mappings

    should the php listed in the application extensions be deleted or edited? And if so should this be done under the main web sites folder or just on dotnetpanel?

    DotNetPanel 2.4.1
    Microsoft Windows Server 2003 R2
    Enterprise Edition Service Pack 2
  • 07-11-2006 7:03 AM In reply to

    • DarkyX
    • Top 50 Contributor
    • Joined on 06-21-2006
    • Los Angeles, CA
    • Posts 147

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    Also after I followed this how-to. I went into the server admin part of the control panel and I input the php pathways according in the web server configuration.

    I logged in as a client into my control panel on one of my websites and then website properties -> extensions and for php drop down menu only none / php4 are shown and not php5!

    did I miss something Feordor?

    thanks for your help

    Darky

    DotNetPanel 2.4.1
    Microsoft Windows Server 2003 R2
    Enterprise Edition Service Pack 2
  • 07-11-2006 7:14 AM In reply to

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    DarkyX:

    In IIS 6.0 -> Website Properties -> Home Directory Tab -> Configurations -> mappings

    should the php listed in the application extensions be deleted or edited? And if so should this be done under the main web sites folder or just on dotnetpanel?

    DNP will do mappings automatically when you enable/disable/switch PHP for the web site.

    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
  • 07-11-2006 7:14 AM In reply to

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    DarkyX:

    Also after I followed this how-to. I went into the server admin part of the control panel and I input the php pathways according in the web server configuration.

    I logged in as a client into my control panel on one of my websites and then website properties -> extensions and for php drop down menu only none / php4 are shown and not php5!

    did I miss something Feordor?

    thanks for your help

    Darky

    Yes, make sure you have both PHP 4 and 5 enabled in your hosting plans.

    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
  • 07-13-2006 8:07 AM In reply to

    • DarkyX
    • Top 50 Contributor
    • Joined on 06-21-2006
    • Los Angeles, CA
    • Posts 147

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    I read your post and you stated that we should remove any php.ini from C:/windows if we did a previous install. However I have a Apache webserver on the same server box running on a different port and some of the scripts on there require the php.ini in C:/windows or it will get a undefined error when calling mysql function.

    Can I leave the original php.ini file in c:/windows or would leaving it cause errors in DNP??

     

    Basically I am looking for a work around.

    DotNetPanel 2.4.1
    Microsoft Windows Server 2003 R2
    Enterprise Edition Service Pack 2
  • 07-13-2006 8:12 AM In reply to

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    Woof, only the experiment will show which php.ini will be loaded. Smile [:)] Btw, I would recommend you to play with FileMon utility from SysInternals (http://www.sysinternals.com/FileAndDiskUtilities.html) and see what files are requested when.

    Edit: I saw some guys on the Internet were recompiling original PHP sources to get php.ini from proper location Wink [;)]

    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
  • 08-18-2006 9:19 AM In reply to

    • sathai
    • Top 50 Contributor
    • Joined on 07-01-2006
    • Thailand
    • Posts 132

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    I'm having some problem install php. I have install by following your instructions, but when I'm trying to run php my server. I get this error message.

    http://moongdoo.com/test1.php

     You are not authorized to view this page

    HTTP Error 403 - Forbidden: Access is denied. Internet Information Services (IIS)

    Feodor can you help me please!

    James NW

    Web Hosting | Domain | Email | Whois | DNS Hosting | Transfer Domain

    Sathai Host is Thailand’s Only Licensed Web Hosting Company,
    Monitor & Guaranteed by the Government for your services.

  • 08-18-2006 9:29 AM In reply to

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    Check the following:

    1. Both PHP folders have "Read" permission enable for "DNPWebUsers". Try to enable "Read" for NETWORK SERVICE and see if it helps.

    2. Both PHP Web Extensions are "Allowed" in IIS admin tool.

    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
  • 08-18-2006 11:27 AM In reply to

    • sathai
    • Top 50 Contributor
    • Joined on 07-01-2006
    • Thailand
    • Posts 132

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    No, it not helping same results ERROR 403
    James NW

    Web Hosting | Domain | Email | Whois | DNS Hosting | Transfer Domain

    Sathai Host is Thailand’s Only Licensed Web Hosting Company,
    Monitor & Guaranteed by the Government for your services.

  • 08-18-2006 11:52 AM In reply to

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    I would recommend you to install PHP on IIS using the PHP readme. I can assure you step-by-step configuration using a native readme is the most comprehensive guide. Wink

    Actually it shouldn't takes from you more than 30-40 minutes to run PHP but please be patient, accurate, consistent and scrupulous and you'll get the result! Smile

    PS. Check does the .php extension is correctly mapped on both levels Web Service extensions and website. If the path to the php.exe contains spaces please double-quote it.

    Best regards,
    Pavel Tsourbelev, COO
    DotNetPanel Software - professionally developed software for hosting businesses
  • 08-19-2006 6:33 AM In reply to

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    A question on the side here, what's the difference between mapping to the php.exe and php isapi module?

    I am asking because, under IIS I have allways mapped the extention to php5isapi.dll and not to php.exe, and I have also set the path to the isapi module in DNP IIS service properties and not to the php.exe.

    PS: I am currently only running PHP5.

    IBISS Internet Services & Solutions: ASP - ASP.NET 1.1/2.0/3.0/3.5 - PHP 5 - MySQL 5 - MSSQL 2005
  • 08-25-2006 3:23 PM In reply to

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    Ingvald:

    A question on the side here, what's the difference between mapping to the php.exe and php isapi module?

    I am asking because, under IIS I have allways mapped the extention to php5isapi.dll and not to php.exe, and I have also set the path to the isapi module in DNP IIS service properties and not to the php.exe.

    PS: I am currently only running PHP5.

    Bump Embarrassed

    IBISS Internet Services & Solutions: ASP - ASP.NET 1.1/2.0/3.0/3.5 - PHP 5 - MySQL 5 - MSSQL 2005
  • 08-26-2006 9:06 AM In reply to

    Re: Installing both PHP 4.x and PHP 5.x on the same server

    "By design" ISAPI applications are faster than CGI ones and more native for IIS. Of course, if you don't have any issues running PHP 5.0 ISAPI then it is the first choice.
    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
Page 1 of 5 (62 items) 1 2 3 4 5 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems