Feature Request: Web Installer should not change existing installation of PHPRSS

6 replies

Last post Oct 14, 2009 05:03 AM by pierrejoye

  • Feature Request: Web Installer should not change existing installation of PHP

    Oct 03, 2009 07:45 PM|samunplugged|LINK

    Hello PHP Team,

    My server had both IIS and Apache running normally until I decided to experiment with the IIS Web Installer 2.0.

    The web Installer changed my existing installation of PHP.

    When automated installer silently installs PHP (re-installs it), it removes Apache connectors forever from users machine. In my case it removed "php5apache2_2.dll" file and this stopped my Apache server.

    I tried to re-install PHP myself by running "php-5.2.11-win32-installer.exe" but then IIS won't run .PHP files.

    The automated tool should install PHP in a new directory and prevent any damage to other web servers.

    Also, automated installation doesn't install all goodies of PHP... please let users choose an installation directory and select the features they want. I personally install everything expect Script Executable that links *.php on Windows Explorer to run.

    Apache and IIS can stand united, but the tool kind of ruined all the fun for me!

    -Sameer Gupta

    FastCGI Windows 2008 Server Apache PHP IIS7

  • Re: Feature Request: Web Installer should not change existing installation of PHP

    Oct 04, 2009 10:30 AM|don.raman|LINK

    Hi Sameer,

    Thanks for the feedback.Let me summarize my understanding and ask few clarifying question:

    • <div mce_keep="true">You have both Apache as well as IIS configured on your server to run PHP. Can you tell what version of IIS as well as Windows you are running?</div>
    • <div mce_keep="true">Are you serving Apache and IIS with the same PHP install location? Or you have two different PHP installation to serve both Apache as well as IIS? Can you tell us the physical path where PHP is installed for both Apache as well as IIS.</div>
    • <div mce_keep="true">Were your PHP installations for Apache and IIS extracted out of a zip file or a MSI? Which version of PHP were you running?</div>

    I can see Web Platform Installer tampering the PHP files in case you have PHP installed at C:\Program Files\PHP for 32-bit machine or C:\Program Files (x86)\PHP for 64-bit machine. This is the location where WPI installs PHP by default. If you have PHP installed there through MSI, there should be no problem. However if the PHP was installed at that location without using MSI, I can see WPI creating some conflict.

    Can you please let us know more details so that we can act on it.

    Again thanks for the feedback and using Web platform Installer.

    Regards,

    Don.

  • Re: Feature Request: Web Installer should not change existing installation of PHP

    Oct 04, 2009 01:59 PM|samunplugged|LINK

    Hi Don,

    The server is running Windows 2008 Web edition (x64).

    Before running IIS Web Installer I had PHP 5.2.8-win32 installed using MSI installer at C:\Program Files (x86)\PHP directory.

    Apache version is 2.2 and was installed at C:\Program Files (x86)\Apache Software Foundation\Apache2.2 directory.

    After Web Installer updated my existing installation of PHP, I tried to run MSI install and install PHP for Apache on separate directory to C:\Program Files (x86)\PHPApache\ - but this stops IIS and Apache both from loading. Running MSI removed features required by IIS. I did not understand why Apache was not able to load php5apache2_2.dll ( I could see it after installing with MSI). I have tried running MSI available for non-thread-safe and thread-safe environments.

    The main issue I guess is with PHP installer. PHP installed using MSI or Web Installer always updates the existing installation, doesn't matter whether its located at Program Files (x86)\PHP or at Program Files (x86)\PHPApache or any other location. MSI always updates it and so does the Web Installer. Runing installation from Web Installer always sets the installation location to back to Program Files (x86)\PHP.

    One thing to note is that after installing PHP with Web Installer, Apache was never able to start even after installing PHP using MSI.

    I resolved this issue by uninstalling the PHP and using the .ZIP installation for both IIS (non thread safe) and Apache (thread safe)

    For benefits of others, it would be great time-saver (hours in my case) if the Web Installer checks existing PHP installation done with MSI or done at the said folder (Progra~2\PHP\) - if one exists it should download .ZIP nts version of PHP and configure the IIS for running .php extensions by adding handler mappings.

    This will make sure existing web servers are not affected by use of Web Installer.

    Best

    Sameer

  • Re: Feature Request: Web Installer should not change existing installation of PHP

    Oct 04, 2009 03:50 PM|don.raman|LINK

    samunplugged

    Before running IIS Web Installer I had PHP 5.2.8-win32 installed using MSI installer at C:\Program Files (x86)\PHP directory.

    This is okay and WEBPI should not create any problem. The PHP MSI when you run it through WEBPI automatically does all the configuration required for IIS FastCGI. The support for this is in PHP MSI and WEBPI just passes the switch as an argument to MSI. This should not disturb IIS settings at all and your PHP pages should continue working with IIS as before. If this is not the case I would like to know more.

    samunplugged

    After Web Installer updated my existing installation of PHP, I tried to run MSI install and install PHP for Apache on separate directory to C:\Program Files (x86)\PHPApache\ - but this stops IIS and Apache both from loading. Running MSI removed features required by IIS. I did not understand why Apache was not able to load php5apache2_2.dll ( I could see it after installing with MSI). I have tried running MSI available for non-thread-safe and thread-safe environments.

    Did you select Apache CGI at the time of MSI installation. I don't have much experience on Apache but I believe Apache works with TS build of PHP and TS MSI of PHP should support configuring Apache. This seems like a bug in PHP MSI. I can see install related bug in PHP at http://bugs.php.net/bug.php?id=47855 which has been fixed recently. Can you see if this is similar to what you are facing and check the latest snapshot to see if this solves your problem. Otherwise you should consider filing a bug against PHP installer at http://bugs.php.net/.

    Yes you are right, the MSI of PHP does all this. Again as of now for IIS (if you have chosen to configure IIS FastCGI from setup GUI) installer does the following:

    • Removes any old handler mapping for FastCGI (it doesn't do anything for PHP installed to work as ISAPI)
    • Adds index.php to default document list.
    • Installs most common and popular PHP extension by default.
    • Sets some of the PHP INI directives as considered as best practice.

    But your idea of making multiple PHP installation exist simultaneously is very valid and we will see what we can do in future releases of WEBPI.

    Again thanks for a detailed answer and help us understanding the situation.

    Regards,

    Don.

  • Re: Feature Request: Web Installer should not change existing installation of PHP

    Oct 13, 2009 04:44 PM|samunplugged|LINK

    don.raman

    This is okay and WEBPI should not create any problem. The PHP MSI when you run it through WEBPI automatically does all the configuration required for IIS FastCGI. The support for this is in PHP MSI and WEBPI just passes the switch as an argument to MSI. This should not disturb IIS settings at all and your PHP pages should continue working with IIS as before. If this is not the case I would like to know more.

    No, I had used PHP MSI to install PHP on Apache. 

    Apache server uses TS and IIS uses non TS build. With PHP MSI, if you choose Apache 2.2 it removes files needed for IIS7 and vice versa (when choosing IIS7). For most users this is fine. But they could have made it easier by not tampering the existing installation.

    Therefore I have used both TS and non-TS .Zip installers for both Apache and IIS. I configured both servers manually. And I have PHP working on both IIS and Apache.

    Now here is something WEBPI could do so existing installations of PHP are not tampered with. :) One cannot assume that servers admins will configure PHP "only" with IIS or Apache or some other server for that matter.

    WEBPI uses some logic to understand if PHP is already installed on IIS. When I choose to install an application using WEBPI, say I choose to install Wordpress, I click "Install" button and I see a dialog box with "Accept or Decline" button and the dialog box tells me that it will again run the dreadful PHP msi. Too bad, I can't click Accept button cos running msi means Apache stops working. (Image attached) 

    This is it, if only I could tell WEBPI that PHP is already configured on IIS, it would be amazing.

    I think the best bet would be to use a .zip installer or let a user choose a permanent setting like "I already have PHP configured for IIS" in WEBPI. However, I think this should not apply to other PHP dependencies like MS SQL server connectors for PHP.

    Too bad, now I have a manual installation of PHP for IIS and I have no clue how to get the MS-SQL connectors for it - WEBPI had configured it for me. C'est la vie!

    And bug id 47855 is not similar to my situation.

    Best

    Sameer

    WEBPI

     

    FastCGI Windows 2008 Server Apache PHP IIS7

  • Re: Feature Request: Web Installer should not change existing installation of PHP

    Oct 13, 2009 11:18 PM|don.raman|LINK

    Hi Sameer,

    samunplugged

    Apache server uses TS and IIS uses non TS build. With PHP MSI, if you choose Apache 2.2 it removes files needed for IIS7 and vice versa (when choosing IIS7). For most users this is fine. But they could have made it easier by not tampering the existing installation.

    I absolutely agree. Can you file a bug at http://bugs.php.net. Even if this doesn't get fixed you will know the reason behind not doing this.

    samunplugged

    WEBPI uses some logic to understand if PHP is already installed on IIS. When I choose to install an application using WEBPI, say I choose to install Wordpress, I click "Install" button and I see a dialog box with "Accept or Decline" button and the dialog box tells me that it will again run the dreadful PHP msi. Too bad, I can't click Accept button cos running msi means Apache stops working. (Image attached) 

    PHP MSI writes into Registry and WEBPI looks for that registry key to figure out if PHP is already installed or not. Unfortunately there is no other better way to figure this out. However I can understand the pain you are having. A simple workaround is to install TS PHP for Apache manually using the Zip file and the NTS PHP for IIS through WPI. They won't conflict and you will not be entering this situation.

    samunplugged

    Too bad, now I have a manual installation of PHP for IIS and I have no clue how to get the MS-SQL connectors for it - WEBPI had configured it for me.

    Configuring extension for MSSQL is easy. The MSSQL team has released a new driver which should be used rather than the one which comes with PHP MSI. You can find all the details regarding the driver at http://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspx.

    Thanks,

    Don.

  • Re: Feature Request: Web Installer should not change existing installation of PHP

    Oct 14, 2009 05:03 AM|pierrejoye|LINK

    Added my reply here too for the record (see http://bugs.php.net/49870).

    The installer does not support yet multiple install of PHP. It is one of the features we like to implement in a near future.