Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've recently read Wallace Wang's “Beginning Programming for Dummies, 7 books in 1” and found it to be very enlightening, as it highlighted various differences between the three main operating systems of Linux, Mac and Microsoft; and thought PHP would be as good a starting point to start with and chose “Head First, PHP & MySQL” in the O'Reily library.

Problem, it only describes the set up and installation of LAMP server for Microsoft and Mac and I'm unable to do the exercises, in chapter one. As I failed to set up LAMP, on several occasions using the links and other prescribed methods in this forum.

I get to “Look it Works” on the browser, when you restart Apache, then enter the code lines to obtain the PHP display page, after reading a long message, which tells me certain facets of the php install were deprecated, do you want to continue, “y or n” the terminal goes blank upon typing “y” and followed by a series of new lines starting with a comma, ending with a red line message “E353: nothing in register”.

Entering “php -version” or “mysql -version” commands in the terminal, it informs me I do not have either installed, but gives the option to install either with the following “sudo apt-get install php5-cli” or “sudo apt-get install mysql-client-core-5.5 ” commands. Though Apache comes with multiple choice? Sort of grasp why there is nought in the register.

  1. Security issues, I was informed to enter a new password for MySQL, then re-enter, went with my computer root command password. By the third or fourth attempt I used a new password for MySQL. Boy that cooked the system. Delete and re-installed 12.04.

  2. The system only recognises the 127.0.0.1, which it didn't like either, and I couldn't find an option to enter my IP localhost.com, shown on the example graphic or the preferred 192.168.00.000 modified address used in other examples.

  3. Is “Head First, PHP & MySQL” still the best way forward for Ubuntu 12.04, if not can you recommend..!

  4. Would it be prudent to download PHP, MySQL and Apache using the sudo apt-get install command first, then attempt the set up using “tasksel”, which is now installed.

Feeling like a NUMPTY and totally lost.

share|improve this question
    
For point two I would suggest you look into the following after you get PHP & mySQL working: the vHost files to setup an (apache) host and the etc/hosts file to loop and address/name back to your machine. –  Pieter Jan 22 at 4:42

1 Answer 1

up vote 0 down vote accepted

Use the commands it suggests (sudo apt-get install php5 php5-cli mysql-client mysql-server) to install PHP and MySQL, and reboot the Apache server using sudo service apache2 restart. It should load both programs and function properly.

share|improve this answer
    
You also need to add libapache2-mod-php5 to install the php module for apache –  Dan Jan 22 at 11:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.