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 ofphp
, so try callingphp5 symfony
instead of thesymfony
command. You may also need to addSetEnv PHP_VER 5
to your.htaccess
configuration, or rename the scripts of theweb/
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 to16M
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 tooff
in yourphp.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/
andcache/
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 yourphp.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). Callphpinfo()
to know the exact location of thephp.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:
- The symfony installation forum (symfony-project.org/forum/) is full of installation questions about a given platform, environment, configuration, host, and so on.
- The archives of the users mailing-list (groups.google.com/group/symfony-users) are also searchable. You may find similar experiences to your own there.
- The symfony wiki (trac.symfony-project.org/#Installingsymfony) contains step-by-step tutorials, contributed by symfony users, about installation.
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.