Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Quercus

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2011, 09:39 PM
subsven subsven is offline
Junior Member
 
Join Date: Aug 2011
Posts: 1
Question Quercus and Symfony2

Hi,

I'm trying to run the Symfony2 Standard Edition (see http://symfony.com/download) under Quercus using Resin 4.0.20, but I'm getting some errors (when calling web/app_dev.php)
  • $foo = new static(); is allowed in PHP 5.3 (late static binding), but Quercus stops with the error message 'static' is an unexpected token, expected an expression.
  • spl_autoload_register() allows three parameters in PHP 5.3, but spl_autoload_register(array($this, 'loadClass'), true, $prepend); leads to the error message Warning: function 'spl_autoload_register' called with 3 arguments, but only expects 1 arguments
  • When using namespaced classes, some standard namespace-less classes like Exception have to be references with a leading backslash (to distinguish between a namespace-less class and a class with the same name in the current namespace), however public function handle(\Exception $exception) leads to the error message namespace identifier is not allowed at '\Exception' in ...

Are these known errors of Quercus/Resin 4.0.20?

I tried to work around the "new static()" errors by using "new self()" or "new CLASSNAME()" (which isn't of course the same in all cases) and calling spl_autoload_register() with just one parameter, but changing from function ...(\Exception ...) to function ...(Exception ...) gave me the following backtrace:

500 Servlet Exception


[show] com.caucho.quercus.env.QuercusLanguageException: ObjectExtValue@2082867241[ErrorException]

com.caucho.quercus.env.QuercusLanguageException: ObjectExtValue@2082867241[ErrorException]
at com.caucho.quercus.env.Value.toException(Value.jav a:845)
at com.caucho.quercus.statement.ThrowStatement.execut e(ThrowStatement.java:59)
at com.caucho.quercus.statement.IfStatement.execute(I fStatement.java:84)
at com.caucho.quercus.statement.BlockStatement.execut e(BlockStatement.java:105)
at com.caucho.quercus.program.Function.callImpl(Funct ion.java:433)
at com.caucho.quercus.program.Function.callMethod(Fun ction.java:469)
at com.caucho.quercus.function.AbstractFunction.callM ethod(AbstractFunction.java:710)
at com.caucho.quercus.env.ObjectExtValue.callMethod(O bjectExtValue.java:883)
at com.caucho.quercus.env.CallbackObjectMethod.call(C allbackObjectMethod.java:131)
at com.caucho.quercus.env.Env.error(Env.java:6454)
at com.caucho.quercus.env.Env.error(Env.java:6407)
at com.caucho.quercus.env.Env.error(Env.java:6055)
at com.caucho.quercus.env.Env.uncaughtExceptionError( Env.java:3923)
at com.caucho.quercus.env.Env.executeTop(Env.java:390 5)
at com.caucho.quercus.servlet.QuercusServletImpl.serv ice(QuercusServletImpl.java:189)
at com.caucho.quercus.servlet.QuercusServlet.service( QuercusServlet.java:594)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:96)
at com.caucho.server.dispatch.ServletFilterChain.doFi lter(ServletFilterChain.java:109)
at com.caucho.server.webapp.WebAppFilterChain.doFilte r(WebAppFilterChain.java:156)
at com.caucho.server.webapp.AccessLogFilterChain.doFi lter(AccessLogFilterChain.java:95)
at com.caucho.server.dispatch.ServletInvocation.servi ce(ServletInvocation.java:287)
at com.caucho.server.http.HttpRequest.handleRequest(H ttpRequest.java:811)
at com.caucho.network.listen.TcpSocketLink.dispatchRe quest(TcpSocketLink.java:1186)
at com.caucho.network.listen.TcpSocketLink.handleRequ est(TcpSocketLink.java:1148)
at com.caucho.network.listen.TcpSocketLink.handleRequ estsImpl(TcpSocketLink.java:1132)
at com.caucho.network.listen.TcpSocketLink.handleRequ ests(TcpSocketLink.java:1055)
at com.caucho.network.listen.TcpSocketLink.handleAcce ptTask(TcpSocketLink.java:903)
at com.caucho.network.listen.AcceptTask.doTask(Accept Task.java:74)
at com.caucho.network.listen.ConnectionTask.runThread (ConnectionTask.java:97)
at com.caucho.network.listen.ConnectionTask.run(Conne ctionTask.java:80)
at com.caucho.network.listen.AcceptTask.run(AcceptTas k.java:59)
at com.caucho.env.thread.ResinThread.runTasks(ResinTh read.java:164)
at com.caucho.env.thread.ResinThread.run(ResinThread. java:130)

Resin/4.0.20 Server: 'default'


