Question

Thanks for your time,

I am learning how to run and use Symfony 2 using this: http://www.anilsagar.com/content/symfony2-tutorial-part-2-how-install-symfony2-linux-ubuntu-operating-system

You can see there Is nothing relevant or a problem. In fact, I can even see the default config dashboard. The problem is in the config screen because Symfony recommends to active PHP Accelerator and to disable short_open_tag flags. The short_open_tag can be disabled without noticeable problems but I cannot active PHP Accelerator using the XAMPP instructions from its faq: http://www.apachefriends.org/en/faq-xampp-linux.html#mmcache

The faq says that uncommenting this in the php.ini file will enable PHP Accelerator:

;extension="eaccelerator.so"
;eaccelerator.shm_size="16"
;eaccelerator.cache_dir="/opt/lampp/tmp/eaccelerator"
;eaccelerator.enable="1"
;eaccelerator.optimizer="1"
;eaccelerator.check_mtime="1"
;eaccelerator.debug="0"
;eaccelerator.filter=""
;eaccelerator.shm_max="0"
;eaccelerator.shm_ttl="0"
;eaccelerator.shm_prune_period="0"
;eaccelerator.shm_only="0"
;eaccelerator.compress="1"
;eaccelerator.compress_level="9"

So I uncomment it:

; disabled in XAMPP 1.7.2 because incompatible with PHP 5.3.0
extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/opt/lampp/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

But... it does not work. When I run any XAMPP page or symfony config page it returns the PHP file or something I do not understand!! (?).

You can see the text over the uncommented code in php.ini:

; disabled in XAMPP 1.7.2 because incompatible with PHP 5.3.0

But the version of XAMPP I am using use PHP +5.4

Thanks for your time.

PS: I am using Symfony 2, the latest version available right now 2.1.3 and XAMPP 1.8.1; All running under Ubuntu 12.04.

Was it helpful?

Solution

If you are using eAccelerator, then you WILL have problems, probably with Doctrine. The reason is eAccelerator removes annotations from the code!!! As you may know, annotations play an essential role in Symfony2 and Doctrine. Either deactivate eAccelerator or install a different one. Take a look at: http://wildlyinaccurate.com/eaccelerator-and-doctrine-2

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top