If you encounter problems during the installation, try to make the best out of the errors or exceptions thrown to the shell or to the browser. They are often self-explanatory and may even contain links to specific resources on the Web about your issue.

3.5.1. Typical Problems

If you are still having problems getting symfony running, check the following:

  • Some PHP installations come with both a PHP 4 and a PHP 5 command. In that case, the command line is probably php5 instead of php, so try calling php5 symfony instead of the symfony command. You may also need to add SetEnv PHP_VER 5 to your .htaccess configuration, or rename the scripts of the web/ directory from .php to .php5. The error thrown by a PHP 4 command line trying to access symfony looks like this:
Parse error, unexpected ',', expecting '(' in .../symfony.php on line 19.
  • The memory limit, defined in the php.ini, must be set to 16M at least. The usual symptom for this problem is an error message when installing symfony via PEAR or using the command line.
Allowed memory size of 8388608 bytes exhausted
  • The zend.ze1_compatibility_mode setting must be set to off in your php.ini. If it is not, trying to browse to one of the web scripts will produce an "implicit cloning" error:
Strict Standards: Implicit cloning object of class 'sfTimer'because of 'zend.ze1_compatibility_mode'
  • The log/ and cache/ directories of your project must be writable by the web server. Attempts to browse a symfony application without these directory permissions will result in an exception:
sfCacheException [message] Unable to write cache file"/usr/myproject/cache/frontend/prod/config/config_config_handlers.yml.php"
  • The include path of your system must include the path to the php command, and the include path of your php.ini must contain a path to PEAR (if you use PEAR).
  • Sometimes, there is more than one php.ini on a server's file system (for instance, if you use the WAMP package). Call phpinfo() to know the exact location of the php.ini file used by your application.

Note Although it is not mandatory, it is strongly advised, for performance reasons, to set the magic_quotes_gpc and register_globals settings to off in your php.ini.

3.5.2. Symfony Resources

You can check if your problem has already happened to someone else and find solutions in various places:

If you don't find any answer, try posing your question to the symfony community. You can post your query in the forum, the mailing list, or even drop to the #symfony IRC channel to get feedback from the most active members of the community.