Got a DLL, not sure what to do next

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

Got a DLL, not sure what to do next

Postby fromin » February 15th, 2015, 7:42 pm

Pardon my ignorance, I've been a PHP developer for 10 years, but know absolutely nothing about .NET, so even with the help of the documentation, I wasn't able to figure this out.

I would like to use Phalanger as a way to protect my commercial script's source cod.

Is it possible to generate a CGI executable so that the DLL behaves as the original project or am I completely misunderstanding something here?

If it is possible, how? If not, what is the easiest way to get it working (obviously I need a standalone file which doesnt require any server modifications, since it's a script that will be used on many various webhosts, some of which will not allow any uncommon configuration modifications)?
fromin
 
Posts: 2
Joined: February 15th, 2015, 7:34 pm

Re: Got a DLL, not sure what to do next

Postby Jakub Misek » February 16th, 2015, 1:12 pm

Hello,

It is possible to build .NET DLL without PHP source files; as console EXE application or as ASP.NET web site (to be used on IIS web server).

In addition to your compiled code, you have to bundle it with Phalanger runtime DLLs.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2081
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Got a DLL, not sure what to do next

Postby fromin » February 17th, 2015, 9:33 am

Thank you. I was actually able to build EXE for "hello world!", rename it from .exe to .cgi and ran it in browser, but it takes insanely long to execute the script (300 ms for "hello world" in CGI when compared to 4 ms in PHP). Is there anything I can do about it?
fromin
 
Posts: 2
Joined: February 15th, 2015, 7:34 pm

Re: Got a DLL, not sure what to do next

Postby Jakub Misek » February 22nd, 2015, 9:32 am

I would not rename file extensions ... anyway, this approach results in EXE being started for every web request over and over ... since .NET (and so Phalanger) has significant overhead during startup, you'll experience long page load.

Phalanger performs best when you build regular web project on top of ASP.NET and IIS Integrated Pipeline (ASP.NET 4 default). In this way, you'll have single DLL with all the .php script files which you can, together with web.config and Phalanger runtime binaries, deploy anywhere on IIS.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2081
Joined: January 4th, 2012, 2:42 pm
Location: Prague


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 89 on October 15th, 2018, 4:06 pm

Users browsing this forum: No registered users and 3 guests
Phalanger