Logo

PHP config

Posted under » PHP » Ubuntu on 13 March 2009

You do the config by changing the php.ini.

You may want to adjust error reporting. If you are on development server its ok to see the messages, otherwise.. turn it off.

error_reporting = E_ALL & ~E_NOTICE

Sometimes you will find your php scripts not working after you move the files from your development server to live. Other than using different versions of PHP which I think its quite obvious, some difference is a matter of configurations which may vary from one server from another. You can change all these from your PHP.ini file.

//short_open_tag = Off 

its kinda irritating if you leave it on and quotes appear when you don't want them.

magic_quotes_gpc = Off
In Ubuntu, the memory is set to 16mb. This is insufficient for most web server work.
memory_limit = 32M  

Don't forget to install some useful php libraries like...

apt-get install php5-gd
apt-get install php5-mcrypt