Cognitionis
The little I know

Web developing


Apache PHP MySQL, the fantastic three.

Apache Basic Kit

PHP Basic Kit

MySQL Basic Kit

Configuring Linux for web developing

After installed Apache, PHP and MySQL.

  1. Fitxer /etc/apache2/sites-avaliable (afegir el nou lloc web PEGAR EXEMPLE ASI)
  2. sudo a2ensite nom (activa el nou lloc web creat)
  3. vim etc/hosts (afegir el domini en localhost)
  4. phpmyadmin -> per defecte no funciona, hi ha que fer un enllaƧ simbolic sudo ln -s … (vore blog de xavi)
  5. En mysql setpassword pq tampoc funciona per defecte

Tools you need: HTML/PHP Editor: Try to find one with autocompletion and debbug options (i.e. NetBeans PHP). TestBankBrowser: Firefox+Firebug

Create a WordPress local copy:

1. Export MySQL DB
2. Copy web folder files
3. Import DB in local MySQL
4. Create user in local MySQL
5. Modify wp-options table rows 1 and 40 with local server information
6. Modify wp-config.php with local DB information
7. Activate in httpd.conf (Apache config file) the rewrite module.
* LoadModule rewrite_module modules/mod_rewrite.so
8. Change in httpd.conf: AllowOverride All.

TIP: If permalinks doesn’t work properly switch them to ?p=xxx