This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Can Not Log Into PHPMyAdmin or Webmail after upgrading to PHP 7.1.24
#1
Can Not Log Into PHPMyAdmin or Webmail after upgrading to PHP 7.1.24
Hello! 

I hope you are doing better than me! For the last few weeks, I've been searching for an alternative to cPanel/WHM, as I've moved away from a hosting environment, to managing my own VPS's on a Dell PowerEdge R710 running VMware ESXi 6.7, in my home lab. 

After much trial and error, Sentora was the first admin panel I could get up and running, despite having a few bugs to work through. Mostly, PHP-related problems. I found the steps to upgrade from 5.5 to 5.6, then from 5.6 to 7.1, and I rebuilt suhosen each time. While 7.1 has provided the most site functionality, I now get 500 errors when I try to log into PHPMyAdmin or RoundCube Webmail! I have also noticed a couple other admin functions that cause errors. 

The login pages load, but when given the proper credentials, they return 500 errors. 

I would really like to get back access to PHPMyAdmin so I can backup the databases, but it won't let me, and it's rather frustrating! 

Any and all assistance you can provide me would be GREATLY appreciated! 

Cheers!
Reply
Thanks given by:
#2
RE: Can Not Log Into PHPMyAdmin or Webmail after upgrading to PHP 7.1.24
(11-20-2018, 05:24 PM)King0321 Wrote: Hello! 

I hope you are doing better than me! For the last few weeks, I've been searching for an alternative to cPanel/WHM, as I've moved away from a hosting environment, to managing my own VPS's on a Dell PowerEdge R710 running VMware ESXi 6.7, in my home lab. 

After much trial and error, Sentora was the first admin panel I could get up and running, despite having a few bugs to work through. Mostly, PHP-related problems. I found the steps to upgrade from 5.5 to 5.6, then from 5.6 to 7.1, and I rebuilt suhosen each time. While 7.1 has provided the most site functionality, I now get 500 errors when I try to log into PHPMyAdmin or RoundCube Webmail! I have also noticed a couple other admin functions that cause errors. 

The login pages load, but when given the proper credentials, they return 500 errors. 

I would really like to get back access to PHPMyAdmin so I can backup the databases, but it won't let me, and it's rather frustrating! 

Any and all assistance you can provide me would be GREATLY appreciated! 

Cheers!

There is no reliable version of Suhosin available for PHP 7+, so not sure what you have done there but your server is now either going to be insecure or buggy.

The version of Roundcube that comes with Sentora is slightly out of date now, so pre-dates compatibility with PHP 7+. You could update your PHPMyAdmin and Roundcube packages and see if that fixes anything, but you'll need to know what you're doing as you don't want to overwrite symbolic links or lose your configuration - unless this is a test-bed server that you are happy to reinstall for testing purposes.

Also, what do you mean by "While 7.1 has provided the most site functionality"? What didn't work with PHP 5 that now works with PHP 7.1?

Keith.
Reply
Thanks given by:
#3
RE: Can Not Log Into PHPMyAdmin or Webmail after upgrading to PHP 7.1.24
Hi Keith,

Off the top of my head, I can't remember the specifics of what wasn't working and at which point. I remember having various issues with 500 errors dependent on which plugins were activated in WP. I believe it was more something to do with WooCommerce and the lack of security in older PHP versions. Due to WooCommerce handling sensitive information, I suppose they wish to take all precautions.

Fortunately, I have IMAP setup and my mail is forwarding to a client I can access, but I would really like to get access to webmail back at this point. Is there a way for me to delete and reinstall/rebuild PHP Suhosin, returning it to 5.6? If so, it would really help me right now, I think!

Cheers,

Mike
Reply
Thanks given by:
#4
RE: Can Not Log Into PHPMyAdmin or Webmail after upgrading to PHP 7.1.24
(11-21-2018, 05:36 PM)King0321 Wrote: Hi Keith,

Off the top of my head, I can't remember the specifics of what wasn't working and at which point. I remember having various issues with 500 errors dependent on which plugins were activated in WP. I believe it was more something to do with WooCommerce and the lack of security in older PHP versions. Due to WooCommerce handling sensitive information, I suppose they wish to take all precautions.

Fortunately, I have IMAP setup and my mail is forwarding to a client I can access, but I would really like to get access to webmail back at this point. Is there a way for me to delete and reinstall/rebuild PHP Suhosin, returning it to 5.6? If so, it would really help me right now, I think!

Cheers,

Mike

