Phalanger Free web.config

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

Phalanger Free web.config

Postby evbase » January 15th, 2014, 3:21 pm

Does anyone have a sample of a web.config file to use when exporting the project to a foreign machine that doesn't, and cannot have Phalanger installed on it. I am converting the file correctly from PHP into a DLL but I cannot seem to get the web.config file setup correctly to load the website.

Here is a copy of what I have got so far.

Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <configSections>
  <section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
 </configSections>
  <system.webServer>
    <handlers>
      <add name="Phalanger" path="*.php" verb="*" type="PHP.Core.RequestHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
    </handlers>
    <defaultDocument>
      <files>
        <add value="index.php" />
      </files>
    </defaultDocument>
    <httpErrors errorMode="Detailed">
      <clear />
    </httpErrors>
    <phpNet>
      <compiler>
        <set name="EnableStaticInclusions" value="true" />
      </compiler>
      <classLibrary>
        <!--<add assembly="PhpNetMySql, Version=3.0.0.0,Culture=Neutral,PublicKeyToken=2771987119c16a03" section="mysql" />-->
        <add assembly="PhpNetClassLibrary, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb" section="bcl" />
        <add assembly="PhpNetXmlDom, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03" section="dom" />
      </classLibrary>
      <error-control>
        <set name="DisplayErrors" value="false" phpName="display_errors" />
      </error-control>
      <globalization>
        <set name="PageEncoding" value="utf-8" />
      </globalization>
      <!--<bcl>
        <mailer>
          <set name="SmtpServer" value="127.0.0.1" phpName="SMTP" />
          <set name="SmtpPort" value="25" phpName="smtp_port" />
          <set name="DefaultFromHeader" value="info@phpcompiler.net" phpName="sendmail_from" />
        </mailer>
      </bcl>-->
      <system.codedom>
        <compilers>
          <compiler language="PHP" extension=".php" type="PHP.Core.CodeDom.PhpCodeProvider, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" compilerOptions="" />
        </compilers>
      </system.codedom>
      <paths>
        <set name="DynamicWrappers" value=".\Dynamic"/>
        <set name="Libraries" value=".\Bin"/>
        <set name="ExtManager" value=".\Bin"/>
        <set name="ExtWrappers" value=".\Wrappers"/>
        <set name="ExtTypeDefs" value=".\TypeDefs"/>
        <set name="ExtNatives" value=".\Extensions"/>
      </paths>
    </phpNet>
    <system.web>
      <httpHandlers>
        <add verb="*" path="*.php" type="PHP.Core.PageFactory, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
      </httpHandlers>
      <globalization responseEncoding="utf-8" fileEncoding="utf-8" />
      <httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0" />
      <pages validateRequest="false" />
    </system.web>
  </system.webServer>
</configuration>


Thanks for any help.
evbase
 
Posts: 5
Joined: January 13th, 2014, 10:48 pm

Re: Phalanger Free web.config

Postby Jakub Misek » January 18th, 2014, 9:47 am

It seams correct. Whats does the error message say?
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to PHP/ASP.NET Web Applications

Who is online

Users browsing this forum: No registered users and 4 guests

cron

User Control Panel

Login

Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 4 guests