Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Saturday, September 10, 2011

Installing LAMP on Ubuntu 11.04

Followed the instructions in this link to install LAMP.
If you get this message while restarting apache - “apache2: Could not determine the server’s fully qualified domain name, using 127.0.0.1 for localhost”
Type this in the terminal to fix the problem:
echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn

and reload apache
sudo /etc/init.d/apache2 reload

Saturday, August 20, 2011

Brain food - PHP, mySQL, Apache stuff

Here are some common tasks that a newbie in PHP needs to memorize:

Restarting Apache, after doing some tweaks
sudo /etc/init.d/apache2 reload

Editing the php.ini file
sudo nano /etc/php5/apache2/php.ini

php.ini to display errors, for the development web server:
After opening the php.ini file for editing, scroll down to the Error handling and logging section.

Comment out the error_reporting = ... line, copy-paste it to a new line, and change it to:
error_reporting = E_ALL

Scroll down further to the line display_errors = ... and change it to:
display_errors = On

Accessing mySQL at the command-line:
mysql --user=root --password={root's password]