phpmyadmin 500 error, just on one server

Discussion in 'Installation/Configuration' started by Jorem, May 18, 2012.

  1. Jorem

    Jorem New Member

    I have a Ubuntu 10.04 server and a new Ubuntu 12.04 server. On both the servers the phpmyadmin files are the same. But on the 12.04 server I get a 500 server error.

    I read multiple posts about the problem and followed the tips there. But still do not get it to work. Not on :8080/phpmyadmin or domain.tld/phpmyadmin

    My apache2 logfile does not show a error. Only the init set error, but that is just a warning.

    Is there a way to let phpmyadmin log the error's, or is this a apache problem?

    On the server I have ossec-hids, apc, memcache, mod_deflate and mod_security installed. Removed theme all, restarted the server, but still not working. Same software is also installed on the 10.04 server, and there phpmyadmin is working.

    Where else can I look to find the error?

    Thanks for your help.
     
  2. till

    till Super Moderator

    Please post the content of the apache phpmyadmin.conf file of that server, it should be in /etc/apache2/conf/
     
  3. Jorem

    Jorem New Member

    In /etc/apache2/conf.d/ i have a symlink file phpmyadmin.conf to /etc/phpmyadmin/apache.conf
    I do not have a /etc/apache2/conf directory.

    Content of the apache.conf file:

    # 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_admin_flag allow_url_fopen Off
    php_value include_path .
    php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
    php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
    </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>
     
    Last edited: May 21, 2012
  4. till

    till Super Moderator

    Thst ok,it should use mod_php for the phpmyadmin folder. I had a similar issue some time ago related to one of the php_flag and php_admin settings. Please try to comment out the lines starting with php_flag and php_value in the phpmyadmin.conf file and restart apache.
     
  5. Jorem

    Jorem New Member

    <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_admin_flag allow_url_fopen Off
    #php_value include_path .
    php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
    php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
    </IfModule>

    Still a 500 error and nothing in the apache log file.

    I just thought about webmail that also uses a alias and tried that. /webmail is working good.
    So is it really a problem with apache (and alias), or is there something wrong with the phpmyadmin files in /usr/share/phpmyadmin then?
     
  6. till

    till Super Moderator

    You missed the lines:

    php_admin_flag allow_url_fopen Off
    php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
    php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/

    Please comment them out too and restart apache.
     
  7. Jorem

    Jorem New Member

    Still 500 error after restart apache.

    Checked the open-basedir setting in ISPConfig but that looks ok too:
    /usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin

    Tried with the ip adress again. But also the 500 server error.

    What i did next was I put a index.html in the /usr/share/phpmyadmin folder with some dummy text in it.
    When I go to the url http://myip/phpmyadmin/index.html the page with dummy text is shown.

    Alias works, but the index.php gives the error I think. How can I check what is going wrong?
     
  8. Jorem

    Jorem New Member

    My phpmyadmin is working now :).

    I made a copy of the phpmyadmin folder on my Ubuntu 10.04 server, extracted it on the Ubuntu 12.04 server and it works great now.
     
  9. Taken

    Taken New Member

    Same problem here, Ubuntu Server 11.04, apache+php OK, but phpmyadmin error 500 :(. Any new idea?

    Thanks!
     
  10. falko

    falko Super Moderator

    What's the content of /etc/apache2/conf.d/phpmyadmin.conf?
    Any errors in your Apache logs?
     
  11. Taken

    Taken New Member

    Apache log:

    Code:
    [Thu May 24 18:11:14 2012] [notice] caught SIGTERM, shutting down
    [Thu May 24 18:11:15 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Thu May 24 18:11:15 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Thu May 24 18:11:15 2012] [notice] Apache/2.2.17 (Ubuntu) PHP/5.3.13-1~dotdeb.0 with Suhosin-Patch mod_scgi/1.13 mod_ssl/2.2.17 OpenSSL/0.9.8o confiured -- resuming normal operations
    
    /etc/apache2/conf.d/phpmyadmin.conf

    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_admin_flag allow_url_fopen Off
                    php_value include_path .
                    php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
                    php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
            </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 think it's alright, but doesn't work :(.

    Thanks.
     
  12. falko

    falko Super Moderator

    Looks ok. Do you have mod_php installed?
     
  13. djbill

    djbill New Member

    Hi, i follow The Perfect Server – Debian Wheezy (Apache2, BIND, Dovecot, ISPConfig 3) and i have the same error.

    ISPConfig works fine but...

    I get 500 error and when i visit "http://<myserver>/phpmyadmin/" a download of try to starts.

    I follow previous recomendation on this post with unsucessfull results.

    Apache errors when i do "/etc/init.d/apache2 restart":
    Code:
    [Mon May 13 23:20:19 2013] [notice] caught SIGTERM, shutting down
    [Mon May 13 23:20:21 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Mon May 13 23:20:21 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
    [Mon May 13 23:20:21 2013] [notice] FastCGI: process manager initialized (pid 10101)
    [Mon May 13 23:20:21 2013] [error] python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'.
    [Mon May 13 23:20:21 2013] [error] python_init: Python executable found '/usr/bin/python'.
    [Mon May 13 23:20:21 2013] [error] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
    [Mon May 13 23:20:21 2013] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
    [Mon May 13 23:20:21 2013] [notice] mod_python: using mutex_directory /tmp
    [Mon May 13 23:20:21 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Mon May 13 23:20:21 2013] [notice] Apache/2.2.22 (Debian) mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_fcgid/2.3.6 PHP/5.4.4-14 mod_python/3.3.1 Python/2.7.3 mod_ruby/1.2.6 Ruby/1.8.7(2012-02-08) mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
    
    Actually "phpmyadmin.conf":
    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_admin_flag allow_url_fopen Off
    #               php_value include_path .
    #               php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
    #               php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
            </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>
    
    There are my "/etc/apache2/mods-enabled":
    Code:
    lrwxrwxrwx 1 root root 30 May 13 19:57 actions.conf -> ../mods-available/actions.conf
    lrwxrwxrwx 1 root root 30 May 13 19:57 actions.load -> ../mods-available/actions.load
    lrwxrwxrwx 1 root root 28 May 13 19:55 alias.conf -> ../mods-available/alias.conf
    lrwxrwxrwx 1 root root 28 May 13 19:55 alias.load -> ../mods-available/alias.load
    lrwxrwxrwx 1 root root 33 May 13 19:55 auth_basic.load -> ../mods-available/auth_basic.load
    lrwxrwxrwx 1 root root 33 May 13 19:55 authn_file.load -> ../mods-available/authn_file.load
    lrwxrwxrwx 1 root root 36 May 13 19:55 authz_default.load -> ../mods-available/authz_default.load
    lrwxrwxrwx 1 root root 38 May 13 19:55 authz_groupfile.load -> ../mods-available/authz_groupfile.load
    lrwxrwxrwx 1 root root 33 May 13 19:55 authz_host.load -> ../mods-available/authz_host.load
    lrwxrwxrwx 1 root root 33 May 13 19:55 authz_user.load -> ../mods-available/authz_user.load
    lrwxrwxrwx 1 root root 32 May 13 19:55 autoindex.conf -> ../mods-available/autoindex.conf
    lrwxrwxrwx 1 root root 32 May 13 19:55 autoindex.load -> ../mods-available/autoindex.load
    lrwxrwxrwx 1 root root 26 May 13 19:55 cgi.load -> ../mods-available/cgi.load
    lrwxrwxrwx 1 root root 30 May 13 19:55 deflate.conf -> ../mods-available/deflate.conf
    lrwxrwxrwx 1 root root 30 May 13 19:55 deflate.load -> ../mods-available/deflate.load
    lrwxrwxrwx 1 root root 26 May 13 19:55 dir.conf -> ../mods-available/dir.conf
    lrwxrwxrwx 1 root root 26 May 13 19:55 dir.load -> ../mods-available/dir.load
    lrwxrwxrwx 1 root root 26 May 13 19:55 env.load -> ../mods-available/env.load
    lrwxrwxrwx 1 root root 30 May 13 19:58 fastcgi.conf -> ../mods-available/fastcgi.conf
    lrwxrwxrwx 1 root root 30 May 13 19:58 fastcgi.load -> ../mods-available/fastcgi.load
    lrwxrwxrwx 1 root root 28 May 13 19:56 fcgid.conf -> ../mods-available/fcgid.conf
    lrwxrwxrwx 1 root root 28 May 13 19:56 fcgid.load -> ../mods-available/fcgid.load
    lrwxrwxrwx 1 root root 30 May 13 19:57 include.load -> ../mods-available/include.load
    lrwxrwxrwx 1 root root 27 May 13 19:55 mime.conf -> ../mods-available/mime.conf
    lrwxrwxrwx 1 root root 27 May 13 19:55 mime.load -> ../mods-available/mime.load
    lrwxrwxrwx 1 root root 34 May 13 19:55 negotiation.conf -> ../mods-available/negotiation.conf
    lrwxrwxrwx 1 root root 34 May 13 19:55 negotiation.load -> ../mods-available/negotiation.load
    lrwxrwxrwx 1 root root 27 May 13 22:58 php5.conf -> ../mods-available/php5.conf
    lrwxrwxrwx 1 root root 27 May 13 22:58 php5.load -> ../mods-available/php5.load
    lrwxrwxrwx 1 root root 29 May 13 19:56 python.load -> ../mods-available/python.load
    lrwxrwxrwx 1 root root 33 May 13 19:55 reqtimeout.conf -> ../mods-available/reqtimeout.conf
    lrwxrwxrwx 1 root root 33 May 13 19:55 reqtimeout.load -> ../mods-available/reqtimeout.load
    lrwxrwxrwx 1 root root 30 May 13 19:57 rewrite.load -> ../mods-available/rewrite.load
    lrwxrwxrwx 1 root root 27 May 13 19:56 ruby.load -> ../mods-available/ruby.load
    lrwxrwxrwx 1 root root 31 May 13 19:55 setenvif.conf -> ../mods-available/setenvif.conf
    lrwxrwxrwx 1 root root 31 May 13 19:55 setenvif.load -> ../mods-available/setenvif.load
    lrwxrwxrwx 1 root root 26 May 13 19:57 ssl.conf -> ../mods-available/ssl.conf
    lrwxrwxrwx 1 root root 26 May 13 19:57 ssl.load -> ../mods-available/ssl.load
    lrwxrwxrwx 1 root root 29 May 13 19:55 status.conf -> ../mods-available/status.conf
    lrwxrwxrwx 1 root root 29 May 13 19:55 status.load -> ../mods-available/status.load
    lrwxrwxrwx 1 root root 29 May 13 19:57 suexec.load -> ../mods-available/suexec.load
    lrwxrwxrwx 1 root root 28 May 13 19:56 suphp.conf -> ../mods-available/suphp.conf
    lrwxrwxrwx 1 root root 28 May 13 19:56 suphp.load -> ../mods-available/suphp.load
    
    Thanks in advance for your help.
     
    Last edited: May 13, 2013
  14. DUCKFACE

    DUCKFACE New Member

    i have the same problem
    here is the apache log
    Code:
    [Thu May 23 06:47:55 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
    [Thu May 23 06:47:55 2013] [notice] Digest: generating secret for digest authentication ...
    [Thu May 23 06:47:55 2013] [notice] Digest: done
    [Thu May 23 06:47:55 2013] [notice] FastCGI: process manager initialized (pid 28534)
    [Thu May 23 06:47:55 2013] [notice] Apache/2.2.22 (Ubuntu) DAV/2 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_fcgid/2.3.7 proxy_html/3.0.1 mod_ruby/1.2.6 Ruby/1.8.7(2012-02-08) mod_ssl/2.2.22 OpenSSL/1.0.1c configured -- resuming normal operations
    [Thu May 23 06:47:55 2013] [warn] long lost child came home! (pid 25026)
    here is the phpmyadmin.apache.conf
    Code:
    # phpMyAdmin default Apache configuration
    
    Alias /myalias /usr/share/phpmyadmin
    
    <Directory /usr/share/phpmyadmin>
    	Options FollowSymLinks
    	DirectoryIndex index.php
    	#Make use of .htpasswd
    	AuthType Basic
    	AuthName "Enter account information to log-in"
    	AuthUserFile /usr/share/phpmyadmin/.htpasswd
    	Require valid-user
    
    	<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_admin_flag allow_url_fopen Off
    		php_value include_path .
    		php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
    		php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
    
    	</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>
     
  15. djbill

    djbill New Member

    Hi, I finally found the problem on /etc/apache2/mods-available/suphp.conf

    This is my working suphp.conf:

    Code:
    <IfModule mod_suphp.c>
        #<FilesMatch "\.ph(p3?|tml)$">
        #    SetHandler application/x-httpd-suphp
        #</FilesMatch>
            AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml
            suPHP_AddHandler application/x-httpd-suphp
    
        <Directory />
            suPHP_Engine on
        </Directory>
    
        # By default, disable suPHP for debian packaged web applications as files
        # are owned by root and cannot be executed by suPHP because of min_uid.
        <Directory /usr/share>
            suPHP_Engine off
        </Directory>
    
    # # Use a specific php config file (a dir which contains a php.ini file)
    #       suPHP_ConfigPath /etc/php5/cgi/suphp/
    # # Tells mod_suphp NOT to handle requests with the type <mime-type>.
    #       suPHP_RemoveHandler <mime-type>
    </IfModule>
    
     
  16. DUCKFACE

    DUCKFACE New Member

    its not working for me.
    anyone can help ?
     
    Last edited: May 24, 2013

Share This Page