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
php, so try calling
php5 symfonyinstead of the
symfonycommand. You may also need to add
SetEnv PHP_VER 5to your
.htaccessconfiguration, or rename the scripts of the
.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
32Mat 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
zend.ze1_compatibility_modesetting must be set to
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'
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
phpcommand, and the include path of your
php.inimust contain a path to PEAR (if you use PEAR).
Sometimes, there is more than one
php.inion a server's file system (for instance, if you use the WAMP package). Call
phpinfo()to know the exact location of the
php.inifile used by your application.
Note Although it is not mandatory, it is strongly advised, for performance reasons, to set the
register_globals settings to
off in your
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 (http://www.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 (http://groups.google.fr/group/symfony-users) are also searchable. You may find similar experiences to your own there.
- The symfony wiki (http://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.