Phalanger and Zendframework

560 views Asked by At

Zend framework is just a collection of PHP classes.

Phalanger is a complete PHP compiler.

So why I can not port Zend Framework-based application to Phalanger??

I got the following error whene I run the app in Phalanger:

line 13:

includePaths.library = APPLICATION_PATH "/../library"

error:

<b>Error</b>: Uncaught exception 'Zend_Config_Exception' with message 'Parse error on line 13' in D:\www\mehr-phalanger\library\Zend\Config\Ini.php:215:13
Stack trace:
#11 : Process
#10 : ProcessRequest
#9 : ProcessRequestNoDemand
#8 : ProcessRequestInternal
#7 : System.Web.IHttpAsyncHandler.BeginProcessRequest
#6 : ResumeSteps
#5 : ExecuteStep
#4 : System.Web.HttpApplication.IExecutionStep.Execute
#3 : <Main>
#2 D:\www\mehr-phalanger\public\index.php(40,1): Zend_Config_Ini->__construct
#1 D:\www\mehr-phalanger\library\Zend\Config\Ini.php(215,13): Zend_Config_Ini->_loadIniFile
#0 D:\www\mehr-phalanger\library\Zend\Config\Ini.php(215,13): Zend_Config_Ini->_parseIniFile
#12 {main}.<br/><br/> 
3

There are 3 answers

5
Mathieu Dumoulin On

Humm, isn't phallanger a translator for PHP => .NET that compiles your source into dotnet code? I might be wrong but i remember trying that out quite some time ago out of curiosity.

EDIT: No i looked it up it's a language library for dotnet. It allows you to code .NET using PHP style syntax. Therefore you won't be able to use ZendFramework in there, you are coding ASP.NET but using PHP syntax. Don't expect anything from php to work in there...

0
Jakub Míšek On

First; you have a syntax error in your code, you miss "." (dot) between APPLICATION_PATH and "/../library"

Second; Phalanger will be able to compile ZendFramework (ZF), however it does not support some functions that ZF uses. You can either report issue https://github.com/devsense/phalanger/issues or take a look on Peachpie (github.com/iolevel/peachpie) which is reincarnation and successor of Phalanger, and report the issue there

0
MassimoB On

you have to use the extended path remove APPLICATION_PATH and put the full directory