LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-26-2008, 10:18 PM   #1
hellbillyJoker
LQ Newbie
 
Registered: Dec 2008
Location: Minneapolis
Distribution: Debian 5
Posts: 15

Rep: Reputation: 0
Question phpMyAdmin install Slackware 12.2


I'm a NEWB

I have a fresh install of Slackware 12.2, kernel 2.6.27.7-smp.
I'm trying to get a web server going. I've got Apache and PHP up and running.

I don't know where to begin with mySQL, so I thought I'd begin with a front-end to help me out. I'm trying to follow the instructions here http://slackwiki.org/PhpMyAdmin

First it says to download to /usr/src/sourcepkg . The next instruction says to
Code:
tar /usr/src/source/phpMyAdmin-XXX.tar.bz2
, so I created the dir 'source' in /usr/src to put the file into.

Per the instructions, I extracted in /var/www, created the symbolic link, jumped to the section "httpd (apache2) under Slackware 12", created the /etc/apache/conf.d/phpMyAdmin.conf file, added the line to the /etc/httpd/phpMyAdmin.conf file.

Under "Configuration" it says to restart with
Code:
/etc/apache/rc.httpd restart
That fails with:
bash: /etc/apache/rc.httpd: No such file or directory

So I Googled around and restarted with:
Code:
apachectl -k restart
I think it restarted, but it gave the message:
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

Back to the instructions, when I try to go to http://localhost/phpMyAdmin
I get:
Forbidden
You don't have permission to access /phpMyAdmin on this server.


The instructions say "If you have set a password for your MySQL root user, you will have an error"

I have never set a password anywhere. I'm assuming one is set by default in Slackware 12.2.

It then says to "Edit /var/www/phpMyAdmin/config.inc.php"

When I cd to /var/www/phpMyAdmin, I get:
bash: cd: /var/www/phpMyAdmin: No such file or directory

So I poke around and there is a /var/www/phpMyAdmin-3.1.1-all-languages folder that contains config.sample.inc.php, so I cp config.sample.inc.php to config.inc.php, and edit.

First the instructions say:
Code:
Change to something unique:
$cfg['blowfish_secret']=;
It has the line $cfg['blowfish_secret'] = ''; I try adding 'somethingunique' (literally) in the single quotes.

Then it says:
Code:
Change:
$cfg['Servers'][$i]['auth_type'] = 'config';
To:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
When I scroll down, there is already a line:
Code:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
So I don't change anything.

I then refresh the page and I still get the same:
Forbidden
You don't have permission to access /phpMyAdmin on this server.


If anyone can help me with this, or just point me to something that will tell me how to use mySQL with my current install, that would be great!

Last edited by hellbillyJoker; 12-26-2008 at 10:35 PM.
 
Old 12-27-2008, 03:20 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
bash: cd: /var/www/phpMyAdmin: No such file or directory

So I poke around and there is a /var/www/phpMyAdmin-3.1.1-all-languages
According to your configuration you have to use the URL: http://localhost/phpMyAdmin-3.1.1-all-languages.
I suggest you to change this to something more simple and difficult for others to guess, because phpmyadmin is used from hackers to gain access to servers and databases. You can for example:
Code:
mv phpMyAdmin-3.1.1-all-languages db-admin
and use: http://localhost/db-admin to use phpMyadmin.

Regards
 
Old 12-27-2008, 11:44 AM   #3
hellbillyJoker
LQ Newbie
 
Registered: Dec 2008
Location: Minneapolis
Distribution: Debian 5
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
According to your configuration you have to use the URL: http://localhost/phpMyAdmin-3.1.1-all-languages.
I suggest you to change this to something more simple and difficult for others to guess, because phpmyadmin is used from hackers to gain access to servers and databases. You can for example:
Code:
mv phpMyAdmin-3.1.1-all-languages db-admin
and use: http://localhost/db-admin to use phpMyadmin.

Regards
Thanks for the reply!

