|
|
|
Tips for software developers
|
| |
Install Apache, PHP, MySQL and phpMyAdmin on Debian
|
|
-
Install Apache 2:
apt-get install apache2
-
Install PHP 5:
apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi
-
Install MySQL:
apt-get install mysql-client mysql-common mysql-server php5-mysql
-
Install phpMyAdmin:
download phpMyAdmin from http://www.phpmyadmin.net and unzip it to /var/www/
it's better to rename the default phpMyAdmin folder to avoid hackers
-
Start the sevices:
/etc/init.d/mysql start
/etc/init.d/apache2 start
if there are problems, you may need to check configuration files under /etc/apache2/
|
| |
Install Eclipse and its plugins
|
|
|
| |
Make Windows XP Search All Types of Files
|
|
-
Click Start, and then click Search.
-
Click Change preferences, and then click With Indexing Service (faster local searches).
-
You have two choices here:
- Disable Indexing Service by clicking No, do not enable indexing service. And you can try to search again ... or
- Click Change Indexing Service Settings (Advanced), and continue to next step ...
-
On the toolbar of Indexing Service console, click Show/Hide Console Tree.
-
In the left pane, right-click Indexing Service on Local Machine, and then click Properties.
-
On the Generation tab, click to select the Index files with unknown extensions check box, and then click OK.
-
Close the Indexing Service console.
|
| |
Install Apache, PHP, MySQL and phpMyAdmin on Windows Vista
** For Windows 2000/XP/2003 Server, you can download an all-in-one binary package XAMPP for Windows
|
|
|
| |
MySQL hot backup
|
|
-
Using "mysqldump" and "gzip" to dump and compress all the databases:
mysqldump --all-databases -uUSER -p | gzip > MYSQL_BACKUP_FILENAME.gz
-
Using "mysqlhotcopy" to backup databases (needs privilege to access MySQL database files):
mysqlhotcopy --user=USER --password=PASSWORD db1 ... dbn /path/to/new_directory
|
| |
Source code and important data backup
|
|
|
| |
PHP Tips
|
|
-
Set error reporting to its highest level when debugging:
error_reporting(E_ALL);
-
Lower error reporting level for release version, to disable error reporting:
error_reporting(0);
-
Dynamically modify non-system PHP settings - ini_set():
ini_set()
|
| |
Perl Tips
|
|
-
"use strict" can catch stupid mistakes like typos in variable names:
use strict;
|
| |
Go Green!
|
|
|