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

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

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

Postby murali » January 4th, 2013, 10:23 am

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.
murali
 
Posts: 4
Joined: January 4th, 2013, 10:02 am

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

Postby Jakub Misek » January 6th, 2013, 4:58 pm

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!
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

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

Postby murali » January 7th, 2013, 9:22 am

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
murali
 
Posts: 4
Joined: January 4th, 2013, 10:02 am

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

Postby Jakub Misek » January 7th, 2013, 9:31 am

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,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

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

Postby murali » January 7th, 2013, 12:11 pm

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>
murali
 
Posts: 4
Joined: January 4th, 2013, 10:02 am

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

Postby Jakub Misek » January 7th, 2013, 3:08 pm

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,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

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

Postby murali » January 7th, 2013, 3:46 pm

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
murali
 
Posts: 4
Joined: January 4th, 2013, 10:02 am


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 3 guests

cron

User Control Panel

Login

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 151 on December 6th, 2020, 7:46 am

Users browsing this forum: No registered users and 3 guests