I understand and will follow your advice about renaming the location of phpMyAdmin, but for the sake of sticking to the instructions until I know what is going on, and since I am not serving anything up publicly (I'm behind a firewall/router), I changed the symbolic link to point to phpMyAdmin-3.1.1-all-languages which then makes the conf file show up under phpMyAdmin, but I'm still getting the forbidden error. I believe with your steps I'd still be in the same boat.
 
Old 12-27-2008, 12:58 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
There are some "errors" in the tutorial you've followed.
The guy there says to d/l the archive in /usr/src/sourcepkg and extract it, but in the commands he uses it seems that he extracts it in /var/www (that is the DocumentRoot of apache) and then creates a symlink to simplify the URL.
Since you use a symlink you must make sure that there is a:
Code:
Options FollowSymLinks
either for the <Directory /var/www/phpMyAdmin> part, or at least for the DocumentRoot <Directory /var/www>.

If it doesn't work you can check the apache error_log for hints.

Regards
 
Old 12-27-2008, 04:18 PM   #5
geek745
Member
 
Registered: Jul 2004
Location: Alton, IL
Distribution: Linux Mint; Slackware; Ubuntu; Slax
Posts: 172
Blog Entries: 2

Rep: Reputation: 34
so the whole point of phpmyadmin, as you know, is to provide a nice interface to the mysql server, so that you don't have to execute sql commands on the command line. phpmyadmin is exactly that - a php-driven administrative interface to mysql. phpmyadmin is itself a website, so you are taking advantage of the resources on your system (Apache webserver with php interpreter) to run phpmyadmin on your local machine. You need to understand configuration of apache, php, mysql, and then how to use phpmyadmin to be successful.

apache serves web pages (html). you can have apache interpret php scripting (like what is used in phpmyadmin) by linking the .php file extension to the php interpreter (slackware packages have already done this for you, i hope). when you created that /var/www/phpmyadmin-xxx you need to make sure it is at least world-readable so that the system users running apache and php can get to it. this could be your "forbidden" error (http error 403?). the error you got when restarting httpd (apache) was because you have not defined a hostname for your box (can do this in /etc/HOSTNAME and /etc/hosts) or you have not entered that hostname into apache's httpd.conf as the ListenOn value. then you need to have your mysql database configured. out of the box, it lets you login with user "root" and a blank password - you are advised in the mysql configuration to change this or disable the root account. You also need to configure phpmyadmin, as per their instructions, to tell it which server this phpmyadmin installation is built to manage (you can enter localhost for the server name, or your loopback ip address 127.0.0.1) and other options, as specified in the installation instructions. After that, you should be all ready to create databases and tables, and manage them as you wish.

I recently set this up on my secondary box at home because i grew lazy of using the command-line mysql client... not a big deal, if you understand the core concepts outlined above.
 
Old 12-28-2008, 10:26 PM   #6
hellbillyJoker
LQ Newbie
 
Registered: Dec 2008
Location: Minneapolis
Distribution: Debian 5
Posts: 15

Original Poster
Rep: Reputation: 0
I tried all of these steps, tried different instructions I found online. I was able to get a directory listing, and click on index.php to run the program, but thought that didn't seem right, so I removed everything.

I found a phpmyadmin tgz file on zenwalk.org and installed that with installpkg.

I still got a directory listing, and everything would work when I clicked a file in the directory listing, so I created a index.html in the directory to see what happened. It loaded on accessing the directory. I found that I had to add index.php to the httpd.conf file. Now it seems to be working correctly.

Thanks for all of the help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mcrypt extension error while using phpMyAdmin on Slackware 12.2 dizzi Slackware 5 01-19-2009 05:41 PM
phpmyadmin - how to install? smeggle Linux - Newbie 1 08-19-2007 07:09 PM
phpmyadmin install problem??? tiger.woods Ubuntu 6 01-30-2007 07:26 PM
how do I install phpMyAdmin via yum? asif2k Linux - Software 1 03-29-2006 08:02 AM
phpmyadmin, apache2, slackware 9 BulletSponge Slackware 0 07-07-2003 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration