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 3 of 5 (62 items) < Previous 1 2 3 4 5 Next >
Sort Posts: Previous Next
  • 12-05-2006 1:15 PM In reply to

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

    Try to run PHP4 in CGI mode.

    Also, just make sure you have exactly equal paths in both mapping and corresponding web extension.

    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
  • 12-05-2006 2:23 PM In reply to

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

    Feodor thanks for the suggestion, but I have vowed to run PHP4 on ISAPI .

    Funny but we humans ignore many things that it's okay to ignore at he end scratch the head for days and days to find the problem, you have told in your instruction to read the PHP install.txt, That was a grave mistake I wasted 5 hours in total to get PHP4 working on ISAPI.

    Mistake was I ignored the part of transfering all files in SAPI folder of PHP4 folder to PHP4 folder itself, I did this that now my path to php4isapi.dll is

    c:\php4\php4isapi.dll

    I deleted the old extension in IIS and map it to the above path and everything works. Happy once again. 

  • 12-06-2006 3:44 PM In reply to

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

    New problems in using the DUAL (Php4 and Php5) scenario, I was happy yesterday that info.php works for both versions by installing these following Feodor's instructions.

    There is more to it like both versions of PHP are looking for php.ini, and both versions actually can't find their respective php.ini files that are actually there in their respective folders itself.

    Hence when you see php info path to php.ini for both versions is shown as C:\Windows\ ,this means no php.ini file is actually found and php defaulted to default settings whatever they are that come with php.

    So whatever changes I make to php.ini files in my php4 and 5 folders  are not being detected at all. Whatever we do like enable extn etc is of no use.

    Where as I have to get php versions working and get them to find their respective php.ini file. I think there is more to this that has to be done like adding environment variables etc apart from adding extns in IIS. I stopped right here as if I put php5's php.ini in Windows directory what I have to do to get php4 working etc. I donot know what to do in this dual case scenario. This is important for me because I have to enable certain extns in each version of PHP seperately.

    Help appreciated. 

     

  • 12-07-2006 2:44 AM In reply to

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

    1. Remove any PHP files from c:\windows directory.

    2. Remove any references to PHP folders from PATH environment variable.

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

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

    Feodor thank you.

    But I never had PHP on my server before nor I had any Path Variable related to PHP, same with C:\Windows and any sub directories.

    I will sincerely appreciate if anyone using PHP both 4 & 5 to check their installations and see where Php is getting the php.ini file from.

    thanks. 

  • 12-07-2006 9:59 AM In reply to

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

    You can use "filemon" utility to see what files are probing by PHP engine.
    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
  • 12-12-2006 11:29 AM In reply to

    • pinklloyd
    • Top 25 Contributor
    • Joined on 02-11-2006
    • Charlotte, NC USA
    • Posts 324

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

    wow, I think I've heard that a few times now...lol Is PHP so flagrant to go where ever it chooses? Huh?

     

    I'm scared.. Indifferent 

    Building Virtual worlds
    OpenSIM host and Architect,
    Reseller based VR Virtual Reality! ;)
    Virtual storefronts - Merchant account reseller - Microsoft/Dell VAR. ISV,
  • 12-13-2006 2:04 AM In reply to

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

    Nope, it's not scary, but it's free and open-source. Such projects are driven by enthusiasts and very often they do not supply user-friendly installers and thus require some time to get them work.
    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
  • 12-14-2006 10:00 PM In reply to

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

    Feodor Fitsner:

    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.

    Have I missed something?  How do i install PHP 5 ISAPI?
    Chase

    DotNetPanel 2.4
    Server 2003 Web
    SQL Server Express
    MailEnable Enterprise 3.14
  • 12-15-2006 3:29 AM In reply to

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

    In general (if I'm not mistaken) to install PHP as ISAPI you should replace corresponding paths to .EXE on their respective ISAPI .DLL paths.
    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
  • 02-14-2007 11:59 AM In reply to

    • nkuzman
    • Top 500 Contributor
    • Joined on 10-24-2006
    • Pula, Croatia
    • Posts 6

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

    http://www.php.net/configuration

    As of PHP 5.2.0, the following registry locations are searched in order: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z\IniFilePath, HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y\IniFilePath and HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x\IniFilePath, where x, y and z mean the PHP major, minor and release versions.

    OK, that means we can setup both PHP 4 and PHP 5 (5.2.0 to be precise) as ISAPI in IIS Party!!!

    1. Unpack installations to C:\php4 and c:\php5
    2. Rename 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. Insert new keys into registry:
      HKEY_LOCAL_MACHINE\SOFTWARE\PHP
    5. add string value "iniFilePath" with value "C:\php4\" - in this directory should be php.ini for PHP 4
    6. add subkey HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5.2
    7. add string value "iniFilePath" with value "C:\php5\" - in this directory should be php.ini for PHP 5
    8. add Web Service Extensions to IIS as described in previous post
    9. PHP 4.x Executable Path in DotNetPanel should be:
      C:\php4\sapi\php4isapi.dll
    10. PHP 5.x Executable Path in DotNetPanel should be:
      C:\php5\php5isapi.dll
    11. Restart IIS and start customizing your PHP installations :)

     

    HTH Cool 

    Filed under: , , , , ,
  • 02-16-2007 1:28 PM In reply to

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

    Excellent post. Stuff like this should be put on http://help.dotnetpanel.com

    Together with for instance this thread http://forum.dotnetpanel.com/forums/thread/8468.aspx about setting specific settings per virtual host.

    IBISS Internet Services & Solutions: ASP - ASP.NET 1.1/2.0/3.0/3.5 - PHP 5 - MySQL 5 - MSSQL 2005
  • 02-17-2007 4:15 AM In reply to

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

    Definitely we'll add this to DNP KB. Thank you!
    Sincerely yours,
    Feodor Fitsner, Director
    DotNetPanel - professionally developed software for hosting businesses
  • 02-19-2007 4:09 PM In reply to

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

    Hello Feodor Fitsner,

    this was extremly helpfull ! Yes

    Regards,
    Fabian

  • 03-14-2007 10:44 AM In reply to

    • ebsolut
    • Top 50 Contributor
    • Joined on 02-13-2007
    • Switzerland
    • Posts 90

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

    Can you please confirm  that this means just removing the ";" from the extension line in php.ini,  extension=php_mysql.dll
    PHP Documentation also mentions that the file libmysql.dll needs to be in the Windows System directory...

     


    thanks
    Patrick

    http://www.ebsolut.com
    http://www.goldhosting.ch
    Swiss hosting Solutions
    Website hosting and internet development
    DNP 2.1.0
    Smartermail 4.0
    Simple DNS PLus
    IIS 6
    Microsoft FTP
Page 3 of 5 (62 items) < Previous 1 2 3 4 5 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems