Phalanger on Windows Azure

Discussion about the open-source Phalanger [?] project.

Phalanger on Windows Azure

Postby fabianosimoes » March 22nd, 2013, 8:49 pm

Hello!

I have a web project totally written with PHP and Codeigniter framework.
I won't make any use or integration with C# codes, I just want to improve my site's performance with Phalanger.

The project is a WebSite product from Windows Azure. I want to run Phalanger in this WebSite, but I have to make a standalone installation due to the restrict permissions to change anything on the webserver.

I followed the steps said by the tutorial in Phalanger's page to run the site, but it returns the following message: Could not load file or assembly 'PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71' or one of its dependencies. The system cannot find the file specified.

Obviously, this is a file not found error. But where I must put the phalanger binaries inside my project? I already have a BIN folder with all DLLs and modules needed to run, and I put the paths inside web.config. It looks like the system cannot find the assembly referenced by <configSections>, like this:

Code: Select all
configSections>
      <section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=2.1.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
      
   </configSections>


Assuming that I want to run inside Azure WebSites, what can I do to make it run?

Any help is very welcome. :)
fabianosimoes
 
Posts: 5
Joined: March 19th, 2013, 8:02 pm

Re: Phalanger on Windows Azure

Postby trhodes » May 28th, 2013, 8:53 pm

I have an example of a web.config that works on azure and Phalanger. I have all the phalanger libraries compiled in a the bin folder. phalanger was added to configsections, handlers and phpNet.
Code: Select all
<?xml version="1.0"?>
<configuration>
   <configSections>
      <section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71"/>
   </configSections>
   <appSettings><!-- Default document for mod_mono -->
      <add key="MonoServerDefaultIndexFiles" value="index.php,index.aspx"/>
   </appSettings>
   <system.web>      
      <compilation targetFramework="4.0" debug="true">
         <assemblies>
            <add assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            <add assembly="System.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" />
            <add assembly="MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
            <add assembly="GhostScriptSharp" />
         </assemblies>
      </compilation>
      <globalization responseEncoding="utf-8" fileEncoding="utf-8"/>
      <sessionState
          mode="InProc"
          timeout="30"
          cookieless="UseCookies"
          regenerateExpiredSessionId="True" />
  </system.web>
     <system.webServer>
      <handlers>
         <remove name="Phalanger"/>
         <add name="Phalanger" path="*.php" verb="*" type="PHP.Core.RequestHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71"/>
      </handlers>
      <defaultDocument>
         <files>
            <remove value="index.php"/>
            <add value="index.php"/>
         </files>
      </defaultDocument>
   </system.webServer>
   <phpNet>
      <paths>
         <set name="DynamicWrappers" value="Bin/dynamic"/>
         <set name="Libraries" value="Bin"/>
      </paths>
      <compiler>
         <set name="EnableStaticInclusions" value="true"/>
         <set name="StaticIncludePaths" value="." />      
         <set name="WatchSourceChanges" value="true"/>
         <set name="Debug" value="true" />
      </compiler>
      <classLibrary>
         <add assembly="mscorlib" />
         <add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
         <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
         <add assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
         <add assembly="System.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" />
         <add assembly="PhpNetClassLibrary, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb" section="bcl"/>
         <add assembly="PhpNetMySql, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03" section="mysql" />
         <add assembly="PhpNetPDO, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03" />
         <add assembly="MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
      </classLibrary>
      <request-control>
         <set name="ExecutionTimeout" value="120" phpName="max_execution_time"/>
      </request-control>
      <error-control>
         <set name="DisplayErrors" value="true" phpName="display_errors"/>
      </error-control>
      <globalization>
         <set name="PageEncoding" value="utf-8"/>
      </globalization>
      <posted-files>
         <set name="Accept" value="true" phpName="file_uploads"/>
      </posted-files>
   </phpNet>
</configuration>
trhodes
 
Posts: 9
Joined: October 14th, 2012, 2:22 am


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 28 guests

cron

User Control Panel

Login

Who is online

In total there are 28 users online :: 0 registered, 0 hidden and 28 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 28 guests