PHPMyadmin xampp error

Problems with the Linux version of XAMPP, questions, comments, and anything related.

PHPMyadmin xampp error

Postby deepthings » 24. July 2012 13:21

I'm desperately trying to get phpmyadmin access on xampp for linux 1.8.0 for ubuntu 12.04 LTS. I know this is a common problem, but I have tried many threads across the web, and I am still stuck getting it going.

Xampp seems to be running ok, localhost start page good, including link to phpmyadmin in the sidebar. When I follow that link I get

Access forbidden!

New XAMPP security concept:

Access to the requested directory is only available from the local network.

This setting can be configured in the file "httpd-xampp.conf".

If you think this is a server error, please contact the webmaster.

Error 403

localhost
Apache/2.4.2 (Unix) OpenSSL/1.0.1c PHP/5.4.4


I have tried numerous things, including amending httpd-xampp.conf, which now looks like:

Code: Select all
Alias /phpmyadmin "/opt/lampp/phpmyadmin"
Alias /phpsqliteadmin "/opt/lampp/phpsqliteadmin"
 
# since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
</Directory>
 
<Directory "/opt/lampp/phpsqliteadmin">
    AllowOverride AuthConfig Limit
    Require all granted
</Directory>
 
# since LAMPP 1.0RC1
AddType application/x-httpd-php .php .php3 .php4
 
XBitHack on
 
# since 0.9.8 we've mod_perl
<IfModule mod_perl.c>
        AddHandler perl-script .pl
        PerlHandler ModPerl::PerlRunPrefork
        PerlOptions +ParseHeaders
        PerlSendHeader On
</IfModule>
 
# demo for mod_perl responsehandler
#PerlModule Apache::CurrentTime
#<Location /time>
#      SetHandler modperl
#      PerlResponseHandler Apache::CurrentTime
#</Location>
 
# AcceptMutex sysvsem is default but on some systems we need this
# thanks to jeff ort for this hint
#AcceptMutex flock
#LockFile /opt/lampp/logs/accept.lock
 
# this makes mod_dbd happy - oswald, 02aug06
# mod_dbd doesn't work in Apache 2.2.3: getting always heaps of "glibc detected *** corrupted double-linked list" on shutdown - oswald, 10sep06
#DBDriver sqlite3
 
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Deny from all
    Allow from ::1 127.0.0.0/8
    Allow from all
    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>




my /opt/lampp/phpmyadmin/config.inc.php looks like:

Code: Select all
<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';

/*
 * End of servers configuration
 */

?>



Following other instructions I changed ownership of /lampp with:

Code: Select all
    chown -Rv nobody:root ./lampp/*


Please assist me before I expire of exhaustion.

Thanks!
deepthings
 
Posts: 3
Joined: 24. July 2012 12:26
Operating System: Ubuntu 12.04 LTS

Re: PHPMyadmin xampp error

Postby JonB » 24. July 2012 14:29

I think this post may have your solution

viewtopic.php?f=17&t=50970

Be sure to read the last two posts!

it hinges on changes to .htacccess syntax added to phpmyadmin Directory directive.

Code: Select all
Require all granted




Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: PHPMyadmin xampp error

Postby deepthings » 24. July 2012 15:08

Thanks Jon. I have been through this post already. I've got the penultimate post's suggestions in place, but I'm not sure how to handle what the last poster says:

"When you can't get access to phpmyadmin even from localhost, which was my case, don't forget about the default setttings for security (/opt/lampp/lampp security). Unless you start protecting you lampp (xampp) from there, none of the settings in httpd-xampp.conf, as described in solutions on this Forum, work."

I don't know what changes to make in the LAMPP security file. Can you suggest anything?

Thanks
deepthings
 
Posts: 3
Joined: 24. July 2012 12:26
Operating System: Ubuntu 12.04 LTS

Re: PHPMyadmin xampp error

Postby JonB » 24. July 2012 15:27

What he means (I believe) is that phpMyAdmin's configuration file changes only work correctly if you have run the /opt/lampp/lampp security script that sets the root pw for MySQL and pmauser - it then writes the fixes to config.inc.php (along with securing a user called 'lampp' for \opt\lampp\htdocs\xammp).

In the same vein, I discovered in testing the 1.7.7 to 1.8.0 upgrade that the mysqlupgrade script 'fix' requires a password or a 'fix' to itself (removing the -p parameter).

Lastly, I'm unclear, did you add the "Require all granted" to httpd-xampp.conf, about like this??

# since XAMPP 1.4.3
<Directory "/opt/lampp/phpMyAdmin-3.4.5-english">
AllowOverride AuthConfig Limit
Require all granted
</Directory>

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: PHPMyadmin xampp error

Postby deepthings » 25. July 2012 10:03

Thanks so much for your efforts Jon but I moved on to LAMP to meet a deadline. I'll be back if I try XAMPP again. I know I'll need to test this soon enough. Thanks again.
deepthings
 
Posts: 3
Joined: 24. July 2012 12:26
Operating System: Ubuntu 12.04 LTS

Re: PHPMyadmin xampp error

Postby JonB » 25. July 2012 11:00

No problems,

Good Luck with your project
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 18 guests