I've been trying to get codeigniter working on .Net platform with the use of Phalanger. This is just an test exercise, and I want to actually convert Codeigniter into dll, so that I can remove source code from wwwroot/inetpub folder and just put compiled dll into the web root folder at the time of publishing.
While doing it, I get codeigniter default page running on IIS successfully using phalanger. Then I compiled it using phalanger command, and put all phalanger dll into the bin as described on their wiki. So now I have compiled dll as well source code into the web root. Which is also working fine.
The moment I move source of codeigniter (php files including folder system & application) out of webroot, it stops working. As described on phalanger features, a compiled dll should work but its not working. Instead everytime we access page it is loading it from the php file.
Does any one has any idea how to convert it to dll and host only dll on and not the source code. Or I'm missing something here. Any help in this regard is appreciated.
Phalanger actually loads scripts from bin/WebPages.dll (and additional DLLs specified in configuration). And only if the script is not found in provided DLLs, it looks at filesystem.
The problem can be caused by the fact, it only works within inclusion statements (include,require,include_once,require_once).
File system functions work with filesystem only; and it is common practise in PHP to check for various files existence and content. Mostly to check if configuration is present, plugins are loaded, parse additional comments from script etc.
So you can remove all .php files that are in DLL already, but you should leave these files which CodeIgniter uses through fs functions.