PHP
I am using PHP at work and figured I should make notes for myself.
- On Ubuntu, you can use the tasksel command, however I have found that removes other programs if you’re not careful (e.g. setting up a server removes some of the desktop side apps). Set up a LAMP server on a desktop with sudo apt-get install php5 mysql-server apache2
- Eclipse is really nice as it tells you errors when you code. PHP, when broken will generally show a blank page which is really not useful. sudo apt-get install eclipse-platform installs the generic version (not the java specific, although it’s fairly simple to change).
- Once Eclipse has installed you need to install the PHP specific stuff. Run eclipse as root with sudo eclipse and thenhelp->install new software to get the list of plugins. Which are none, because apparently there is no repo. Addhttp://download.eclipse.org/releases/galileo/ to get the list. Search for PHP and install the programming language one (the other didn’t work for me, even though it looks like the same thing!)
- If you are working on a remote server (as I am at work) then you should probably install the RSE plugin which allows you to SSH to another server to edit files there.
- When it asks if you want to restart (HIGHLY RECOMMENDED!!!!) I recommend you DO NOT! Simply because we’re running as root which is bad. Just close it down and run it as a regular user, which completed the restart anyway.
- Then you need to set up the instance for PHP, which you can do by creating a new PHP project and it prompts you.
I am trying out PHP_Debug which looks cool:
- sudo apt-get install php-pear
- pear install PHP_Debug
- Copy /usr/share/php/data/PHP_Debug/ to /YOUR_PROJECT_HERE. If you can’t find the files use pear list-files PHP_Debug to list them
- still working on it…
