CWP7.Pro Error | Unable to Login Admin Panel

Started by DNA, April 26, 2020, 09:08:35 AM

Previous topic - Next topic

DNA

Hi

I am using Nginx+Varnish+aPache +PHP-FPM , It was running smoothly .
PHP and PHP-FPM version 7.2.29 , Now issues that Unable to Login Admin Panel , getting HTTP ERROR 500
Found below the error log:

# tail /usr/local/cwpsrv/logs/error_log
2020/04/26 14:50:56 [error] 2510#0: *12 FastCGI sent in stderr: "PHP message: PHP Fatal error:  The file /usr/local/cwpsrv/htdocs/admin/index.php was encoded by the ionCube Encoder for PHP 5.6 and cannot run under PHP 7.1 or later.
Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 7.1. in Unknown on line 0" while reading response header from upstream, client: 103.118.76.49, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/usr/local/cwp/php71/var/sockets/cwpsrv.sock:", host: "alpha.glorency.com:2031"


# tail /usr/local/cwp/php71/var/log/php-fpm.log
[26-Apr-2020 14:58:53] WARNING: [pool cwpsrv] child 6406 said into stderr: "NOTICE: PHP message: PHP Fatal error:  The file /usr/local/cwpsrv/htdocs/admin/index.php was encoded by the ionCube Encoder for PHP 5.6 and cannot run under PHP 7.1 or later."
[26-Apr-2020 14:58:53] WARNING: [pool cwpsrv] child 6406 said into stderr: " Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 7.1. in Unknown on line 0"


# vi /usr/local/cwp/php71/php.ini
; Local Variables:
; tab-width: 4
; End:
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.2.so




rcschaff

try
systemctl restart cwpsrv-phpfpm
systemctl restart cwp-phpfpm
Google Hangouts:  rcschaff82@gmail.com

DNA

Quote from: rcschaff on April 26, 2020, 12:00:46 PM
try
systemctl restart cwpsrv-phpfpm
systemctl restart cwp-phpfpm

Hey

This is not the solutions, each and every services are running but unable login to admin panel, getting HTTP ERROR 500.
When I am trying to Update :
# sh /scripts/update_cwp
PHP Fatal error:  The file /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php was encoded by the ionCube Encoder for PHP 5.6 and cannot run under PHP 7.1 or later.
Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 7.1. in Unknown on line 0

rcschaff

This may be the solution if you made changes to the phpfpm configuration.   Unlinke regular PHP, FPM has to be restarted after changes are made.  Hence why I said try it.

If you want to tell me I'm wrong without attempting what I'm asking, then I wish you luck getting it fixed. 

With that said, have you tried restarting the services.  If Yes, we move on.  If No, then I'll save my time for someone who want's help.
Google Hangouts:  rcschaff82@gmail.com

rcschaff

This is the standard response to your issue.   Your Update failed at some point, and some files were not updated.  YOu need to do the manual file update for your CentOS and the services...
Hello,

Test what is the cwp PHP version and if it is updated to 7.2

/usr/local/cwp/php71/bin/php -v
PHP 7.2.30

if PHP was not updated to 7.2 then try manually
yum update cwpphp --enablerepo=cwp

**Manual update CentOS 7 (ignore if you have CentOS 6)**
```
chattr -i -R /usr/local/cwpsrv/htdocs
cd /usr/local/cwpsrv/htdocs
wget static.cdn-cwp.com/files/cwp/el7/cwp-el7-0.9.8.961.zip
unzip -o -q cwp-el7-0.9.8.961.zip
rm -f cwp-el7-0.9.8.961.zip
```

**Manual update CentOS 6 (ignore if you have CentOS 7)**
```
chattr -i -R /usr/local/cwpsrv/htdocs
cd /usr/local/cwpsrv/htdocs
wget dl1.centos-webpanel.com/files/cwp/cwp2-0.9.8.765.zip
unzip -o cwp2-0.9.8.765.zip
rm -f cwp2-0.9.8.765.zip
```


**Manual update for services (This steep must be done for CentOS 6 and 7)**
```
cd /usr/local/cwpsrv/var/services/
wget static.cdn-cwp.com/files/cwp/el7/cwp-services.zip
unzip -o -q cwp-services.zip
rm -f cwp-services.zip
```

Test if all is ok, it should run update without errors
```
sh /scripts/update_cwp
```

If you get error like:
> Cannot load the ionCube PHP Loader - it was built with configuration API320151012,NTS, whereas running engine is API320170718,NTS

then run this:

