Symfony 2.8.1 error after installation

nitneroc

I am using Symfony 2.8.1 and work on Windows 8 with WAMP Server 2, Apache 2.4.2 and PHP 5.4.3 I have installed Symfony with the command tool with success, but when I try to access the url http://localhost/Symfony/web/app_dev.php/ I get this error message :

FatalErrorException in ProxyGenerator.php line 62: Parse Error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING)

Then this list of errors :

in ProxyGenerator.php line 62
at DebugClassLoader->loadClass() in EntityManager.php line 0
at ProxyFactory->__construct() in EntityManager.php line 166
at EntityManager->__construct() in EntityManager.php line 850
at EntityManager::create() in appDevDebugProjectContainer.php line 605
at appDevDebugProjectContainer->getDoctrine_Orm_DefaultEntityManagerService() in Container.php line 312
at Container->get() in classes.php line 6695
at ManagerRegistry->getService() in classes.php line 6665
at AbstractManagerRegistry->getManagers() in DoctrineDataCollector.php line 65
at DoctrineDataCollector->collect() in Profiler.php line 218
at Profiler->collect() in ProfilerListener.php line 128
at ProfilerListener->onKernelResponse() in WrappedListener.php line 61
at call_user_func() in WrappedListener.php line 61
at WrappedListener->__invoke() in classes.php line 1853
at call_user_func() in classes.php line 1853
at EventDispatcher->doDispatch() in classes.php line 1771
at EventDispatcher->dispatch() in TraceableEventDispatcher.php line 132
at TraceableEventDispatcher->dispatch() in HttpKernel.php line 179
at HttpKernel->filterResponse() in HttpKernel.php line 161
at HttpKernel->handleRaw() in HttpKernel.php line 62
at HttpKernel->handle() in ContainerAwareHttpKernel.php line 69
at ContainerAwareHttpKernel->handle() in Kernel.php line 185
at Kernel->handle() in app_dev.php line 30
at {main}() in app_dev.php line 0

On line 62 of ProxyGenerator.php :

protected $placeholders = [
    'baseProxyInterface'   => Proxy::class,
    'additionalProperties' => '',
];

The issue seems to be this :

Proxy::class

When I change it into that :

'Doctrine\Common\Proxy\Proxy'

It works !

I'd like to know what's happening and if the change I made is a solution for real.

Any thoughts ? Thanks.

tchap

This is a PHP version problem. You need at least PHP 5.5.

It's because ProxyGenerator uses the static class keyword for class name resolution.

So, update your Wamp server to something where PHP > 5.5 and you should be good to go !

Source : https://secure.php.net/manual/en/language.oop5.basic.php#language.oop5.basic.class.class

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Xcode 8 beta 2 installation error

From Dev

403 Forbidden error after symfony 2 reinstall

From Dev

Error in the fresh symfony installation

From Dev

Error with Symfony installation

From Dev

Symfony 2: "No route found for "GET /" - error on fresh installation

From Java

Symfony 4.4 Error on FOSUserBundle Installation

From Dev

sparklyr - error after installation

From Dev

rpy2 installation error on Windows 8 (Anaconda)

From Dev

Apache 2 error and phpmyadmin not working after installation on Ubuntu 14.04

From Dev

Symfony2 throw form error after binding

From Dev

Symfony2 throw form error after binding

From Dev

Symfony2 mongodb installation

From Dev

Trouble with symfony2 installation

From Dev

Symfony 4 - No route found after installation on Mac

From Dev

psr4 changes after upgrade have class not found symfony 2,4 -> 2,8

From Dev

error after installation of netbeans 7.3.1

From Dev

Error after android studio Installation?

From Dev

Error Installing symfony 2

From Dev

Ionic installation after Ionic2 installation

From Dev

cant use Netbeans console after installing new bundle in Symfony2 (error: Symfony2 console must be selected)

From Dev

Symfony2 fail during installation

From Dev

Installation of symfony2 in ubuntu14.04

From Dev

Unable to boot Windows 8 after Ubuntu installation

From Dev

Change the Windows 8 product key after installation?

From Dev

Unable to boot Windows 8 after Ubuntu installation

From Dev

Windows 8 not loading after Ubuntu 13.10 installation

From Dev

No IUserTokenProvider is registered error after update identity 1 to 2

From Dev

Error after upgrading android studio 1 to 2 , won't launch 

From Dev

Symfony2+Doctrine: How to convert iso8859-1 to utf-8 and viceversa?

Related Related

  1. 1

    Xcode 8 beta 2 installation error

  2. 2

    403 Forbidden error after symfony 2 reinstall

  3. 3

    Error in the fresh symfony installation

  4. 4

    Error with Symfony installation

  5. 5

    Symfony 2: "No route found for "GET /" - error on fresh installation

  6. 6

    Symfony 4.4 Error on FOSUserBundle Installation

  7. 7

    sparklyr - error after installation

  8. 8

    rpy2 installation error on Windows 8 (Anaconda)

  9. 9

    Apache 2 error and phpmyadmin not working after installation on Ubuntu 14.04

  10. 10

    Symfony2 throw form error after binding

  11. 11

    Symfony2 throw form error after binding

  12. 12

    Symfony2 mongodb installation

  13. 13

    Trouble with symfony2 installation

  14. 14

    Symfony 4 - No route found after installation on Mac

  15. 15

    psr4 changes after upgrade have class not found symfony 2,4 -> 2,8

  16. 16

    error after installation of netbeans 7.3.1

  17. 17

    Error after android studio Installation?

  18. 18

    Error Installing symfony 2

  19. 19

    Ionic installation after Ionic2 installation

  20. 20

    cant use Netbeans console after installing new bundle in Symfony2 (error: Symfony2 console must be selected)

  21. 21

    Symfony2 fail during installation

  22. 22

    Installation of symfony2 in ubuntu14.04

  23. 23

    Unable to boot Windows 8 after Ubuntu installation

  24. 24

    Change the Windows 8 product key after installation?

  25. 25

    Unable to boot Windows 8 after Ubuntu installation

  26. 26

    Windows 8 not loading after Ubuntu 13.10 installation

  27. 27

    No IUserTokenProvider is registered error after update identity 1 to 2

  28. 28

    Error after upgrading android studio 1 to 2 , won't launch 

  29. 29

    Symfony2+Doctrine: How to convert iso8859-1 to utf-8 and viceversa?

HotTag

Archive