Can't access phpmyadmin

Discussion in 'Installation/Configuration' started by laptop_user, Sep 9, 2011.

  1. laptop_user

    laptop_user Member

    Hi everyone,

    After following the debian squeeze tutorial and searching this forum, I still can't get phpmyadmin to work?

    I already create the symlink for phpmyadmin
    Code:
    lrwxrwxrwx 1 root root   27 Sep  9 19:48 phpmyadmin.conf -> /etc/phpmyadmin/apache.conf
    
    However apache restart threw out some error:
    Code:
    root@server1:/etc/phpmyadmin# /etc/init.d/apache2 restart                                       
    Syntax error on line 88 of /etc/apache2/sites-enabled/mywebsite.com.vhost:
    Invalid command 'FCGIWrapper', perhaps misspelled or defined by a module not included in the server configuration
    Action 'configtest' failed.
    The Apache error log may have more information.
     failed!

    Is it actually related:confused: Any help is appreciated. Thank you all:)

    UPDATE
    OK now I remove my domain from Sites module. I already add domain by DNS before so I access the same domain I add in Sites. Now the error I'm getting when apache restart is:
    Code:
    root@server1:/etc/phpmyadmin# /etc/init.d/apache2 restart
    Restarting web server: apache2[Fri Sep 09 20:15:20 2011] [warn] NameVirtualHost 88.76.80.210:80 has no VirtualHosts
    [Fri Sep 09 20:15:20 2011] [warn] NameVirtualHost 88.76.80.210:443 has no VirtualHosts
     ... waiting [Fri Sep 09 20:15:21 2011] [warn] NameVirtualHost 88.76.80.210:80 has no VirtualHosts
    [Fri Sep 09 20:15:21 2011] [warn] NameVirtualHost 88.76.80.210:443 has no VirtualHosts
    Either accessing phpmyadmin via IP or domain both condition failed. Any idea:confused:

    Thanks in advance :)
     
    Last edited: Sep 9, 2011
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    You probably missed to install the libapache2-mod-fcgid package. Please run
    Code:
    apt-get install libapache2-mod-fcgid
    and restart Apache.
    This is just a warning and means you have no virtual hosts configured on that IP.
     
  3. laptop_user

    laptop_user Member

    Hello,

    I run the command and restart apache but I still can't login:confused:
    Code:
    root@server1:/# /etc/init.d/apache2 restart
    Restarting web server: apache2[Sat Sep 10 19:46:33 2011] [warn] NameVirtualHost 88.76.80.210:80 has no VirtualHosts
    [Sat Sep 10 19:46:33 2011] [warn] NameVirtualHost 88.76.80.210:443 has no VirtualHosts
     ... waiting [Sat Sep 10 19:46:34 2011] [warn] NameVirtualHost 88.76.80.210:80 has no VirtualHosts
    [Sat Sep 10 19:46:34 2011] [warn] NameVirtualHost 88.76.80.210:443 has no VirtualHosts
    .
    Code:
    Not Found
    
    The requested URL /phpmyadmin was not found on this server.
    Apache/2.2.16 (Debian) Server at www.mywesite.me Port 80
    
    Any suggestion:confused: Thanks in advance :)

    This is my phpmyadmin cofiguration directory:
    Code:
    root@server1:/etc/phpmyadmin# ls
    apache.conf            config.header.inc.php  lighttpd.conf
    config-db.php          config.inc.php         phpmyadmin.service
    config.footer.inc.php  htpasswd.setup
    I just wondering where all the login page & the .gif image is stored:confused:
     
    Last edited: Sep 10, 2011
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    I suggest you re-enable your sites now. Did you check Apache's error log?

    What's in /etc/apache2/conf.d/phpmyadmin.conf?

    phpMyAdmin is located in the /usr/share/phpmyadmin directory.
     
  5. laptop_user

    laptop_user Member

    OK I enable my site. I didn't assign any client to domain btw, go to mydomain.com/phpmyadmin and was greet with the fancy ISPconfig 404 error page. My apache error log is 2,60 MB in size. What specific thing should I looking for? I upload it to mediafire.

    http://www.mediafire.com/?7yw78kzsm97dii8

    Code:
    root@server1:/etc/apache2/conf.d# cat phpmyadmin.conf
    root@server1:/etc/apache2/conf.d# cat phpmyadmin.conf
    root@server1:/etc/apache2/conf.d#
    It's empty:confused: Any idea?
    Thank you :)


    UPDATE
    I create a symlink
    Code:
    ln -s /usr/share/phpmyadmin /var/www/mywebsitedomain.com/web
    and I got 500 Internal Server error:eek:

    Help please. Thank you
     
    Last edited: Sep 11, 2011
  6. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Create the file with the following contents:

    Code:
    # phpMyAdmin default Apache configuration
    
    Alias /phpmyadmin /usr/share/phpmyadmin
    
    <Directory /usr/share/phpmyadmin>
            Options Indexes FollowSymLinks
            DirectoryIndex index.php
    
            # Authorize for setup
            <Files setup.php>
                # For Apache 1.3 and 2.0
                <IfModule mod_auth.c>
                    AuthType Basic
                    AuthName "phpMyAdmin Setup"
                    AuthUserFile /etc/phpmyadmin/htpasswd.setup
                </IfModule>
                # For Apache 2.2
                <IfModule mod_authn_file.c>
                    AuthType Basic
                    AuthName "phpMyAdmin Setup"
                    AuthUserFile /etc/phpmyadmin/htpasswd.setup
                </IfModule>
                Require valid-user
            </Files>
            <IfModule mod_php4.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>
            <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>
    AuthType Basic
    AuthName "Members Only"
    AuthUserFile /usr/share/phpmyadmin/.htpasswd
    <limit GET PUT POST>
    require valid-user
    </limit>
    </Directory>
    Then restart Apache.
     
  7. laptop_user

    laptop_user Member

    Hey thanks for your reply. After restart apache I go to the phpmyadmin login page and the page was asking me my username and password. After I enter my credentials boom I got 500 error page.:eek:

    The weird thing is I could login if I use terminal:confused:
    Code:
    root@server1:/var/log/apache2# mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 11668
    Server version: 5.1.49-3 (Debian)
    
    Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
    This software comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to modify and redistribute it under the GPL v2 license
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql> bye
        -> ;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'bye' at line 1
    mysql> \q
    Bye

    What should I do next? I really appreciate your help falko. Thank you :)
     
  8. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please check your Apache error log.
     
  9. laptop_user

    laptop_user Member

    Code:
    [Mon Sep 12 20:35:19 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: login in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140, referer: https://www.mywebdomain.com:8080/
    [Mon Sep 12 20:38:15 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: client_group_id in /usr/local/ispconfig/interface/web/dns/dns_soa_edit.php on line 221
    [Mon Sep 12 20:38:15 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: sys_userid in /usr/local/ispconfig/interface/web/dns/dns_soa_edit.php on line 221
    [Mon Sep 12 20:38:15 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: on_after_update in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140
    [Mon Sep 12 20:38:15 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: dns:on_after_update in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140
    [Mon Sep 12 20:38:15 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: dns:dns_soa:on_after_update in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140
    [Mon Sep 12 20:40:55 2011] [notice] caught SIGTERM, shutting down
    [Mon Sep 12 20:40:56 2011] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Mon Sep 12 20:40:56 2011] [warn] RSA server certificate CommonName (CN) `Hadi Akmal' does NOT match server name!?
    [Mon Sep 12 20:40:56 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
    [Mon Sep 12 20:40:56 2011] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Mon Sep 12 20:40:56 2011] [warn] RSA server certificate CommonName (CN) `Hadi Akmal' does NOT match server name!?
    [Mon Sep 12 20:40:56 2011] [notice] Apache/2.2.16 (Debian) mod_fcgid/2.3.6 PHP/5.3.3-7+squeeze1 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o configured -- resuming normal operations
    [Mon Sep 12 21:06:22 2011] [notice] caught SIGTERM, shutting down
    [Mon Sep 12 21:06:23 2011] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Mon Sep 12 21:06:23 2011] [warn] RSA server certificate CommonName (CN) `Hadi Akmal' does NOT match server name!?
    [Mon Sep 12 21:06:23 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
    [Mon Sep 12 21:06:23 2011] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Mon Sep 12 21:06:23 2011] [warn] RSA server certificate CommonName (CN) `Hadi Akmal' does NOT match server name!?
    [Mon Sep 12 21:06:23 2011] [notice] Apache/2.2.16 (Debian) mod_fcgid/2.3.6 PHP/5.3.3-7+squeeze1 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o configured -- resuming normal operations
    [Mon Sep 12 21:14:20 2011] [error] [client 115.135.253.115] client denied by server configuration: /etc/apache2/htdocs
    [Mon Sep 12 21:14:23 2011] [error] [client 115.135.253.115] client denied by server configuration: /etc/apache2/htdocs
    [Tue Sep 13 09:02:27 2011] [error] [client 89.235.6.106] client denied by server configuration: /etc/apache2/htdocs
    [Tue Sep 13 14:24:44 2011] [error] [client 202.129.0.23] client denied by server configuration: /etc/apache2/htdocs
    [Tue Sep 13 17:40:08 2011] [error] [client 86.120.116.82] client denied by server configuration: /etc/apache2/htdocs
    [Tue Sep 13 19:05:15 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: login in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140, referer: https://www.mywebdomain.com:8080/index.php
    [Tue Sep 13 19:05:25 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: client_group_id in /usr/local/ispconfig/interface/web/dns/dns_soa_edit.php on line 221, referer: https://www.mywebdomain.com:8080/index.php
    [Tue Sep 13 19:05:25 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: sys_userid in /usr/local/ispconfig/interface/web/dns/dns_soa_edit.php on line 221, referer: https://www.mywebdomain.com:8080/index.php
    [Tue Sep 13 19:05:25 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: on_after_update in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140, referer: https://www.mywebdomain.com:8080/index.php
    [Tue Sep 13 19:05:25 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: dns:on_after_update in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140, referer: https://www.mywebdomain.com:8080/index.php
    [Tue Sep 13 19:05:25 2011] [error] [client 115.135.253.115] PHP Notice:  Undefined index: dns:dns_soa:on_after_update in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140, referer: https://www.mywebdomain.com:8080/index.php
    
    Not much to help:confused:
     
  10. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Is this from your failed login?
    What's in /etc/apache2/htdocs?
     
  11. laptop_user

    laptop_user Member

    Alhamdullilah I finally managed to get it to work. It turns out the configuration file for /etc/apache2/conf.d/phpmyadmin.conf provided by falko is not compatible with the original configuration file in /etc/phpmyadmin/apache.conf

    So the solution is this. Delete phpmyadmin.conf in /etc/apache2/conf.d/ and after that create symlink with /etc/phpmyadmin/apache.conf file.


    Code:
    ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
    Restart apache after that.
    Code:
    /etc/init.d/apache2 reload
    I get help from here: https://help.ubuntu.com/community/phpMyAdmin
    Maybe if you get any problem during installation you could refer to ubuntu phpmyadmin setup.

    Thanks falko. I really appreciate your effort. :)



    That's not my IP. Maybe someone just trying to scan my vps.
    Code:
    root@server1:~# cat /etc/apache2/htdocs
    cat: /etc/apache2/htdocs: No such file or directory
    Well there's no such thing of htdocs in apache2 directory.:p

    Thanks everyone!:D
     
  12. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    I thought that /etc/phpmyadmin/apache.conf didn't exist on your system, that's why I provided the configuration from one of my servers.
     

Share This Page