PHPManager icon indicating copy to clipboard operation
PHPManager copied to clipboard

Modules missing a section declaration

Open yaffeweb opened this issue 7 years ago • 18 comments

Installed .Net 4.5 Ran the phpmanagerv1.5.0 Get Error 1001. Filename: \?\C:\Windows\system32\inetsrv\config\administration.config Error: The configuration section 'modules' cannot be read because it is missing a section declaration.

Running on Server 2008R2 IIS7

Not really a IIS kind of person so I have no idea if this is because the installer is looking for PHP somewhere that it's not, which it is in the C:\Program Files\PHP. If this is a .NET problem because there are 1500 versions of .NET so when you state that it works with 4.5 is that 4.5.1 or 4.5.2 ect ect..

Any light you can shed on this would be helpful.

yaffeweb avatar Apr 03 '18 17:04 yaffeweb

I am facing the same problem.

sachink23 avatar Jun 15 '18 03:06 sachink23

Sorry about not replying earlier

This version was built for server 2016 with IIS7 while you are using an earlier IIS version, Their is a IIS7 sub branch that would have a working MSI for use.

I am investigating moving back to IIS7 web.administration for all builds just need more testing

RonaldCarter avatar Jul 06 '18 03:07 RonaldCarter

The cause of the exception is simple. The installer you built use .NET Framework 4.x to load the custom action, and on IIS 7.x machine such a way will lead to exceptions.

The only way to fix is to let the installer run the same custom action on .NET Framework 3.5, then the exception would disappear.

Update: Sounds like it is impossible to choose .NET Framework version in Custom Actions, https://blogs.msdn.microsoft.com/astebner/2005/03/10/dont-use-managed-code-to-write-your-custom-actions/ So other workarounds need to be used.

Update: Fixed in latest installers, https://ci.appveyor.com/project/lextm/phpmanager/build/artifacts .

lextm avatar Aug 01 '18 20:08 lextm

I am not sure of your solution to the problem as this then generates more then one MSI. Would it be possible to insert these MSIs into a master MSI with a simple check script on IIS version and Windows architecture on run on which one installs?

RonaldCarter avatar Aug 02 '18 01:08 RonaldCarter

@RonaldCarter That's not something Visual Studio Setup Project supports. I don't plan to create a master MSI yet, but that is clearly a better way to simplify installation.

lextm avatar Aug 02 '18 02:08 lextm

@RonaldCarter I am able to ship a single MSI package now in 2.0 Beta 2.

lextm avatar Aug 03 '18 18:08 lextm

was this ever solved, as I am also having this issue on Windows server 2012. Cannot install php manager either via WPI or manually from MSI

deltaforce avatar May 03 '19 17:05 deltaforce

@deltaforce what MSI did you use? I am confident that the ones created by me do not have this issue, https://github.com/phpmanager/phpmanager/releases

lextm avatar May 03 '19 19:05 lextm

I tried via Web platform installer and used the download from the Microsoft site

deltaforce avatar May 03 '19 22:05 deltaforce

@deltaforce those are extremely old installers and they won't work as expected if you read my comment in Aug 2018 above.

You can either,

  • Uninstall .NET Framework 4.x and then use that old installers.
  • Or simply use PHP Manager 2.x installers maintained by me.

lextm avatar May 03 '19 23:05 lextm

ok thanks, I did not realise these were different versions from the official.

deltaforce avatar May 04 '19 00:05 deltaforce

ok I downloaded your version, but still getting the error phpmanager

deltaforce avatar May 04 '19 00:05 deltaforce

Make sure you go to Control Panel | Programs to uninstall the previous version.

Mine should call "PHP Manager 2 for IIS" when you install it.

lextm avatar May 04 '19 05:05 lextm

There is no previous version installed as the install failed with the same above error.

deltaforce avatar May 07 '19 23:05 deltaforce

@deltaforce All installers I created come with SHA1 hash values, https://github.com/phpmanager/phpmanager/releases

Which one did you use and what is the hash code?

lextm avatar May 07 '19 23:05 lextm

PHPManagerForIIS_x64.msi - FB2D89986D6E467EBB10C2090AB7D475F9369268

deltaforce avatar May 08 '19 00:05 deltaforce

nevermind, I rebooted and that fixed it.

deltaforce avatar May 08 '19 00:05 deltaforce

The cause of the exception is simple. The installer you built use .NET Framework 4.x to load the custom action, and on IIS 7.x machine such a way will lead to exceptions. The only way to fix is to let the installer run the same custom action on .NET Framework 3.5, then the exception would disappear. Update: Sounds like it is impossible to choose .NET Framework version in Custom Actions, https://blogs.msdn.microsoft.com/astebner/2005/03/10/dont-use-managed-code-to-write-your-custom-actions/ So other workarounds need to be used.


Update: Fixed in latest installers, https://ci.appveyor.com/project/lextm/phpmanager/build/artifacts . Your (Microsoft) Link for the Fix worked - Thanks.

ghost avatar May 04 '20 09:05 ghost