in

Dotnetpanel Forums

Community support forums for DotNetPanel products

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

Last post 04-14-2009 6:24 PM by matija. 62 replies.
Page 5 of 5 (63 items) < Previous 1 2 3 4 5
Sort Posts: Previous Next
  • 06-10-2008 3:29 AM In reply to

    • Rubal
    • Top 10 Contributor
    • Joined on 03-16-2006
    • India
    • Posts 838

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

    rockinthesixstring:

    I know this is an old thread, but I am running into the same problems.  I followed the instructions Here with the exception that I have had PHP5 running on my system for some time, so I simply followed the PHP4 section.

    I am getting a 403 error when running info.php
    Network Service and DNPWebUsers have read&execute permissions on "C:\PHP4\php.exe"
    "C:\PHP4\php.exe" is allowed in web service extensions
    "C:\PHP4\php.exe" is added to the DNP config for PHP4

    Any help would be greatly appreciated.

    If you have domain running under its own application pool then some User Rights Assignment under Local Policy needs to be done.

    Local Policies – User Right Assignment

    1) Adjust Memory Quotas for Process - Add group IIS_WPG
    2) Replace a Process Level Token - Add group IIS_WPG

    iisreset after the above changed and then you'll be able to run php cgi php.exe/php-cgi.exe

    Thanks


     

    Rubal Jain // Email - Rubal @ Rubal [dot] Net

    Windows Server Setup, Configuration, Troubleshooting, Basic Security & Hardening
    DotNetPanel - Helm Control Panel Setup, Installation, Configuration, Troubleshooting

    Authorised DNP Reseller. Get 20% Discount on all DNP Licenses.
    Authorised SmarterTools, Declude, SimpleDNS (JHSoft), Gene6 FTP, Helicon, Kayako, Icewarp Merak, MailEnable, Deerfield Reseller.

    DotNetPanel & SmarterTools Monthly Leased Licenses available.

    DotNetPanel Professional Server setup includes installation of PHP, Perl, Python, ASP.Net Frameworks, SQL Express, MySQL, SmarterMail, Stats etc and complete integration with control panel just $199/server. Contact for further details.
  • 06-12-2008 5:23 AM In reply to

    • Rubal
    • Top 10 Contributor
    • Joined on 03-16-2006
    • India
    • Posts 838

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

    Hi,

     I also have some instructions posted here if someone is willing to run both PHP versions as FastCGI using Microsoft's FastCGI Golive version.

    http://forums.webhostautomation.com/showthread.php?t=21684&highlight=Microsoft+FastCGI&page=2

    Thanks

    Rubal Jain // Email - Rubal @ Rubal [dot] Net

    Windows Server Setup, Configuration, Troubleshooting, Basic Security & Hardening
    DotNetPanel - Helm Control Panel Setup, Installation, Configuration, Troubleshooting

    Authorised DNP Reseller. Get 20% Discount on all DNP Licenses.
    Authorised SmarterTools, Declude, SimpleDNS (JHSoft), Gene6 FTP, Helicon, Kayako, Icewarp Merak, MailEnable, Deerfield Reseller.

    DotNetPanel & SmarterTools Monthly Leased Licenses available.

    DotNetPanel Professional Server setup includes installation of PHP, Perl, Python, ASP.Net Frameworks, SQL Express, MySQL, SmarterMail, Stats etc and complete integration with control panel just $199/server. Contact for further details.
  • 04-14-2009 6:24 PM In reply to

    • matija
    • Top 50 Contributor
    • Joined on 08-23-2006
    • Croatia
    • Posts 147

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

    I'm opening this thread as I'm stuck with installing PHP4 & PHP5 as ISAPI.

    Here's the steps I made:

    1. Unpacked installations to c:\php4 and c:\php5
    2. Renamed php.ini-dist to php.ini in both directories
    3. Set Read & Execute permissions for NETWORK SERVICE and DNPWebUsers on:
      c:\php4\php4ts.dll
      c:\php4\sapi\php4isapi.dll
      c:\php4\php.ini
      c:\php5\php5ts.dll
      c:\php5\php5isapi.dll
      c:\php5\php.ini
    4. Inserted new keys into registry:
      HKEY_LOCAL_MACHINE\SOFTWARE\PHP
    5. Added string value "iniFilePath" with value "c:\php4\"
    6. Added subkey HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5.2
    7. Added string value "iniFilePath" with value "c:\php5\"
    8. Added "PHP 4" to Web Service Extensions in IIS ("c:\php4\sapi\php4isapi.dll" - Allowed)
    9. Added "PHP 5" to Web Service Extensions in IIS ("c:\php5\php4isapi.dll" - Allowed)
    10. Opened DotNetPanel -> Configuration -> Servers -> Web Sites:
      PHP 4.x Executable Path: c:\php4\sapi\php5isapi.dll
      PHP 5.x Executable Path: c:\php5\php5isapi.dll
    11. Added "c:\php4\; c:\php5\" to Windows PATH
    12. Opened php.ini in c:\php5 and modified:
      short_open_tag = On
      cgi.force_redirect = 0
      extension_dir = "c:\php5\ext\"
    13. Restarted machine


    Now, the PHP 4 is working properly, but PHP 5 websites just return blank page!? Did I miss anything?

    EDIT:

    It actually is working. There was "display_errors = off" in php.ini, therefore the website I was testing PHP5 was not showing due to some errors in source... gdamn!

    EDIT:

    Nah, simple PHP works (phpinfo.php returns info), but there is a problem with includes now (both on 4 & 5), whenever I use "./" for path it returns (this is an example of Wordpress installation that was working on PHP 4 CGI:

    Warning: main(./wp-blog-header.php) [function.main]: failed to open stream: No such file or directory in d:\www\domain.com\wwwroot\index.php on line 17

    Fatal error: main() [function.require]: Failed opening required './wp-blog-header.php' (include_path='.;c:\php4\pear') in d:\www\domain.com\wwwroot\index.php on line 17

    Did anyone encounter this problem? Was googling 5 hours, no success :(

    Dot Net Panel 2.0 Gold Lifetime License (includes all modules) + free SmarterTools bundle for $399

    PM for more info.
Page 5 of 5 (63 items) < Previous 1 2 3 4 5
Powered by Community Server (Commercial Edition), by Telligent Systems