Trying to run Joomla 3.0 on Phalanger - several errors
Posted: December 23rd, 2014, 3:22 am
Hi.
We're evaluating Phalanger and we're interested specifically in running Joomla on top of it, and deploy to Linux servers via Mono.
As a proof of concept, I performed these steps:
From the official PHP documentation I can see that these function calls seem to be correct, since many of the parameters are optional:
http://php.net/manual/en/function.strea ... create.php
http://php.net/manual/en/function.copy.php
http://php.net/manual/en/function.rename.php
for example, copy() and rename() both accept an optional $resource parameter according to PHP documentation, but Phalanger's Intellisense support doesn't show that extra parameter, and it fails to build.
Question 1: Can you help me overcome these issues? we're very interested in integrating .Net and Joomla and it's very likely that we will acquire licenses for the Tools if we manage to get this integration running.
Question 2: Is Mono supported? We also need to host on Linux servers, therefore it's important for us that Mono is supported. We'd be using Mono 3.8 (latest one).
Question 3: Are there any plans to port Phalanger to .Net Core? is this even feasible? We need to plan for the long run and this information is also important in making a decision.
Question 4: Is there any way to set the .Net Framework version and the PHP language version in a Phalanger project? We've had issues with our existing Joomla sites if we changed PHP to version 5.4, so we'd like to stick to 5.3 for the moment if possible. Also, support for .Net 4.5 or greater is highly desired, since we have a lot of existing code in the form of Portable Class Libraries targeting .Net 4.5
Thanks in advance
We're evaluating Phalanger and we're interested specifically in running Joomla on top of it, and deploy to Linux servers via Mono.
As a proof of concept, I performed these steps:
- 1 - installed Phalanger & Visual Studio Tools (from Tools -> Extension and Updates menu option in VS)
- 2 - Created a new Phalanger project (using File -> New Project -> Phalanger -> Empty Web Application (Standard))
- 3 - Added all files from a vanilla Joomla 3.0 site (using Solution Explorer -> Include In Project menu option)
- 4 - attempted to build, and got 2 compile errors about undeclared class members (which are to be expected since PHP is untyped and Phalanger is not), this is not a problem at all and I managed to fix it perfectly.
- 5 - After clearing out the above, I managed to successfully build the project, but trying to run it throws a PhpException in the very first line of PHP code found in Joomla's index.php file:
- 6 - After some searching I came by http://support.devsense.com/viewtopic.php?f=3&t=1054&p=4871&hilit=call+to+undefined+function#p4871 and added the following to the project's web.config file:
- Code: Select all
<configSections>
<section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
</configSections>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="Phalanger"/>
</assemblyBinding>
</runtime>
<phpNet>
<classLibrary>
<add assembly="PhpNetClassLibrary, Version=4.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb" section="bcl" />
<add assembly="PhpNetXmlDom, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03" section="dom"/>
</classLibrary>
</phpNet>
- 7 - After that, I get several compilation errors about invalid argument counts in several PHP function calls:
- Code: Select all
//stream.php - Line 1024
$retval = @stream_context_set_option($this->fh, $this->contextOptions);
//stream.php - Line 1190:
$res = @copy($src, $dest, $context);
//stream.php - Line 1195:
$res = @copy($src, $dest, $this->context);
//stream.php - Line 1244:
$res = @rename($src, $dest, $context);
//stream.php - Line 1249:
$res = @rename($src, $dest, $this->context);
//input.php - Line 691:
$trans_tbl = get_html_translation_table(HTML_ENTITIES, ENT_COMPAT, 'ISO-8859-1');
These are the affected lines of code:
From the official PHP documentation I can see that these function calls seem to be correct, since many of the parameters are optional:
http://php.net/manual/en/function.strea ... create.php
http://php.net/manual/en/function.copy.php
http://php.net/manual/en/function.rename.php
for example, copy() and rename() both accept an optional $resource parameter according to PHP documentation, but Phalanger's Intellisense support doesn't show that extra parameter, and it fails to build.
Question 1: Can you help me overcome these issues? we're very interested in integrating .Net and Joomla and it's very likely that we will acquire licenses for the Tools if we manage to get this integration running.
Question 2: Is Mono supported? We also need to host on Linux servers, therefore it's important for us that Mono is supported. We'd be using Mono 3.8 (latest one).
Question 3: Are there any plans to port Phalanger to .Net Core? is this even feasible? We need to plan for the long run and this information is also important in making a decision.
Question 4: Is there any way to set the .Net Framework version and the PHP language version in a Phalanger project? We've had issues with our existing Joomla sites if we changed PHP to version 5.4, so we'd like to stick to 5.3 for the moment if possible. Also, support for .Net 4.5 or greater is highly desired, since we have a lot of existing code in the form of Portable Class Libraries targeting .Net 4.5
Thanks in advance