Learn about Centmin Mod LEMP Stack today
Become a Member

phpmyadmin 500 ERROR Internal server Error

Discussion in 'Add Ons' started by FAPM, Feb 25, 2016.

  1. FAPM

    FAPM Member

    58
    4
    8
    Jul 16, 2015
    Ratings:
    +6
    Local Time:
    4:49 AM
    1.9.2
    10.0.20
    Hi,
    For some days I get, 500 ERROR Internal server Error :/ on phpmyadmin
    I tried to update, it does not change
    Why it does not work without changes

    Thanks ALL

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    maybe similar problem to @pamamolf Nginx - Nginx 404 not found on index page | Centmin Mod Community

    did you recently update centmin mod code ? which branch you on ?

    When you create a new nginx vhost domain via centmin.sh menu option 2 or /usr/bin/nv cli command line, you will create the Nginx vhost files and directories. You will get an outputted the path location where it will create the domain name's vhost conf file named newdomain.com.conf (and newdomain.com.ssl.conf if you selected yes to self signed SSL)
    • Nginx vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.conf
    • Nginx HTTP/2 SSL vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf
    • Nginx Self-Signed SSL Certificate Directory at /usr/local/nginx/conf/ssl/newdomain.com
    • Vhost public web root will be at /home/nginx/domains/newdomain.com/public
    • Vhost log directory will be at /home/nginx/domains/newdomain.com/log
    Please post the contents of /usr/local/nginx/conf/conf.d/newdomain.com.conf and if applicable /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf wrapped in CODE tags (outlined at How to use forum BBCODE code tags | Centmin Mod Community
     
  3. FAPM

    FAPM Member

    58
    4
    8
    Jul 16, 2015
    Ratings:
    +6
    Local Time:
    4:49 AM
    1.9.2
    10.0.20
    Hi Eva,

    did you recently update centmin mod code ? which branch you on ? No, only phpmyadmin update .sh
    123 eva2000.08

    Code ? on my phpmyadmin_ssl.conf ?
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    123.08stable and 123.09beta01 do get updates you can follow the threads listed below via watch/subscribe too. Updates done today for Nginx 1.9.12 compatibility issues too Nginx - [nginx-announce] nginx-1.9.12. None though would be related to 500 errors on phpmyadmin

    To update your Centmin Mod builds follow instructions at centminmod.com/upgrade.html and respective version threads below:
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    A few things to try
    • If you upgraded PHP after you installed phpmyadmin addon, try clearing browser cache and restarting nginx and php-fpm
    • Check nginx error and access log - FAQ item 19 and Config Files page for overview.
    • Ensure you have a valid DNS for the main hostname pointing to your server's IP address
    • Ensure main hostname is setup as per step 1 of Getting Started Guide where main hostname is not the same as a site's nginx vhost domain name. They have to be different as outlined in the difference and summary of Getting Started Guide.
      This allows the main hostname vhost to house all the PHP and nginx statistic pages and phpmyadmin urls.
    • So ensure the server_name listed in main hostname vhost at /usr/local/nginx/conf/conf.d/virtual.conf isn't referenced in other nginx domain vhost files.
    Post contents of these files wrapped in BBCODE CODE tags
    • /usr/local/nginx/conf/conf.d/virtual.conf
    • /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf
    • /usr/local/nginx/conf/phpmyadmin.conf
     
  6. pamamolf

    pamamolf Premium Member Premium Member

    4,086
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    5:49 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    I got also 500 error on phpmyadmin and all problems fixed by commenting here :

    Code:
    /usr/local/nginx/conf/conf.d/sub.domain.com.conf
    this line:

    Code:
    #include /usr/local/nginx/conf/503include-main.conf;
    restart phpfpm and nginx and all will be great :) Maybe you will need to clear your cache also....
     
  7. pamamolf

    pamamolf Premium Member Premium Member

    4,086
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    5:49 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Ooops i just check again the phpmyadmin and i am getting also 500 internal server error :(
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    sounds like a completely separate issue then
     
  9. FAPM

    FAPM Member

    58
    4
    8
    Jul 16, 2015
    Ratings:
    +6
    Local Time:
    4:49 AM
    1.9.2
    10.0.20
    yeah :)
     
  10. FAPM

    FAPM Member

    58
    4
    8
    Jul 16, 2015
    Ratings:
    +6
    Local Time:
    4:49 AM
    1.9.2
    10.0.20
    Code:
    # https SSL SPDY phpmyadmin
    server {
            listen 443 ssl http2;
                server_name xx;
                root   html;
    
    keepalive_timeout  3000;
    
    client_body_buffer_size 256k;
    client_body_timeout 3000s;
    client_header_buffer_size 256k;
    ## how long a connection has to complete sending
    ## it's headers for request to be processed
    client_header_timeout  60s;
    client_max_body_size 512m;
    connection_pool_size  512;
    directio  512m;
    ignore_invalid_headers on;
    large_client_header_buffers 8 256k;
    
            ssl_certificate      /usr/local/nginx/conf/ssl/xx.crt;
            ssl_certificate_key  /usr/local/nginx/conf/ssl/xx.key;
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
            ssl_session_cache      shared:SSL:10m;
            ssl_session_timeout  10m;
            # mozilla recommended
            ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!CAMELLIA;
            ssl_prefer_server_ciphers   on;
            ##add_header Alternate-Protocol  443:npn-spdy/3;
            #add_header Strict-Transport-Security "max-age=0; includeSubdomains;";
            add_header X-Frame-Options SAMEORIGIN;
            ###spdy_headers_comp 5;
            ssl_buffer_size 1400;
            ssl_session_tickets on;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
            access_log              /var/log/nginx/localhost_ssl.access.log     main buffer=32k;
            error_log               /var/log/nginx/localhost_ssl.error.log      error;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
        location / {
            return 302 http://$server_name$request_uri;
        }
       
      include /usr/local/nginx/conf/phpmyadmin_https.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      #include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      include /usr/local/nginx/conf/errorpage.conf;
    }
    
     
  11. abs0lut3

    abs0lut3 New Member

    7
    2
    3
    Jan 10, 2016
    Kiev, Ukraine
    Ratings:
    +3
    Local Time:
    5:49 AM
    1.9.12
    MariaDB 10.1
    Yep, got the same issue "automatically" :)

    The problem that phpmyadmin_install.sh sets up weird 4.7.0-dev version...
    Issue with ./vendor/autoload.php file absent in php include... that's gives 500 error.

    I didn't found any refs of that version on official PMA...
    4.6.0 only got alpha... very weird!

    Solved by installing official 4.5.5 from PMA website!
     
  12. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ah i see .. phpmyadmin.sh uses latest master version, might need to switch to stable :D
     
  13. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    hmm i am already using stable
    Code:
    cd $BASEDIR
    git clone --depth=1 git://github.com/phpmyadmin/phpmyadmin.git $DIRNAME
    cd $DIRNAME
    git checkout -t origin/STABLE
     
  14. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  15. FAPM

    FAPM Member

    58
    4
    8
    Jul 16, 2015
    Ratings:
    +6
    Local Time:
    4:49 AM
    1.9.2
    10.0.20
    update via option 23, option 2 ? on centmin.sh ?
     
  16. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    phpmyadmin.sh is totally separate code at GitHub - centminmod/phpmyadmin: phpmyadmin.sh auto installer for Centmin Mod LEMP stack only

    see phpmyadmin.sh Addon | Centmin Mod Community and Addon phpmyadmin.sh - CentminMod.com LEMP Nginx web stack for CentOS so just replace your copy of phpmyadmin.sh with updated one at GitHub - centminmod/phpmyadmin: phpmyadmin.sh auto installer for Centmin Mod LEMP stack only

    Code:
    cd /usr/local/src/centminmod/addons
    rm -rf phpmyadmin.sh
    wget --no-check-certificate https://github.com/centminmod/phpmyadmin/raw/master/phpmyadmin.sh
    uninstall old version Addon phpmyadmin.sh - CentminMod.com LEMP Nginx web stack for CentOS

    and install again
     
  17. FAPM

    FAPM Member

    58
    4
    8
    Jul 16, 2015
    Ratings:
    +6
    Local Time:
    4:49 AM
    1.9.2
    10.0.20
    reinstall : OK
    It's OK now => 4.5.5
    Thanks ALL
     
  18. abs0lut3

    abs0lut3 New Member

    7
    2
    3
    Jan 10, 2016
    Kiev, Ukraine
    Ratings:
    +3
    Local Time:
    5:49 AM
    1.9.12
    MariaDB 10.1
    Reinstalled PMA. Got 4.5.5 working fine!
     
  19. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yay ! finally fixed seems the stable tag is dev build so switched to stable branch instead of tag!
     
  20. pamamolf

    pamamolf Premium Member Premium Member

    4,086
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    5:49 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Code:
    cd /usr/local/src/centminmod/addons
    rm -rf phpmyadmin.sh
    wget --no-check-certificate https://github.com/centminmod/phpmyadmin/raw/master/phpmyadmin.sh

    Now i am getting :

    Code:
    ERR_TOO_MANY_REDIRECTS
    Maybe is related to Libressl or Openssl ?

    I just try it also in another browser in case of cookies issue but nothing :(

    I try to uninstall and then install again but doesn't work :(

    Using always latest centminmod beta...

    What i can see from localhost.access.log:

    Code:
    [01/Mar/2016:17:30:52 +0000] GET /11495_mysqladmin1199/ HTTP/1.1 "301"
    Code:
    # https SSL SPDY phpmyadmin
    server {
            listen 443 ssl http2;
                server_name server.domain.com;
                root   html;
    
    keepalive_timeout  3000;
    
    client_body_buffer_size 256k;
    client_body_timeout 3000s;
    client_header_buffer_size 256k;
    ## how long a connection has to complete sending
    ## it's headers for request to be processed
    client_header_timeout  60s;
    client_max_body_size 512m;
    connection_pool_size  512;
    directio  512m;
    ignore_invalid_headers on;
    large_client_header_buffers 8 256k;
    
            ssl_certificate      /usr/local/nginx/conf/ssl/server.domain.com.crt;
            ssl_certificate_key  /usr/local/nginx/conf/ssl/server.domain.com.key;
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
            ssl_session_cache      shared:SSL:10m;
            ssl_session_timeout  10m;
            # mozilla recommended
            ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!CAMELLIA;
            ssl_prefer_server_ciphers   on;
            #add_header Alternate-Protocol  443:npn-spdy/3;
            #add_header Strict-Transport-Security "max-age=0; includeSubdomains;";
            add_header X-Frame-Options SAMEORIGIN;
            #spdy_headers_comp 5;
            ssl_buffer_size 1400;
            ssl_session_tickets on;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
            access_log              /var/log/nginx/localhost_ssl.access.log     main buffer=32k;
            error_log               /var/log/nginx/localhost_ssl.error.log      error;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
        location / {
            return 302 http://$server_name$request_uri;
        }
    
      include /usr/local/nginx/conf/phpmyadmin_https.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      #include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      include /usr/local/nginx/conf/errorpage.conf;
    }
    
    phpmyadmin.conf:

    Code:
    location ^~ /11495_mysqladmin1199/ {
       rewrite ^/(.*) https://server.domain.com/$1 permanent;
    }
    php_11495_mysqladmin1199.conf:

    Code:
    location ~ \.php$ {
      include /usr/local/nginx/conf/503include-only.conf;
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        ##fastcgi_pass   127.0.0.1:9001;
        fastcgi_next_upstream error timeout http_500 http_503;
        #fastcgi_pass phpbackend;
        fastcgi_keep_conn on;
        fastcgi_pass   unix:/tmp/phpfpm_myadmin.sock;
        fastcgi_index  index.php;
        #fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_FILENAME    $request_filename;
        fastcgi_param PHP_ADMIN_VALUE open_basedir=$document_root/:/usr/local/lib/php/:/tmp/;
    
    # might shave 200+ ms off PHP requests
    # which don't pass on a content length header
    # slightly faster page response time at the
    # expense of throughput / scalability
    #sendfile on;
    #tcp_nopush off;
    #keepalive_requests 0;
    
    fastcgi_connect_timeout 3000;
    fastcgi_send_timeout 3000;
    fastcgi_read_timeout 3000;
    fastcgi_buffer_size 512k;
    fastcgi_buffers 512 16k;
    fastcgi_busy_buffers_size 1m;
    fastcgi_temp_file_write_size 4m;
    fastcgi_max_temp_file_size 4m;
    fastcgi_intercept_errors on;
    
    # next 3 lines when uncommented / enabled
    # allow Nginx to handle uploads which then
    # passes back the completed upload to PHP
    #fastcgi_pass_request_body off;
    #client_body_in_file_only clean;
    #fastcgi_param  REQUEST_BODY_FILE  $request_body_file;
    
    #new .04+ map method
    fastcgi_param HTTPS $server_https;
    
    # comment out PATH_TRANSLATED line if /usr/local/lib/php.ini sets following:
    # cgi.fix_pathinfo=0
    # as of centminmod v1.2.3-eva2000.01 default is set to cgi.fix_pathinfo=1
    
    fastcgi_param  PATH_INFO          $fastcgi_path_info;
    fastcgi_param  PATH_TRANSLATED    $document_root$fastcgi_path_info;
    
    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  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;
    
    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
    
    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;
    
    # Set php-fpm geoip variables
    fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;
    fastcgi_param GEOIP_COUNTRY_CODE3 $geoip_country_code3;
    fastcgi_param GEOIP_COUNTRY_NAME $geoip_country_name;
    fastcgi_param GEOIP_CITY_COUNTRY_CODE $geoip_city_country_code;
    fastcgi_param GEOIP_CITY_COUNTRY_CODE3 $geoip_city_country_code3;
    fastcgi_param GEOIP_CITY_COUNTRY_NAME $geoip_city_country_name;
    fastcgi_param GEOIP_REGION $geoip_region;
    fastcgi_param GEOIP_CITY $geoip_city;
    fastcgi_param GEOIP_POSTAL_CODE $geoip_postal_code;
    fastcgi_param GEOIP_CITY_CONTINENT_CODE $geoip_city_continent_code;
    fastcgi_param GEOIP_LATITUDE $geoip_latitude;
    fastcgi_param GEOIP_LONGITUDE $geoip_longitude;
    
    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;
    
                       }
     
    Last edited: Mar 2, 2016