Category Archives: Development
Ubuntu: Create a virtual host
# sudo vi /etc/apache2/sites-available/yourdomain.com In this file, enter: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /path/to/your/webroot ServerName yourdomain.com ServerAlias www.yourdomain.com <Directory “/path/to/your/webroot”> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> Activate the virtual host. Type: # … Continue reading
Ubuntu: How to install a complete web server
On the command prompt, type “sudo apt-get install tasksel” As the install progresses, it will ask you for items to install – select “LAMP Server” When complete, install PHPMyAdmin by typing “sudo apt-get install phpmyadmin” on the command line If … Continue reading
Echo New Line / Carriage Return In PHP Tip
In order to echo a new line or carriage return in PHP, the code (\n) must be in double quotes. Wrong Code: <?php echo ‘Hello \n World’;?> Correct Code: <?php echo “Hello \n World”;?> or <?php echo ‘Hello’.”\n”.’World’;?>
Linux Command Line Mass Email Script – C Shell
1. Create a file – we’ll use “email_list.txt” – that will contain email addresses, one on each line. 2. Create another file that will be our shell executable, we’ll call it “mass_mail.sh” 3. Use VI or your favorite text editor … Continue reading
MySQL – How to use PASSWORD in the command line (as argument)
The following example shows how to execute a query via command line with a password. mysql –user=username –password=password dbname -e “SELECT * FROM table” –skip-column-names

