Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-01-16 20:39:39

#! CrunchBanger
From: England
Registered: 2011-01-05
Posts: 173

LAMP install and what's not in the tutorials

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

~$ cb-welcome

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.

php5 htdocs/test.php

You will already have typed localhost into your browser and got the reassuring message
It works!
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!]
Include /etc/phpmyadmin/apache.conf

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.

Happy Scripting!

Last edited by dbvolvox (2012-01-16 22:28:52)


Be excellent to each other!

#2 2012-01-16 21:11:21

Registered: 2011-03-09
Posts: 4,396

Re: LAMP install and what's not in the tutorials

dbvolvox, very good move of coming from a help-thread (yes, i looked that up smile), 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.


#3 2012-10-11 10:19:59

wookiee madclaw
From: Back in Blighty
Registered: 2012-03-09
Posts: 1,478

Re: LAMP install and what's not in the tutorials

thanks, just got me out of a pickle.
to push it to

good work


#4 2012-11-21 16:52:27

Registered: 2012-11-21
Posts: 35

Re: LAMP install and what's not in the tutorials

Thank you for this simple apache2.conf config to fix when phpmyadmin is not showing up or working!  Fixed it right away!  big_smile

Sometimes you run across a problem where regex is the best answer.  Then you have two problems.


Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo