Welcome to Centmin Mod Community
Register Now

phpmyadmin 500 ERROR Internal server Error

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

  1. eva2000

    eva2000 Administrator Staff Member

    28,348
    6,438
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,535
    Local Time:
    6:44 PM
    Nginx 1.13.x
    MariaDB 5.5
    never tried it myself but suppose you could try git checkout for a lower branch version if it's available

    in phpmyadmin install directory type where TAGNAME is lower version available from Tags · phpmyadmin/phpmyadmin · GitHub and then restart nginx and php-fpm services
    Code (Text):
    git tag
    git checkout TAGNAME
    nprestart


    however be careful as alot of security and bug fixes are made in newer versions phpmyadmin/ChangeLog at master · phpmyadmin/phpmyadmin · GitHub. Imagine if a certain option deleted data mistakenly from your database when working on a database !

    Just look at fixes in change log for last 3 phpmyadmin updates
     
    • Like Like x 1
  2. Chris D

    Chris D New Member

    9
    6
    3
    Aug 4, 2016
    Ratings:
    +9
    Local Time:
    9:44 AM
    Sorry to bump this but I'm having the same error, though I'll backtrack first...

    I logged in to PhpMyAdmin today and got an error about having no dependencies so I thought I'd go down the route of uninstalling, updating the phpmyadmin.sh script and reinstalling.

    All went well, except now when I log in I just get a 500 ERROR Internal Server Error from nginx.

    I have looked through various error logs, and none of them seem to have anything logged in them about this particular error.

    Any ideas?
     
  3. eva2000

    eva2000 Administrator Staff Member

    28,348
    6,438
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,535
    Local Time:
    6:44 PM
    Nginx 1.13.x
    MariaDB 5.5
    when you uninstall + reinstall, make sure to use latest version of phpmyadmin.sh outlined in 1st post at phpmyadmin.sh Addon
    Code (Text):
    cd /usr/local/src/centminmod/addons
    rm -rf phpmyadmin.sh
    wget --no-check-certificate https://github.com/centminmod/phpmyadmin/raw/master/phpmyadmin.sh
     
  4. Chris D

    Chris D New Member

    9
    6
    3
    Aug 4, 2016
    Ratings:
    +9
    Local Time:
    9:44 AM
    I just double checked and I definitely un/reinstalled using the latest version.

    Which logs would you expect to see an error in? I checked the ones mentioned in the install process and the logs mentioned in the FAQ.
     
  5. eva2000

    eva2000 Administrator Staff Member

    28,348
    6,438
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,535
    Local Time:
    6:44 PM
    Nginx 1.13.x
    MariaDB 5.5
    Are you by any chance behind Cloudflare phpmyadmin 500 ERROR Internal server Error ?

    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
    from GitHub - centminmod/phpmyadmin: phpmyadmin.sh auto installer for Centmin Mod LEMP stack only
     
    • Like Like x 1
  6. Chris D

    Chris D New Member

    9
    6
    3
    Aug 4, 2016
    Ratings:
    +9
    Local Time:
    9:44 AM
    Not right now but might do in the future.

    Code:
    server {
    #         listen   80;
                listen   80 default_server backlog=2048 reuseport;
                server_name my.vps.address;
                root   html;
    
            access_log              /var/log/nginx/localhost.access.log     main buffer=256k flush=5m;
            error_log               /var/log/nginx/localhost.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;
    
    # limit_conn limit_per_ip 16;
    # ssi  on;
    
            location /nginx_status {
            stub_status on;
            access_log   off;
            allow 127.0.0.1;
            #allow youripaddress;
            deny all;
            }
    
                location / {
    
    # block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;
    
    #         Enables directory listings when index file not found
    #        autoindex  on;
    
    #        Shows file listing times as local time
    #        autoindex_localtime on;
    
    #        Enable for vBulletin usage WITHOUT vbSEO installed
    #        try_files        $uri $uri/ /index.php;
               
                }
    
            # example nginx-http-concat
            # /csstest/??one.css,two.css
            #location /csstest {
            #concat on;
            #concat_max_files 20;
            #}
    
    include /usr/local/nginx/conf/phpmyadmin.conf;
    include /usr/local/nginx/conf/staticfiles.conf;
    include /usr/local/nginx/conf/include_opcache.conf;
    include /usr/local/nginx/conf/php.conf;
    #include /usr/local/nginx/conf/phpstatus.conf;
    include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    include /usr/local/nginx/conf/vts_mainserver.conf;
    
           }
    
    Code:
    # https SSL SPDY phpmyadmin
    server {
            listen 443 ssl http2;
                server_name my.vps.address;
                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/my.vps.address.crt;
            ssl_certificate_key  /usr/local/nginx/conf/ssl/my.vps.address.key;
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
            ssl_session_cache      shared:SSL:10m;
            ssl_session_timeout  10m;
            # mozilla recommended
            ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+ECDSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+SHA384:EECDH+AES128:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!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;
            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;
    }
    
    Code:
    location ^~ /31793_mysqladmin8596/ {
        rewrite ^/(.*) https://my.vps.address/$1 permanent;
    }
    
    Just checking these again:
    Empty

    This contains access entries for the previous vhost before it was uninstalled.

    The only thing here is some authentication failures from earlier today when I made a typo.
     
  7. eva2000

    eva2000 Administrator Staff Member

    28,348
    6,438
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,535
    Local Time:
    6:44 PM
    Nginx 1.13.x
    MariaDB 5.5
    looks fine to me nginx config wise

    tried restarting both nginx and php-fpm ?
    Code (Text):
    nprestart
    
     
  8. Chris D

    Chris D New Member

    9
    6
    3
    Aug 4, 2016
    Ratings:
    +9
    Local Time:
    9:44 AM
    Yeah, a few times.

    Maybe I should try the uninstall and reinstall again, just to make sure.

    Aside from the uninstall script, any other steps/precautions to take?
     
  9. eva2000

    eva2000 Administrator Staff Member

    28,348
    6,438
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,535
    Local Time:
    6:44 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  10. Chris D

    Chris D New Member

    9
    6
    3
    Aug 4, 2016
    Ratings:
    +9
    Local Time:
    9:44 AM
    It didn't work, unfortunately.

    I'm going to try and have another look over everything and see if I can figure this out then I'll report back.
     
    • Like Like x 1
  11. Chris D

    Chris D New Member

    9
    6
    3
    Aug 4, 2016
    Ratings:
    +9
    Local Time:
    9:44 AM
    Seems like the error can be tracked down to PhpMyAdmin's session initialisation. It's so annoying this error has been swallowed somewhere and not in any logs, but via code debugging I've tracked it back to here:
    Code:
    array(1) {
      ["038f31a7ce93f071be74743932831ff5"]=>
      object(PMA\libraries\Error)#4 (12) {
       ["file":protected]=>
       string(27) "./libraries/session.inc.php"
       ["line":protected]=>
       int(135)
       ["backtrace":protected]=>
       array(3) {
         [0]=>
         array(3) {
           ["file"]=>
           string(27) "./libraries/session.inc.php"
           ["line"]=>
           int(135)
           ["function"]=>
           string(13) "session_start"
         }
         [1]=>
         array(4) {
           ["file"]=>
           string(26) "./libraries/common.inc.php"
           ["line"]=>
           int(258)
           ["function"]=>
           string(7) "require"
           ["args"]=>
           array(1) {
             [0]=>
             string(27) "./libraries/session.inc.php"
           }
         }
         [2]=>
         array(4) {
           ["file"]=>
           string(11) "./index.php"
           ["line"]=>
           int(21)
           ["function"]=>
           string(12) "require_once"
           ["args"]=>
           array(1) {
             [0]=>
             string(26) "./libraries/common.inc.php"
           }
         }
       }
       ["hide_location":protected]=>
       bool(false)
       ["number":protected]=>
       int(2)
       ["string":protected]=>
       string(0) ""
       ["message":protected]=>
       string(86) "session_start(): Cannot find serialization handler 'igbinary' - session startup failed"
       ["isDisplayed":protected]=>
       bool(false)
       ["useBBCode":protected]=>
       bool(false)
       ["hash":protected]=>
       string(32) "038f31a7ce93f071be74743932831ff5"
       ["params":protected]=>
       array(0) {
       }
       ["addedMessages":protected]=>
       array(0) {
       }
      }
    }
    Still looking into it, but I'm assuming it's the missing serialization handler 'igbinary' bit.
     
    • Informative Informative x 1
  12. Chris D

    Chris D New Member

    9
    6
    3
    Aug 4, 2016
    Ratings:
    +9
    Local Time:
    9:44 AM
    Indeed that was it. I'm not actually sure why the extension is missing.

    I am running the latest stable version of centminmod and PHP 7.1.6 and based on the following I assumed that igbinary would get reinstalled, but it doesn't:
    Beta Branch - update igbinary php 7 routine

    I'm disabling igbinary for now and that does let me log in to phpMyAdmin, but seems odd it isn't resurfacing. For good measure I've just ran option 5 to reinstall 7.1.6 and still no luck.
     
    • Informative Informative x 2
  13. Sunka

    Sunka Active Member

    875
    223
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +364
    Local Time:
    10:44 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    • Like Like x 2
    • Agree Agree x 1
  14. eva2000

    eva2000 Administrator Staff Member

    28,348
    6,438
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,535
    Local Time:
    6:44 PM
    Nginx 1.13.x
    MariaDB 5.5
    Ah yes 123.09beta91 is more compatible with PHP 7's extensions than 123.08stable ! ;) Switching to 123.09beta01 via centmin.sh menu option 23 submenu option 3 specifying 123.09beta01 branch + then exiting centmin.sh + re-run centmin.sh menu option 5 for PHP 7.1.7 update would probably fix it.
     
    • Like Like x 1
    • Winner Winner x 1
  15. Chris D

    Chris D New Member

    9
    6
    3
    Aug 4, 2016
    Ratings:
    +9
    Local Time:
    9:44 AM
    All sorted now thanks guys.
     
    • Like Like x 1
    • Optimistic Optimistic x 1
  16. eva2000

    eva2000 Administrator Staff Member

    28,348
    6,438
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,535
    Local Time:
    6:44 PM
    Nginx 1.13.x
    MariaDB 5.5
    Glad to hear :)
     
    • Like Like x 2