In general the LAMP Linux, Apache, MySql, PHP in #! seems to go OK but the new user can trip up over minor things which are not mentioned in the tutorials.
The simple way to install is to run the CB-welcome script
In this script is a section that will install all the packages that you need. You may find that everything works fine, if not these tips may help.
Symlink is often stressed as important, why? You save your web work in the folder home/htdocs but when you set your browser to look at the web site you have created locally it actually looks at the folder /var/www but this is write restricted so Symlink enables it to "see" the files in htdocs.
Your first Php script.
You may be used to html scripts which show in your browser even if they have errors. Php scripts with error(s) may not show anything but a blank page. Debug your php scripts the Chaanakya Way by calling it in a terminal.
You will already have typed localhost into your browser and got the reassuring message
but when you go localhost/phpmyadmin you get File not found error. Which may be because Apache is not quite configured correctly. The Apache configuration needs to contain reference to the Php configuration which is contained in a file /etc/phpmyadmin/apache.conf and needs to be included in the apache configuration file etc/apache2/apache2.conf which because it is a write restricted file needs gksudo to edit.
~$ gksudo geany /etc/apache2/apache2.conf
and when the file opens append at the end
# include phpmyadmin references (name date)[ i.e. your name and date so you know who and when!]
Then save and restart apache with
~$ sudo /etc/init.d/apache2 restart
Now in your browser localhost/phpmyadmin should show a login screen.
User and Password
You may or may not remember setting a user and password for MySQL but during the installation at least one user will have been created possibly root or admin. So if your own login fails try root and if your usual root password fails you can reset the password with the following command.
~$ sudo htpasswd /etc/phpmyadmin/htpasswd.setup root
Now you should be able to login as the root MySQL user. Click the "Privileges" button (in the right hand panel) which will give a list of the users that exist and you can then create a user of your own before proceeding with your exploration.
Last edited by dbvolvox (2012-01-16 22:28:52)
dbvolvox, very good move of coming from a help-thread (yes, i looked that up ), getting the help, working some stuff out on your own and then doing a how-to. really cool thing of you to do. thanks for that.
Thank you for this simple apache2.conf config to fix when phpmyadmin is not showing up or working! Fixed it right away!
Sometimes you run across a problem where regex is the best answer. Then you have two problems.