Saturday, December 12, 2009

install symfone on ubuntu

Try to install symfony on ubuntu:

Follow the get-started tutorial on symfony's website at:http://www.symfony-project.org/getting-started/1_4/en/02-Prerequisites,

run check_configuration.php in the web browser: http://localhost/check_configuration.php and it threw the following result:
********************************
*                              *
*  symfony requirements check  *
*                              *
********************************

php.ini used by PHP: /etc/php5/apache2/php.ini


** Mandatory requirements **

  OK        PHP version is at least 5.2.4 (5.2.6-3ubuntu4.2)

** Optional checks **

  OK        PDO is installed
[[WARNING]] PDO has some drivers installed: : FAILED
            *** Install PDO drivers (mandatory for Propel and Doctrine) ***
  OK        PHP-XML module is installed
[[WARNING]] XSL module is installed: FAILED
            *** Install the XSL module (recommended for Propel) ***
  OK        The token_get_all() function is available
  OK        The mb_strlen() function is available
  OK        The iconv() function is available
  OK        The utf8_decode() is available
[[WARNING]] A PHP accelerator is installed: FAILED
            *** Install a PHP accelerator like APC (highly recommended) ***
  OK        php.ini has short_open_tag set to off
  OK        php.ini has magic_quotes_gpc set to off
  OK        php.ini has register_globals set to off
  OK        php.ini has session.auto_start set to off
  OK        PHP version is not 5.2.9
To fix the first warning, install PDO package for PHP 5 on ubuntu:
sudo apt-get install libmysqlclient15-dev
sudo pecl install pdo

then got the following message:
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
12 source files, building
running: phpize
sh: phpize: not found
ERROR: `phpize' failed
googled around and found out that need to install php5-dev version, so here we go:
sudo apt-get install php5-dev
sudo pecl install pdo
at the end of the installation, it displayed:
Build process completed successfully
Installing '/usr/include/php/ext/pdo/php_pdo.h'
Installing '/usr/include/php/ext/pdo/php_pdo_driver.h'
Installing '/usr/lib/php5/20060613/pdo.so'
install ok: channel://pecl.php.net/PDO-1.0.3
configuration option "php_ini" is not set to php.ini location
You should add "extension=pdo.so" to php.ini
sudo pecl install pdo_mysql
at the end of installation, it displayed:
Build process completed successfully
Installing '/usr/lib/php5/20060613/pdo_mysql.so'
install ok: channel://pecl.php.net/PDO_MYSQL-1.0.2
configuration option "php_ini" is not set to php.ini location
You should add "extension=pdo_mysql.so" to php.ini
edit php.ini at /etc/php5/apache2/ to add the above 2 lines, restart apache: sudo /etc/init.d/apache2 restart
and check the configuration again in the browser, boo! the first warning is gone!  so far so cool :)
sudo apt-get install php5-xsl
sudo /etc/init.d/apache2 force-reload
then rerun check configuration in browser, yeah, second warning is gone!!!!

to fix the third warning, run:
sudo pecl install apc
and edit php.ini to add 'extension= apc.so', then restart apache2. check the configuration in browser, hola, it's all gone, all the warnings!!!

now can go ahead to have fun with symfony!

1 comment:

Sukhdeep Singh said...

Hey
Nice lad, everything is sorted for symfony

Keep on posting
I also do that
Its very good

Take Care

Sukhi