Page 1 of 1

PhpNetClassLibrary is not loading in .net 64bit ASP.Net 2.0

PostPosted: January 4th, 2013, 10:23 am
by murali
We have an web application, which is using phalanger2.0(manual configuration in machine.config) working fine in all the scenarios like 32bit with .net 4.0 Integrated mode,
32bit with .net 2.0 Integrated mode, and
64bit with .net 4.0 Integrated mode.But 64bit with .net 2.0 Integrated mode is giving problem with PhpNetClassLibrary.Sometime we got error like "Call to undefined function: date_default_timezone_set".
Below is the stack trace error details

" at PHP.Core.ScriptContext.GuardedCall[TData,TResult](Converter`2 routine, TData data, Boolean allowUserExceptions) at PHP.Core.ScriptContext.Include(String relativeSourcePath, Boolean once) at Sas.Misc.initIncludes() at Sas.UserContext.enter() at Sas.UserContext.registerApplication(String appDomain, String caIP) at DRVLoginDemo._Default.doRegister(Object sender, EventArgs e)"

We guess the PhpNetClassLibrary is not loading properly for .net 2.0 in 64bit machine.
The application is working fine all the environments except 64bit windows server2008 R2 with .net 2.0 Integrated mode.
If we enable the option "support 32bit application" to TRUE in IIS and added configurations in 32bit machine.config everyting is working well.

Re: PhpNetClassLibrary is not loading in .net 64bit ASP.Net

PostPosted: January 6th, 2013, 4:58 pm
by Jakub Misek
Hi,

There shouldn't by any difference between 32bit and 64bit. Just ensure you have restarted application pool, and your global configuration files contain the same configuration (machine.config, web.config)
- %WinDir%\Microsoft.NET\Framework\v4.0.30319\Config\
- %WinDir%\Microsoft.NET\Framework64\v4.0.30319\Config\

Thanks!

Re: PhpNetClassLibrary is not loading in .net 64bit ASP.Net

PostPosted: January 7th, 2013, 9:22 am
by murali
Thanks Jakub...,

Our applicaiton is working well in 32 and 64 bit system with .net4.0, but the problem is with 2.0 in 64 bit only.With following system configuraton our application is not working.
Windows Server 2008 64bit
ASP.Net 2.0 Integrated mode(System doesn't have 4.0)
machine.config file path "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG\machine.config"


Thanks,
murali

Re: PhpNetClassLibrary is not loading in .net 64bit ASP.Net

PostPosted: January 7th, 2013, 9:31 am
by Jakub Misek
I would check whether your machine.config contains <classLibrary> configuration section with 'PhpNetClassLibrary' assembly. Previous version of Phalanger 2.0 did not setup 64bit machine.config.

Thanks,

Re: PhpNetClassLibrary is not loading in .net 64bit ASP.Net

PostPosted: January 7th, 2013, 12:11 pm
by murali
Yeah...It is there in machine.config file.This is how my configuration file looks like...And we are using phalanger 2.0 only.
<configuration>
<configSections>
.
.
.

<section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71"></section>
</configSections>
<phpNet>
<paths>
<set name="ExtNatives" value="C:\abc\\Sas"></set>
</paths>
<classLibrary>
<add assembly="PhpNetClassLibrary, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb" section="bcl"></add>
<add section="dom" assembly="PhpNetXmlDom, Version=2.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03"></add>
<add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"></add>
<add assembly="mscorlib"></add>
</classLibrary>
<scriptLibrary>
<!--php source files-->
<add url="C:\abc\\Sas\SasPhp.dll"></add>
</scriptLibrary>
</phpNet>
</configuration>

Re: PhpNetClassLibrary is not loading in .net 64bit ASP.Net

PostPosted: January 7th, 2013, 3:08 pm
by Jakub Misek
Good. I also remember there was a bug in 2.0, so if dynamic wrappers load fails, extensions are not loaded correctly ...

Please try to restart your app pool and delete dynamic wrappers (normally files in \Dynamic\ folder of Phalanger installation, e.g. PhpClassLibrary.dynamic.dll)

Thanks,

Re: PhpNetClassLibrary is not loading in .net 64bit ASP.Net

PostPosted: January 7th, 2013, 3:46 pm
by murali
Thanks Jakub,

In my case dynamic files will create in windows temp folder(It has full permissions.Including IISUser).
We have restarted App pool and deleted dynamic files(Phalanger related only). And we also tried like IISRESET and restarted the machine, but still it was not working. Is there any way to make it work on 64 bit machine with .net2.0?

Thanks,
murali