Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Can't open phpMyAdmin

  1. #1
    Join Date
    Jun 2008
    Beans
    19

    Can't open phpMyAdmin

    I'm trying to install phpMyAdmin to use with my already-installed LAMP server. I used
    Code:
    $ sudo apt-get install phpmyadmin
    ...which downloaded the software successfully, but when I try typing http://localhost/phpMyAdmin, I get a 404. Apache is up and running smoothly, but how can I access phpMyAdmin?

  2. #2
    Join Date
    Apr 2005
    Location
    Massachusetts, USA
    Beans
    1,578
    Distro
    Xubuntu 10.10 Maverick Meerkat

    Re: Can't open phpMyAdmin

    Have you also installed the PHP support?
    Code:
    sudo apt-get install libapache2-mod-php php5-mysql
    Also, by default the phpmyadmin script is installed in /usr/share/phpmyadmin, a directory that isn't access from Apache.

    You'll want to do the following to get http://localhost/phpmyadmin to work
    Code:
    cd /var/www
    sudo ln -s /usr/share/phpmyadmin phpmyadmin
    Last edited by Cypher; July 14th, 2008 at 06:45 PM.
    Registered Linux User #446796
    Registered Ubuntu User #13489

  3. #3
    Join Date
    Jan 2007
    Location
    CA
    Beans
    846
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Can't open phpMyAdmin

    phpmyadmin should all be lowercase (don't know if that's an issue on your server setup)
    http://localhost/phpmyadmin

    phpmyadmin also has an annoying habit of not putting a link into the web folder (I'm not sure what makes it not do that)

    so you may need to go to your web folder root
    Code:
    cd /var/www/
    and put one there yourself.
    Code:
    sudo ln -s /usr/share/phpmyadmin/ phpmyadmin

  4. #4
    RealG187 is offline Chocolate-Covered Ubuntu Beans
    Join Date
    Mar 2007
    Beans
    1,373

    Re: Can't open phpMyAdmin

    Code:
    cd /var/www
    sudo ln -s /usr/share/phpmyadmin phpmyadmin
    Thanks that worked for me.
    Last edited by RealG187; March 17th, 2010 at 02:10 AM.

  5. #5
    Join Date
    Mar 2010
    Location
    Forest,Mbeya.
    Beans
    3
    Distro
    Kubuntu

    Re: Can't open phpMyAdmin

    thank you guyz it work....

  6. #6
    Join Date
    Dec 2008
    Beans
    14

    Thumbs up That annoying habit is still there...

    ...and this solution still works

    phpmyadmin also has an annoying habit of not putting a link into the web folder (I'm not sure what makes it not do that)

    so you may need to go to your web folder root

    Code:
    cd /var/www/
    and put one there yourself.

    Code:
    sudo ln -s /usr/share/phpmyadmin/ phpmyadmin

  7. #7
    Join Date
    Feb 2007
    Location
    Wolverhampton, UK
    Beans
    280
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can't open phpMyAdmin

    Worked a treat, thanks!!

    I had to create the link by hand due to some weird permissions....but still worked!!


  8. #8
    Join Date
    Jul 2010
    Location
    Suffolk
    Beans
    12
    Distro
    Ubuntu Studio 9.10 Karmic Koala

    Re: Can't open phpMyAdmin

    Quote Originally Posted by OffAxis View Post
    phpmyadmin should all be lowercase (don't know if that's an issue on your server setup)
    http://localhost/phpmyadmin

    phpmyadmin also has an annoying habit of not putting a link into the web folder (I'm not sure what makes it not do that)

    so you may need to go to your web folder root
    Code:
    cd /var/www/
    and put one there yourself.
    Code:
    sudo ln -s /usr/share/phpmyadmin/ phpmyadmin
    Thanks for this fix. Amazingly, as of todays date (9 September 2010) the problem is still there to trip up a Ubuntu newbie such as myself. Surely if all users are serving localhost out of /var/www/, why doesn't the phpmyadmin install script put the necessary files into /var/www/phpmyadmin automatically, or at the very least, flag up the issue as a comment in the terminal window during installation?
    Last edited by manObject; September 9th, 2010 at 10:26 PM.

  9. #9
    Join Date
    Oct 2010
    Beans
    9

    Re: Can't open phpMyAdmin

    i also had the problem of not being able to access phpmyadmin after i had installed it with
    Code:
    apt-get install phpmyadmin
    (im using ubuntu 10.04.1 lts)

    i found that the problem for me was that phpmyadmin had not created the necessary file 'phpmyadmin.conf' under /etc/apache2/conf.d. for me i had the advantage of being able to copy the file accross from another ubuntu system, however if you do not have this as an option the contents of this file are:

    Code:
    # phpMyAdmin default Apache configuration
    Alias /phpmyadmin /usr/share/phpmyadmin
    
    <Directory /usr/share/phpmyadmin>
        Options FollowSymLinks
        DirectoryIndex index.php
    
        <IfModule mod_php5.c>
            AddType application/x-httpd-php .php
    
            php_flag magic_quotes_gpc Off
            php_flag track_vars On
            php_flag register_globals Off
            php_value include_path .
        </IfModule>
    
    </Directory>
    
    # Authorize for setup
    <Directory /usr/share/phpmyadmin/setup>
        <IfModule mod_authn_file.c>
        AuthType Basic
        AuthName "phpMyAdmin Setup"
        AuthUserFile /etc/phpmyadmin/htpasswd.setup
        </IfModule>
        Require valid-user
    </Directory>
    
    # Disallow web access to directories that don't need it
    <Directory /usr/share/phpmyadmin/libraries>
        Order Deny,Allow
        Deny from All
    </Directory>
    <Directory /usr/share/phpmyadmin/setup/lib>
        Order Deny,Allow
        Deny from All
    </Directory>
    i actually did
    Code:
    locate phpmyadmin | grep conf
    just incase the file did infact exist with a different name - but no such luck.

  10. #10
    Join Date
    Oct 2009
    Location
    Córdoba, Argentina
    Beans
    8
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Can't open phpMyAdmin

    Right, if you're having a trouble accessing after checking the paths are right in the Apache config, it's probably permission-related.
    Code:
    sudo chmod 777 directoryname
    and work your way up from there. When you're diagnosing an issue like this, security (permissions) should never be tight unless your server is live and you want to add a few hours to the project, haha. I get trouble like that all the time with my Apache setup but the power of chmod cleans that right up!!

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •