0

Up until now I have only worked with this web.config within Visual Studio. However I am now trying to publish my website to IIS and there are errors associated with my web.config. It seems that it crashes on configuration data for a module.

<?xml version="1.0"?>

<configuration>
    <system.web>
      <compilation targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" />
    </system.web>
  <phpNet>
    <classLibrary>
      <add assembly="php_mcrypt.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="mcrypt" />
      <add assembly="php_curl.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="curl" />
    </classLibrary>
    <scriptLibrary/>
  </phpNet>

</configuration>

error:

enter image description here

This screenshot is when trying to double click on any "Feature" within the "Feature View" of IIS. However if i just hit the website via a browser the error is the same:

The configuration section 'phpNet' cannot be read because it is missing a section declaration

phpNet is for Phalanger, and the extension should be installed but I do not know how to check that. Like I said though, this web.config and phalanger worked fine within visual studio so Im not sure whats wrong. Especially since the installer did install the samples in iis.

owen gerig
  • 6,165
  • 6
  • 52
  • 91

2 Answers2

1

You are missing configuration section definition

<configSections>
<section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />

Without this, .NET does not know the 'phpNet' configuration section.

Also this means, you don't have Phalanger installed using setup.exe. Here are some information about using Phalanger without proper installation (important is the part about configuration) http://www.php-compiler.net/blog/2011/installation-free-phalanger-web

Jakub Míšek
  • 1,036
  • 9
  • 12
0

I found this posting http://crdevelopment.net/2012/06/12/fixing-iis-error-the-configuration-section-system-web-extensions-cannot-be-read-because-it-is-missing-a-section-declaration/

which led me to check the application pools. enter image description here

At which point I noticed there where multiples. I selected the phalangerAppPool and that got rid of my error, but brought about a new one.

Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

However that error was alot easier to resolve (fix)

Community
  • 1
  • 1
owen gerig
  • 6,165
  • 6
  • 52
  • 91