Not signed in (Sign In)
    • CommentAuthorraghus
    • CommentTimeMar 14th 2008
     permalink
    Hello - I just signed up w/Slicehost a couple days ago. I plan to run a Rails app and got as far as installing Mysql/Rails and Mongrel/Nginx and even got a Hello Rails page up. So far so good - thanks entirely to the excellent articles on Slicehost.

    But now, how do I get to my MySQL thro a GUI - can I install PhpMyAdmin? Do I need to go with Apache rather than Nginx if I want to do that?

    Finally, how can I fire up a browser *on* my slice - ie where I can do a http://localhost/phpmyadmin - right now I can't get to PhpMyAdmin from my home computer - can I?

    Sorry if these are very basic questions - I just need help getting started.

    Thanks in advance.
    •  
      CommentAuthorMindTooth
    • CommentTimeMar 14th 2008
     permalink

    $ sudo aptitude install phpmyadmin
    And add phpMyAdmin to your site, open up the correct site in /etc/apache2/sites-available/ and add at bottom;

    Alias /phpmyadmin/ "/var/www/phpmyadmin/" Alias /phpmyadmin "/var/www/phpmyadmin/" <Directory "/var/www/phpmyadmin/" > Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all Deny from none </Directory>
    Reload Apache;

    $ sudo /etc/init.d/apache2 force-reload
    And access through your site;

    http://domain.com/phpmyadmin

    I hope this help.

    Birger :)

    • CommentAuthorBraxo
    • CommentTimeMar 14th 2008
     permalink
    Go-Xian,

    I too was watching this thread for an answer, it looks like I have the same setup as raghus (MySQL,Rails, Mongrel and Nginx). I do not have Apache or PHP, same as raghus.

    In order to add phpMyAdim, will I be able to follow your steps, except to just restart nginx? Or does phpMyAdmin need both Apache and Nginx?
    •  
      CommentAuthorMindTooth
    • CommentTimeMar 14th 2008
     permalink

    Ahh. My bad. Then I am not sure. Maybe you need to read the documentation really well.

    Birger :)

    • CommentAuthorbillturner
    • CommentTimeMar 14th 2008
     permalink
    phpMyAdmin doesn't need apache. I have made it work just fine with nginx and php-fastcgi. Here's what I have for phpmyadmin & nginx in my nginx.conf file (just the server bit):

    server {
    listen 80;
    server_name phpmyadmin.domainname.com;
    access_log /home/apps/logs/phpmyadmin.access_log;
    error_log /home/apps/logs/phpmyadmin.error_log;

    location / {
    root /usr/share/phpmyadmin;
    index index.php;
    }

    location ~ \.php$ {
    fastcgi_pass 127.0.0.1:8888;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
    include /etc/nginx/fastcgi.conf;
    }
    }


    the contents of fastcgi.conf are:


    fastcgi_param GATEWAY_INTERFACE CGI/1.1;
    fastcgi_param SERVER_SOFTWARE nginx;

    fastcgi_param QUERY_STRING $query_string;
    fastcgi_param REQUEST_METHOD $request_method;
    fastcgi_param CONTENT_TYPE $content_type;
    fastcgi_param CONTENT_LENGTH $content_length;

    fastcgi_param SCRIPT_NAME $fastcgi_script_name;
    fastcgi_param REQUEST_URI $request_uri;
    fastcgi_param DOCUMENT_URI $document_uri;
    fastcgi_param DOCUMENT_ROOT $document_root;
    fastcgi_param SERVER_PROTOCOL $server_protocol;

    fastcgi_param REMOTE_ADDR $remote_addr;
    fastcgi_param REMOTE_PORT $remote_port;
    fastcgi_param SERVER_ADDR $server_addr;
    fastcgi_param SERVER_PORT $server_port;
    fastcgi_param SERVER_NAME $server_name;


    This assumes that phpmyadmin's PHP files location is in /usr/share/phpmyadmin. I'm on an Ubuntu slice and just installed it via:

    sudo apt-get install phpmyadmin

    You also need to have the php/fastcgi set up similar to one of these links:

    http://blog.codefront.net/2007/06/11/nginx-php-and-a-php-fastcgi-daemon-init-script/ or http://johnmuhl.com/notebook/server/#php
    Thankful People: ifthengoto
    • CommentAuthoraerodyno
    • CommentTimeApr 8th 2008
     permalink
    I'm trying to get phpmyadmin working, but it's not. I followed the instructions at both links and used the config files you mentioned above.

    Questions:
    Do I need to change permissions on my /usr/share/phpmyadmin directory?
    Do I need to change my iptables file to allow for access to port 8888?

    I have managed to get php-cgi to show up in top after a soft reboot, so I think my fastcgi server is running, though I don't know how to confirm that! ot doesn't show up when I navigate to phpmyadmin.mysite.com.

    Thanks,
    Aero
    • CommentAuthoraerodyno
    • CommentTimeApr 8th 2008
     permalink
    My site is set up according to the gutsy, rails, nginx vhosts tutorial, btw. Thanks.
    • CommentAuthoraerodyno
    • CommentTimeApr 8th 2008
     permalink
    So it looks like my 'fastcgi' server is not running.

    I just did a netstat -anp | grep tcp.

    and I see my mongrels and nginx server, but not the fastcgi server. still workign on it, any help would be appreciated.

    -s
    • CommentAuthoraerodyno
    • CommentTimeApr 8th 2008
     permalink
    So I think I've answered my own questions:
    1) Need to change permissions on /usr/share/phpmyadmin? Probably not.
    2) I don't need to change the iptables file, because I didn't need to change it for the mongrels to work.

    I used my sql command line skills to fix my database issue, but it would still be nice to get phpmyadmin going. A quick note detailing nginx php fastcgi setup, with phpmyadmin, on a slice would be perfect.

    thanks,
    aero
    • CommentAuthorbrady8
    • CommentTimeApr 9th 2008
     permalink
    So to get fastcgi to run on boot, you'll need the init script as stated here (and above):
    http://blog.codefront.net/2007/06/11/nginx-php-and-a-php-fastcgi-daemon-init-script/

    After that, use netstat and see if you have the fastcgi processes running - if you do, then try accessing through Nginx again and let us know if it doesn't work - if it can't connect to PHP you might get a "bad gateway" error when you try accessing the page.
    • CommentAuthorbean
    • CommentTimeMay 11th 2008
     permalink
    I am trying to install PhpMyAdmin on an Ubuntu Gutsy slice and have apache installed.

    I followed the instruction sent by Go-Xian. However, when I enter sudo /etc/init.d/apache2 force-reload, I get the following message:

    [Sun May 11 19:44:51 2008] [warn] The Alias directive in /etc/apache2/sites-enabled/beanbeta.org at line 33 will probably never match because it overlaps an earlier Alias.
    [Sun May 11 19:44:51 2008] [warn] The Alias directive in /etc/apache2/sites-enabled/beanbeta.org at line 34 will probably never match because it overlaps an earlier Alias.

    Then, when I point my browser to http://beanbeta.org/phpmyadmin, I get a 404 error saying the page does not exist.

    Can someone help me? I really want to get phpmyadmin installed. Thanks in advance for your help.
    • CommentAuthorpdilip
    • CommentTimeMay 17th 2008
     permalink
    I have the same problem as bean. I have installed ubuntu hardy , php 5 , apache2 and mysql according the instructions in the excellent articles provided by slicehost. Now, i'm not able to install and run phpmyadmin. it returns a 404. I tired removing the phpmyadmin package to reinstall it but it seems to be of no avail. can someone guide me on removing and installing phpmyadmin package again. Thanks in advance
    • CommentAuthordrumbo
    • CommentTimeJun 11th 2008
     permalink
    pdilip,

    I had the same problem on a recent reinstall of my slice. Somewhere in the depths of the net I found the following which I ran and it sorted out my phpmyadmin install

    sudo apt-get purge php5-mcrypt phpmyadmin
    sudo apt-get install php5-mcrypt phpmyadmin

    make sure you choose apache2 and not the ssl apache2 as this will not work (at least it didn't for me). The basic apache2 used ssl anyway! I am not 100% but I think that a line is added in the apache2.conf file to link to a conf file in /etc/phpmyadmin so if you need to make changes - this could be a place to look. Have only managed to get mine running yesterday so haven't checked further than "it works"
    • CommentAuthornimish79
    • CommentTimeJun 13th 2008
     permalink
    BTW, am on Ubuntu 8.0.4 Hardy.
    Thankful People: Russell123
    • CommentAuthornimish79
    • CommentTimeJun 14th 2008
     permalink
    http://MYDOMAINNAME.COM/phpmyadmin, I get a 404. I used Go-Xian's advice and added the necessary lines to /etc/apache2/sites-available/MYDOMAINNAME.com but it didn't help. Incidentally, I am serving multiple domains from my slice but need phpMyAdmin for one domain only. Please advice.

    PS: I had chosed Apache2 correctly when the option popped up. I have purged, removed and re-installed PMA altogether and then the PMA MCrypt package but that doesn't seem to be the issue 'cos PMA works when I type my IP Address.
    • CommentAuthornimish79
    • CommentTimeJun 14th 2008
     permalink
    Extremely weird... Some part of my comment just didnt appear... So posting it again:

    i have installed PMA on my slice. When I visit http://MY.IP.ADDRRESS/phpmyadmin, I am able to log into PMA. But when I visit http://MYDOMAINNAME.COM/phpmyadmin, I get a 404. I used Go-Xian's advice and added the necessary lines to /etc/apache2/sites-available/MYDOMAINNAME.com but it didn't help. Incidentally, I am serving multiple domains from my slice but need phpMyAdmin for one domain only. Please advice.

    PS: I had chosed Apache2 correctly when the option popped up. I have purged, removed and re-installed PMA altogether and then the PMA MCrypt package but that doesn't seem to be the issue 'cos PMA works when I type my IP Address.
    • CommentAuthornimish79
    • CommentTimeJun 14th 2008
     permalink
    I realised that phpMyAdmin was not installed in /var/www/ and instead was on /var/lib/. Thus I added the following line to the vhost file for the desired domain name.

    Alias /phpmyadmin/ "/var/lib/phpmyadmin/"
    Alias /phpmyadmin "/var/lib/phpmyadmin/"
    <Directory "/var/lib/phpmyadmin/" >
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    Deny from none
    </Directory>

    However, while I do not get a 404 error any longer, it now takes me to the Index of /phpmyadmin instead of the login page of PMA.
    • CommentAuthordrobbins
    • CommentTimeJun 14th 2008 edited
     permalink
    Try adding a DirectoryIndex line within the Directory container (e.g., right after the 'Options' line):

    DirectoryIndex index.php

    Or modify the global DirectoryIndex in httpd.conf to include all index pages you use, listed in order of preference in case two or more exist in a directory, e.g.,

    DirectoryIndex index.php index.html index.htm

    Don't forget to restart Apache.
    • CommentAuthorhanacious
    • CommentTimeJun 20th 2008
     permalink

    Ubuntu LTS with Apache 2 here.

    I also applied Go-Xian's advice, and like nimish, just saw the phpmyadmin directory listing. Adding the index file to make the first line "Alias /phpmyadmin/ "/var/lib/phpmyadmin/index.php" didn't help much: phpmyadmin's meager css files didn't load, and I got the same 404 smackdown after entering my login details.

    The easier solution for me was to create a symbolic link:

    sudo ln -s /usr/share/phpmyadmin /home/demo/public_html/demo.com/public
    

    Then I just access phpmyadmin through http://demo.com/phpmyadmin

    •  
      CommentAuthormadra
    • CommentTimeAug 2nd 2008
     permalink
    Posted By: nimish79I realised that phpMyAdmin was not installed in /var/www/ and instead was on /var/lib/. Thus I added the following line to the vhost file for the desired domain name.

    Alias /phpmyadmin/ "/var/lib/phpmyadmin/"
    Alias /phpmyadmin "/var/lib/phpmyadmin/"
    ....


    However, while I do not get a 404 error any longer, it now takes me to the Index of /phpmyadmin instead of the login page of PMA.


    try using:


    Alias /phpmyadmin/ "/usr/share/phpmyadmin/"
    Alias /phpmyadmin "/usr/share/phpmyadmin/"
    <Directory "/usr/share/phpmyadmin/" >
    ...etc...


    that's where the main phpmyadmin binaries live. the stuff in '/var/lib' is just a couple of config files