Invalid configuration data

Extending PHP application with ASP.NET. Configuring ASP.NET to run Phalanger powered PHP code properly and efficiently.

Invalid configuration data

Postby dslaby » October 20th, 2012, 7:59 am

I installed wordpress with phalanger and get the following error message when I attempt to run the configuration:

Error Summary
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information
Module
IIS Web Core
Notification
BeginRequest
Handler
Not yet determined
Error Code
0x80070032
Config Error
The configuration section 'phpNet' cannot be read because it is missing a section declaration
Config File
\\?\C:\inetpub\wwwroot\wpblog\web.config
Requested URL
http://localhost:80/wpblog/wp-content/m ... config.php
Physical Path
C:\inetpub\wwwroot\wpblog\wp-content\mu-plugins\wp-db-abstraction\setup-config.php
Logon Method
Not yet determined
Logon User
Not yet determined
Config Source 20: </system.web>
21: <phpNet>
22: <paths>

Any assistance resolving this issue will be appreciated. Thank you
dslaby
 
Posts: 5
Joined: October 20th, 2012, 7:50 am

Re: Invalid configuration data

Postby Jakub Misek » October 20th, 2012, 11:58 am

Thanks for trying WordPress with Phalanger.

To fix this issue, ensure your IIS application pool is configured to .NET 4.0, using Integrated Pipeline. (IIS Manager -> Application Pools)

If you did not use setup.exe to install Phalanger, you are most probably missing "phpNet" configuration section declaration. Merge following into your config file:
Code: Select all
<configSections>
    <section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
</configSections>
Jakub Misek │ DEVSENSE s.r.o. │ Email: jakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2062
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Invalid configuration data

Postby dslaby » October 20th, 2012, 8:12 pm

I followed the directions on http://www.php-compiler.net/blog/2012/w ... langer-3-0 and did use setup to install Phalanger. I added the <configurationsections> as you recommended and did an iisreset. The application pool is using the PhalangerAppPool that was created during setup and confirmed the settings. I was able to go through the wordpress configuration, but then got this error:

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information
Module
CustomErrorModule
Notification
SendResponse
Handler
StaticFile
Error Code
0x80070021
Config Error
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
Config File
\\?\C:\inetpub\wwwroot\wpblog\web.config
Requested URL
http://localhost:80/wpblog/wp-admin/
Physical Path
C:\inetpub\wwwroot\wpblog\wp-admin\
Logon Method
Anonymous
Logon User
Anonymous
Config Source 14: </defaultDocument>
15: <httpErrors errorMode="Detailed">
16: <clear />

Inspecting the web.config, I do see the <configurationsections> including "phpNet"

Sorry this is getting to be so difficult. Thank you for your help.

Dan
dslaby
 
Posts: 5
Joined: October 20th, 2012, 7:50 am

Re: Invalid configuration data

Postby Jakub Misek » October 24th, 2012, 1:55 pm

It seams like common web.config issue.
In your case <httpErrors> is not allowed (maybe you are missing some other configuration section, or you are modifying sub-application web.config). However it is not much Phalanger related. Try to start with minimal web.config file. If you have installed Phalanger, only following should be sufficient:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="Phalanger Handler" path="*.phpx" verb="*" type="PHP.Core.RequestHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" />
    </handlers>
  </system.webServer>
  <phpNet>
    <globalization>
      <set name="PageEncoding" value="utf-8" />
    </globalization>
   <classLibrary>
   </classLibrary>
  </phpNet>
</configuration>
Jakub Misek │ DEVSENSE s.r.o. │ Email: jakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2062
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Invalid configuration data

Postby dslaby » October 24th, 2012, 5:11 pm

I made the change to web.config and get the following error:

HTTP Error 500.0 - Internal Server Error

C:\Program Files (x86)\PHP\php-cgi.exe - The FastCGI process exited unexpectedly

I have never been able to do a 5 minute install of wordpress on SQL 2008 and SQL 2008R2. I'm installing on Windows 2008 Web server. I'll switch checking on the wordpress forums. Thanks for your help.

I see that all the PHP Extensions that have _sqlsvr_ in their name have been disabled. Is this normal for Phalanger?
dslaby
 
Posts: 5
Joined: October 20th, 2012, 7:50 am

Re: Invalid configuration data

Postby Jakub Misek » October 24th, 2012, 7:14 pm

You have native php configured ... so you are not using Phalanger at all.
Jakub Misek │ DEVSENSE s.r.o. │ Email: jakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2062
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Invalid configuration data

Postby dslaby » October 24th, 2012, 9:39 pm

I had native PHP installed previously on wordpress. The sites mysteriously disappeard and even the folders were blank. Do I need to uninstall PHP before I install phalanger? Perhaps I should start with a clean install. Thanks.
dslaby
 
Posts: 5
Joined: October 20th, 2012, 7:50 am

Re: Invalid configuration data

Postby Jakub Misek » October 25th, 2012, 7:16 am

You don't have to uninstall, just disable handling of .php files with PHP. It probably causes your problems with fastCgi (Phalanger is .NET request handler instead of php)
Jakub Misek │ DEVSENSE s.r.o. │ Email: jakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2062
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Invalid configuration data

Postby dslaby » October 25th, 2012, 5:26 pm

I uninstalled everything and attempted to reinstall following the instructions on http://www.php-compiler.net/blog/2012/w ... langer-3-0 and had several issues. I'm sorry, but the process has involved way too many hours over several days without success. Time to give up on wordpress and move on to another application.
dslaby
 
Posts: 5
Joined: October 20th, 2012, 7:50 am

Re: Invalid configuration data

Postby Jakub Misek » October 25th, 2012, 6:08 pm

I'm sorry you were not able to configure IIS. Phalanger is basically an ASP.NET request handler for *.php, nothing more. I know the configuration can be confusing sometimes.
Jakub Misek │ DEVSENSE s.r.o. │ Email: jakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2062
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Next

Return to PHP/ASP.NET Web Applications

Who is online

Users browsing this forum: No registered users and 1 guest

cron

User Control Panel

Login

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 62 on January 7th, 2012, 10:54 pm

Users browsing this forum: No registered users and 1 guest
Phalanger