This is mainly for my own record. I’ve been playing with the Symfony PHP framework to see if it’s suitable for a new project I’m working on, but had a little bit of trouble getting it working on my 1&1 shared server.
The first problem was fairly easy to fix – the default version of PHP on the server is 4, but symfony needs 5.0+. A quick entry into the .htaccess file for the site fixes this. Add “AddType x-mapp-php5 .php ” and all is well. It’s a pain to have to remember to type “php5 symfony”to get things working, but no big stress.
The next issue is to get the images to show up in the test index.php page. I installed symfony using the PEAR packages, so the symfony_data/web/sf directory wasn’t visible as it was way outside the web root for the domain. A simple link fixed that. First, I needed to get the directory for my php/symfony data directory using the pear5 comand
> pear5 config-show
Configuration (channel pear.php.net):
=====================================
<snip>
PEAR executables directory bin_dir /kunden/homepages/18/d96003440/htdocs/local/bin
PEAR documentation directory doc_dir /kunden/homepages/18/d96003440/htdocs/local/lib/php/docs
PHP extension directory ext_dir /kunden/homepages/18/d96003440/htdocs/pear/ext
PEAR directory php_dir /kunden/homepages/18/d96003440/htdocs/local/lib/php
PEAR Installer cache directory cache_dir /kunden/homepages/18/d96003440/htdocs/pear/cache
PEAR data directory data_dir /kunden/homepages/18/d96003440/htdocs/local/lib/php/data
<snip>
Next I created a link in the web directory for my new application to the symfony web/sf/ directory in my applications web directory (the bolded one above):
cd web
ln -s /kunden/homepages/18/d96003440/htdocs/local/lib/php/data/symfony/web/sf/
Hit the URL http://www.servername/app/web/app_dev.php and all was well. Now to crack on with some development.