This is a CentOS solution (no doubt different to what other OS users would need, but I see you're on CentOS):

First, downgrade PHP7.x to PHP5.6:

Code:
service httpd stop

yum install php56

yum --enablerepo=remi-php56 install php56-php php56-php-pear php56-php-bcmath php56-php-pecl-jsond-devel php56-php-mysqlnd php56-php-gd php56-php-common php56-php-intl php56-php-cli php56-php php56-php-xml php56-php-pecl-apcu php56-php-pecl-jsond php56-php-pdo php56-php-gmp php56-php-process php56-php-devel php56-php-mbstring

rm /usr/bin/php

press y

ln -s /usr/bin/php56 /usr/bin/php

service httpd restart

Now check PHP version is 5.6 by running:

Code:
php -v

Now add Suhosin back into PHP.

NOTE: When I tried the following code on my test server just now, I got a load of Zend-related errors when I ran the "make install" command. You might get this too, and I'm not sure what the problem is although I can guess it's related to upgrading to PHP 7 and then downgrading again to PHP 5.6 knocking something sideways in the configs or settings files. Try the commands below and see if you get these errors or not - it might just the way I have my PHP 7 test server set up, but let me know. If you get errors like me, the worst case is that you have Sentora running pn PHP 5.6 once again but without Suhosin. And from what you said at the top of this thread, I am pretty sure you had Sentora running on PHP 7.1 without Suhosin, so I don't think you'd be any worse off. But please keep in mind this is certainly not a recommended way of running Sentora, and anything that goes wrong with the security is your fault and no one else's! If it all works without a problem, even better:


Code:
wget -nv -O suhosin.zip https://github.com/sektioneins/suhosin/archive/0.9.38.zip

unzip -q suhosin.zip

cd suhosin-0.9.38

phpize &> /dev/null

./configure &> /dev/null

make &> /dev/null

make install

rm -rf ../suhosin*

reboot


Now see if PHP is running with Suhosin:

Code:
php -v

And remember, the cleanest way to get your server running with PHP 5 and Suhosin correctly installed is to start again from scratch. With all the upgrading you've done, there's no telling what you've re-engineered and that could come back to bite you sometime in the future.

My approach is:

1. Have production servers that run the software as intended, no upgrades done willy-nilly. All real sites and mail accounts etc. run here.

2. Have development/test servers that you can play about with to your heart's content with upgrades, etc. If you break something, you reinstall from an earlier snapshot (I use VMs), or you work out how to fix it and do what you were trying to do properly, then you go and implement ONLY the upgrades and patches and tweaks that you know worked properly on your production servers. No real sites or accounts run on my development/test servers.

In other words, if you're running live mail accounts or websites on your server, DON'T mess with it if you can't afford to lose access to those accounts and sites. Do your PHP upgrading away from your important server until you know EXACTLY what you are doing.

Just my opinion Big Grin

Keith.
Reply
Thanks given by:
#5
RE: Can Not Log Into PHPMyAdmin or Webmail after upgrading to PHP 7.1.24
THANK YOU!!!

It worked! I'm back in and was able to backup and export the RoundCube DB via PHPMyAdmin!

For the record, I saw the following error, which is what prompted me to upgrade PHP versions:

The mcrypt extension is missing. Please check your PHP configuration.

I just remembered when I got into PHPMyAdmin and saw the warning there...

Between you and me, that is exactly what I'm looking to do. A friend of mine runs another consulting firm and has his own servers in a DC. He just offered to let me host a VM on his server, so I'm setting up a Hyper-V machine to run CentOS. Then, I can play around on the server that's in my home lab and not have to worry about any down-time. He and I are actually in the process of teaming up and we were discussing using him as the production unit and mine as the test bed for all of our operations.

Again, thanks for the assistance. I should be good to go from here!

Cheers,
Mike
Prodigy I.T. Solutions
PITS.Network
Reply
Thanks given by:
#6
RE: Can Not Log Into PHPMyAdmin or Webmail after upgrading to PHP 7.1.24
(11-22-2018, 05:22 AM)King0321 Wrote: THANK YOU!!!

It worked! I'm back in and was able to backup and export the RoundCube DB via PHPMyAdmin!

For the record, I saw the following error, which is what prompted me to upgrade PHP versions:

The mcrypt extension is missing. Please check your PHP configuration.

I just remembered when I got into PHPMyAdmin and saw the warning there...

Between you and me, that is exactly what I'm looking to do. A friend of mine runs another consulting firm and has his own servers in a DC. He just offered to let me host a VM on his server, so I'm setting up a Hyper-V machine to run CentOS. Then, I can play around on the server that's in my home lab and not have to worry about any down-time. He and I are actually in the process of teaming up and we were discussing using him as the production unit and mine as the test bed for all of our operations.

Again, thanks for the assistance. I should be good to go from here!

Cheers,
Mike
Prodigy I.T. Solutions
PITS.Network

Glad to hear it worked. Did you get any errors building Suhosin or did it work fine for you?

The missing mcrypt error is actually to do with an error in the original Sentora installation script when using CentOS 7. I have tried and tried to get the (2?) people who manage this project to update the current installation script (which is version 1.0.3) and although they have made the appropriate change in the latest master version on Github, the 1.0.3 version remains unchanged. Basically the link to the EPEL repository in the installation script is outdated and needs changing or EPEL will not install, so mcrypt will not be installed, and nor will ProFTPd. Just a guess, but see if ProFTPd is running on your server... I'd bet it's not unless you've manually installed it.

To you and anyone else installing the current version (1.0.3) of Sentora on CentOS 7, I would suggest doing the following when you FIRST install Sentora on a brand new server:

Don't run the installation script with the command in the documentation, but instead DOWNLOAD it to your server. Assuming you're logged in as the root user:


Code:
wget http://sentora.org/install


then open it for editing and change the following two lines:


Code:
EPEL_FILE=$(wget -q -O- "$EPEL_BASE_URL/e/" | grep -oP '(?<=href=")epel-release.*(?=">)')
wget "$EPEL_BASE_URL/e/$EPEL_FILE"


to:


Code:
EPEL_FILE=$(wget -q -O- "$EPEL_BASE_URL/Packages/e/" | grep -oP '(?<=href=")epel-release.*(?=">)')
wget "$EPEL_BASE_URL/Packages/e/$EPEL_FILE"


Make the script executable:


Code:
chmod +x install


And run the script:


Code:
./install


You should find mcrypt is installed correctly now, and so is ProFTPd, and anything else EPEL should have enabled.

It would be really great if someone would update the 1.0.3 version of the installation script (would take about 60 seconds) so that this issue went away - think of the heartache it would have saved you!

Keith
Reply
Thanks given by: King0321
#7
RE: Can Not Log Into PHPMyAdmin or Webmail after upgrading to PHP 7.1.24
Surprisingly, it went well the first time! Exactly as you instructed! I was very happy to get in to retrieve my email.

I just setup this domain, kinda spur of the moment. Because I'm on a residential line, I can't get a dedicated IP and my ISP blocks port 25, so I need to use an SMTP relay to send mail. I was using SocketLabs when I was running cPanel and all was well. However, now I can't seem to get SMTP relaying to work. Infuriated with the block by my ISP, I spoke to my buddy, who's been practically begging me to have him host my private email. He made me an admin on his server so I would be temped to switch over, so that's what I've been playing around with today.

I was able to get the Sentora server up and running good enough where I was able to use IMAP to transfer the old mailboxes to the new server! Today, was a GOOD day!

Thank you SO much for your assistance. Since I'm now playing around with a Hyper-V machine, I'll be sure to follow your instructions for a fresh install on the new VM. Being it will only be hosting websites, it should be smooth sailing from here on out!

I'm not sure where you're located, but if you're in the US, I hope you have a wonderful Thanksgiving!

Warmest Regards,

Mike
Reply
Thanks given by:
#8
RE: Can Not Log Into PHPMyAdmin or Webmail after upgrading to PHP 7.1.24
See HERE for instructions on how to update suhosin to v0.9.38 for php to v5.6.38 update. There is a link in the page that details the php update.

Without installing suhosin after updating php, your server's security will be totally compromised...

Your php -v output should read:

Code:
# php -v
PHP 5.6.38 (cli) (built: Oct 24 2018 12:50:38)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Suhosin v0.9.38, Copyright (c) 2007-2015, by SektionEins GmbH

You could also edit the installer if you are going to edit it to natively install php v5.6.38... Simply change the version number of suhosin. Keep in mind you have to modify the installer to install php5.6.38 in the installer or the edit below is worthless. I would just use the procedure detailed above.

Code:
SUHOSIN_VERSION="0.9.37.1"

to

SUHOSIN_VERSION="0.9.38"
Everyone makes mistakes, but to truly screw up it takes the root password!
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
[split] Can Not Log Into PHPMyAdmin or Webmail after upgrading to PHP 7.1.24 ogika 2 4 ,127 09-14-2021, 06:25 AM
Last Post: sparkrack
Upgrading phpmyadmin testing 0 2 ,037 07-04-2020, 05:26 AM
Last Post: testing
PhpMyAdmin MadDog 20 40 ,090 12-31-2018, 04:32 AM
Last Post: MadDog

Forum Jump:


Users browsing this thread: 1 Guest(s)