Frequently Asked Questions
- Problem installating symfony
- Memory problem when installing symfony via PEAR
- I can't see pages that require access to a database
- My YAML configuration file doesn't work
- The symfony command produces strange errors when processing the schema.xml …
- Apache throws a "500 Internal Server Error" when trying to browse a …
- Apache throws a "Access forbidden (Error 403)" when trying to browse a …
- Using symfony propel-foo-bar commands, an error "Failed opening pear.php" …
- I get this error: "Oops! There was an internal server error. 500 Error : …
- What if I still have questions?
Problem installating symfony
If you have problem installating symfony or cannot launch the symfony command line program, check you have zend.ze1_compatibility_mode set to Off in your php.ini.
Memory problem when installing symfony via PEAR
pear install symfony/symfony Fatal error: Allowed memory size of XXXXXX bytes exhausted (tried to allocate 39 bytes) in /usr/share/php/PEAR/XMLParser.php on line 133 Allowed memory size of XXXXXX bytes exhausted (tried to allocate 23 bytes)
If you have this error message, you must increase the memory_limit in php.ini. An other solution I found to this problem, which does not require to edit php.ini is: PHP_PEAR_PHP_BIN='/usr/bin/php5 -d memory_limit=32M export PHP_PEAR_PHP_BIN
I can't see pages that require access to a database
If pages that require connection to a database produces the following error:
!PropelException: No connection params set::
Be sure that the database name in your schema.xml is set to 'symfony'
(http://www.symfony-project.com/content/book/page/model.html Symfony model - XML Data Model])
My YAML configuration file doesn't work
YAML files can be wrongly interpreted if the values contain special characters (such as slashes, colons, etc.). To avoid errors, enclose the value in single quotes, by changing:
namespace: key: that's an incorrect value ! 100% chance to cause an error
to:
namespace: key: 'that''s an incorrect value ! 100% chance to cause an error'
In addition, tabulations are forbidden in YAML files. Always use double spaces instead of tabulation.
Check more about the YAML syntax here.
HINT: If you're using Vim as your editor, consider putting something like:
au BufNewFile,BufRead *.yml set expandtab
in your .vimrc file. When you tabulate, spaces will be inserted instead of tabs. This has saved me lots of frustration from my tabbing 'force of habit'.
The symfony command produces strange errors when processing the schema.xml file
Check that in the project's config directory are no other .xml files. The propel generator invoked from the symfony command processes all files ending in schema.xml files, not only the schema.xml file it should.
Apache throws a "500 Internal Server Error" when trying to browse a symfony project
Apache may not have been configured to load mod_rewrite module. Check if this line exists and is uncommented in httpd.conf file:
LoadModule rewrite_module modules/mod_rewrite.so
Also, if your server is running PHPSUEXEC, you will receive a "500 Internal Server Error" if the permissions on your files and directories in your 'web' directory are more than 755. In other words, you cannot have files and directories in your web directory that are 'group or world writable' with PHPSUEXEC. Please read this article for more information: http://trac.symfony-project.com/wiki/SymfonyPHPsuexec and also this long forum thread: http://www.symfony-project.org/forum/index.php/m/43604/#msg_43604
Apache throws a "Access forbidden (Error 403)" when trying to browse a symfony project
Some Apache installations are pre-configured for restrictive access control on directories by default. You may need to use the directive "Allow from all" in the <directory /> directive in httpd.conf
Example:
<Directory "C:\xampp\php\pear\data\symfony\web\sf"> Allow from All </Directory> <VirtualHost *:80> ServerName askeet DocumentRoot "C:\web\askeet\web" DirectoryIndex index.php Alias /sf "C:\xampp\php\pear\data\symfony\web\sf" <Directory "C:\web\askeet\web"> AllowOverride All #Override default restrictive access control(i.e Deny from all) on directory Allow from All </Directory> </VirtualHost>
Using symfony propel-foo-bar commands, an error "Failed opening pear.php" is raised
For any symfony installation (including the sandbox), PEAR is still needed by the phing library which the propel generator commands make use of. So you should install PEAR for a development environment where you want to use propel generator/build commands.
I get this error: "Oops! There was an internal server error. 500 Error : internal server". What to do?
This error is thrown by symfony (not the web server) when there has been a fatal error thrown by PHP. Production front-controller (index.php) hides any error messages and shows this generic message. To be able to learn what the real error is, you should browse to the development front-controller (yourapp_dev.php). If you did an initial checkout from a subversion repository, be sure to fix permissions. This can be done by going to the project's base directory and typing symfony fix-perms.
What if I still have questions?
The message forum is a good place to get more information. Be sure to search the forums before asking as someone else may already have a solution.