All kinds of tips and tricks are greatly appreciated! :-)

Regards,

Sven
Reply With Quote
  #2  
Old 08-27-2012, 04:02 PM
puentesdiaz puentesdiaz is offline
Junior Member
 
Join Date: Aug 2012
Posts: 7
Default Same for Symgony 2.1

the people of caucho, must see this... Symfony 2 is the basis fo DRUPAL 8
Reply With Quote
  #3  
Old 08-27-2012, 08:58 PM
nam nam is offline
Administrator
 
Join Date: Aug 2009
Posts: 337
Default

Hi,

The "new static()" problem was fixed for 4.0.30. We're in the process of going through Symfony and fixing issues as we encounter them.
Reply With Quote
  #4  
Old 08-28-2012, 08:50 PM
puentesdiaz puentesdiaz is offline
Junior Member
 
Join Date: Aug 2012
Posts: 7
Default great news

hi nam... these is a great new...

remember that symfony2.1 need PHP 5.3.3
and symfony 2.0.x need PHP 5.3.2

source: https://github.com/symfony/symfony/b...ster/README.md

Requirements

Symfony2 is only supported on PHP 5.3.3 and up.

Be warned that PHP versions before 5.3.8 are known to be buggy and might not work for you:

before PHP 5.3.4, if you get "Notice: Trying to get property of non-object", you've hit a known PHP bug (see https://bugs.php.net/bug.php?id=52083 and https://bugs.php.net/bug.php?id=50027);

before PHP 5.3.8, if you get an error involving annotations, you've hit a known PHP bug (see https://bugs.php.net/bug.php?id=55156).



i'm develop a application over symfony 2.1, if you want test new release of resin for PHP5.3.3, i can do it....

cheers
Reply With Quote
  #5  
Old 08-28-2012, 09:01 PM
puentesdiaz puentesdiaz is offline
Junior Member
 
Join Date: Aug 2012
Posts: 7
Default testin symfony 2.0.17 with resin 4.0.30

the check file say:






/home/rober/Descargas/resin-4.0.30/webapps/ROOT/2-0-17/vendor/symfony/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php:31: Warning: can't find class CallbackObjectMethod[Symfony\Component\ClassLoader\UniversalClassLoader [Symfony\Component\ClassLoader\spl_autoload_unregis ter]

/home/rober/Descargas/resin-4.0.30/webapps/ROOT/2-0-17/vendor/symfony/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php:31: Warning: Callable: 'CallbackObjectMethod[Symfony\Component\ClassLoader\UniversalClassLoader ::loadClass]' is not a valid callable argument [Symfony\Component\ClassLoader\spl_autoload_unregis ter]

/home/rober/Descargas/resin-4.0.30/webapps/ROOT/2-0-17/vendor/symfony/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php:31: Warning: can't find class CallbackObjectMethod[Swift [Symfony\Component\ClassLoader\spl_autoload_unregis ter]

/home/rober/Descargas/resin-4.0.30/webapps/ROOT/2-0-17/vendor/symfony/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php:31: Warning: Callable: 'CallbackObjectMethod[Swift::autoload]' is not a valid callable argument [Symfony\Component\ClassLoader\spl_autoload_unregis ter]

/home/rober/Descargas/resin-4.0.30/webapps/ROOT/2-0-17/vendor/symfony/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php:45: Warning: can't find class CallbackObjectMethod[Symfony\Component\ClassLoader\UniversalClassLoader [Symfony\Component\ClassLoader\spl_autoload_registe r]

/home/rober/Descargas/resin-4.0.30/webapps/ROOT/2-0-17/vendor/symfony/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php:45: Warning: Callable: 'CallbackObjectMethod[Symfony\Component\ClassLoader\UniversalClassLoader ::loadClass]' is not a valid callable argument [Symfony\Component\ClassLoader\spl_autoload_registe r]

/home/rober/Descargas/resin-4.0.30/webapps/ROOT/2-0-17/vendor/symfony/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php:45: Warning: can't find class CallbackObjectMethod[Swift [Symfony\Component\ClassLoader\spl_autoload_registe r]

/home/rober/Descargas/resin-4.0.30/webapps/ROOT/2-0-17/vendor/symfony/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php:45: Warning: Callable: 'CallbackObjectMethod[Swift::autoload]' is not a valid callable argument [Symfony\Component\ClassLoader\spl_autoload_registe r]

/home/rober/Descargas/resin-4.0.30/webapps/ROOT/2-0-17/vendor/symfony/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php:44: Fatal Error: 'Symfony\Component\HttpKernel\Debug\static' is an unknown class name.
Reply With Quote
Reply

Tags
errors, symfony, symfony2

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:03 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.