```
sed -i "s/ioncube_loader_lin_7.0/ioncube_loader_lin_7.2/g" /usr/local/cwp/php71/php.ini
sh /scripts/restart_cwpsrv
Google Hangouts:  rcschaff82@gmail.com

DNA

Hi

I am using CentOS 7.6 ,

# chattr -i -R /usr/local/cwpsrv/htdocs
chattr: Operation not supported while reading flags on /usr/local/cwpsrv/htdocs/resources/admin/addons/3rdparty/phpseclib/vendor/bin/sami.php
chattr: Operation not supported while reading flags on /usr/local/cwpsrv/htdocs/resources/admin/addons/3rdparty/phpseclib/vendor/bin/phing
chattr: Operation not supported while reading flags on /usr/local/cwpsrv/htdocs/resources/admin/addons/3rdparty/phpseclib/vendor/bin/phpcs
chattr: Operation not supported while reading flags on /usr/local/cwpsrv/htdocs/resources/admin/addons/3rdparty/phpseclib/vendor/bin/phpcbf
chattr: Operation not supported while reading flags on /usr/local/cwpsrv/htdocs/resources/admin/addons/3rdparty/phpseclib/vendor/bin/phpunit
chattr: Operation not supported while reading flags on /usr/local/cwpsrv/htdocs/admin/login/design
chattr: Operation not supported while reading flags on /usr/local/cwpsrv/htdocs/admin/user/design
chattr: Operation not supported while reading flags on /usr/local/cwpsrv/htdocs/admin/admin/design



getting above output ?

rcschaff

Should be ok.  Just means those files didn't have +i set on them
Google Hangouts:  rcschaff82@gmail.com

DNA

Hi

Followed your instruction, I can login to admin panel after Successfully updated . [Issue is resolved]
Also replaced ioncube
# cd /usr/local/
# mv ioncube ioncube-bak
# wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
# tar -zxvf ioncube_loaders_lin_x86-64.tar.gz


DNA

is that any new issues
# sh /scripts/update_cwp


====================================================
============= CentOS Web Panel Cron ================
====================================================


###########################
Firewall Flush Daily Blocks
###########################


######################
Update Server Packages
######################
Redirecting to /bin/systemctl restart cwpsrv.service
Redirecting to /bin/systemctl restart cwp-phpfpm.service
Redirecting to /bin/systemctl reload cwpsrv.service
Redirecting to /bin/systemctl reload cwp-phpfpm.service
http://mirror.innosol.asia/remi/enterprise/7/safe/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.innosol.asia/remi/enterprise/7/safe/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
Redirecting to /bin/systemctl reload cwpsrv.service
Redirecting to /bin/systemctl reload cwp-phpfpm.service
Redirecting to /bin/systemctl restart cwpsrv.service
Redirecting to /bin/systemctl restart httpd.service
Redirecting to /bin/systemctl reload httpd.service

nguyentrunghoa

Quote from: rcschaff on April 26, 2020, 02:51:59 PM
Should be ok.  Just means those files didn't have +i set on them

Hi, would you mind if help me the way to logon to my VM?
I have tried all you guide but now when try to login to VM I got the blank page.

Thank you in advanced.

bpls14

It worked for me (PHP V 7.3.10), now things look ok. "Many Thanks" to @rcschaff for the instructions and to @DNA for detailing all till resolving the issue.

Does it necessary to replace ioncube with below code as DNA mentioned? What will be the issue if not replaced, or the benefit if  replaced? It will help the understanding.

# cd /usr/local/
# mv ioncube ioncube-bak
# wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
# tar -zxvf ioncube_loaders_lin_x86-64.tar.gz



Adak

# sh /scripts/update_cwp
Cannot load the ionCube PHP Loader - it was already loaded
PHP Fatal error:  The file /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php was encoded by the ionCube Encoder for PHP 5.6 and cannot run under PHP 7.1 or later.
Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 7.1. in Unknown on line 0

rcschaff

Google Hangouts:  rcschaff82@gmail.com

Adak

#13
Quote from: rcschaff on April 28, 2020, 10:55:47 AM
Follow the directions from my post above.
thanks all work

DNA

Quote from: rcschaff on April 28, 2020, 10:55:47 AM
Follow the directions from my post above.

After Fixed that issues , New Issues has been raised to Update CWP

[root@alpha ~]# sh /scripts/update_cwp


====================================================
============= CentOS Web Panel Cron ================
====================================================


###########################
Firewall Flush Daily Blocks
###########################


######################
Update Server Packages
######################
Redirecting to /bin/systemctl restart cwpsrv.service

** (pkttyagent:26889): WARNING **: 22:39:14.724: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject
Error registering authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject (polkit-error-quark, 0)
Redirecting to /bin/systemctl restart cwp-phpfpm.service