Control Web Panel

WebPanel => PHP => Topic started by: DNA on April 26, 2020, 09:08:35 AM

Title: CWP7.Pro Error | Unable to Login Admin Panel
Post by: DNA on April 26, 2020, 09:08:35 AM
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:

Code: [Select]
# tail /usr/local/cwpsrv/logs/error_log
Code: [Select]
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"

Code: [Select]
# tail /usr/local/cwp/php71/var/log/php-fpm.log
Code: [Select]
[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"

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


Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: rcschaff on April 26, 2020, 12:00:46 PM
try
systemctl restart cwpsrv-phpfpm
systemctl restart cwp-phpfpm
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: DNA on April 26, 2020, 12:11:42 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 :
Code: [Select]
# 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
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: rcschaff on April 26, 2020, 12:18:30 PM
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.
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: rcschaff on April 26, 2020, 12:31:30 PM
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...
Code: [Select]
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
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: DNA on April 26, 2020, 01:53:16 PM
Hi

I am using CentOS 7.6 ,

Code: [Select]
# 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 ?
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: rcschaff on April 26, 2020, 02:51:59 PM
Should be ok.  Just means those files didn't have +i set on them
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: DNA on April 26, 2020, 03:27:50 PM
Hi

Followed your instruction, I can login to admin panel after Successfully updated . [Issue is resolved]
Also replaced ioncube
Code: [Select]
# 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
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: DNA on April 27, 2020, 06:08:53 AM
is that any new issues
Code: [Select]
# 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
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: nguyentrunghoa on April 27, 2020, 07:47:53 AM
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.
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: bpls14 on April 27, 2020, 08:02:45 AM
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.

Code: [Select]
# 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

Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: Adak on April 28, 2020, 10:36:29 AM
# sh /scripts/update_cwp
Code: [Select]
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
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: rcschaff on April 28, 2020, 10:55:47 AM
Follow the directions from my post above.
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: Adak on April 28, 2020, 02:00:55 PM
Follow the directions from my post above.
thanks all work
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: DNA on April 30, 2020, 04:46:41 PM
Follow the directions from my post above.

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

Code: [Select]
[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
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: DNA on April 30, 2020, 04:56:56 PM
Details Error:

Code: [Select]
# sh /scripts/restart_cwpsrv

** (pkttyagent:1643): WARNING **: 22:56:12.093: 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)

** (pkttyagent:1661): WARNING **: 22:56:12.200: 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)

** (pkttyagent:1669): WARNING **: 22:56:12.249: 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)

Code: [Select]
# sh /scripts/restart_httpd

** (pkttyagent:1746): WARNING **: 22:56:28.733: 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)
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: Sandeep on April 30, 2020, 05:39:39 PM
disable secure process from admin > security
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: DNA on April 30, 2020, 07:44:02 PM
hi
It is working and solved after disabling it but Website loading speed dramatically decreases
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: Nayem007 on June 03, 2020, 01:22:56 PM
It worked like a charm.. Thanks a lot @ rcschaff bro...!!

you save my 2 days lots of RnD.... God bless you bro... cheers !!


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...
Code: [Select]
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
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: gavin on July 08, 2020, 06:31:53 AM
Your instructions here saved me hell lot of time and stress. Can't thank you enough.


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...
Code: [Select]
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
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: prakash7610 on July 08, 2020, 07:14:42 PM
Hi
Can any one suggest me which version of php is perfect for cwp right now iam using PHP version: 5.6.37 the default one and if i want use php higher version iam using PHPselector for different version in different domain and subdomains etc.. 
because i could see cwp team is updating to 7.2 is the version is perfect for cwp?
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: rabo on July 12, 2020, 12:14:58 AM
It still doesn't work for me.

service crond restart
Redirecting to /bin/systemctl restart crond.service

** (pkttyagent:29329): WARNING **: 01:53:58.398: 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)

I don't really know when these errors occurred, whether before or after updating PHP 7.3 to 7.3.20


Then I created a cron, but it doesn't run, you can see it here.


(https://image.prntscr.com/image/1wRZgV-nREKAGj4IG3qyCg.png)

Do you know how to make the cron start?
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: mirdul611 on July 12, 2020, 10:35:42 PM
Try disabling secure/hidden process from CWP admin - > security and try again.
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: NFT on July 15, 2020, 07:08:47 AM

Try disabling secure/hidden process from CWP admin - > security and try again.

Please stop with this bad advise, fix the issue do not remove the warnings/protection
Posted found fix here
http://forum.centos-webpanel.com/index.php?topic=9168.msg32616#msg32616 (http://forum.centos-webpanel.com/index.php?topic=9168.msg32616#msg32616)
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: mirdul611 on July 15, 2020, 07:14:19 AM
https://forum.centos-webpanel.com/index.php?topic=9283.msg32481#msg32481

Do you want to say CWP Team themselves post "bad advice" in the forum? I myself experienced the same and following the instructions I posted fixed the issue.
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: cinique on July 15, 2020, 08:21:34 AM
LMFTFY
Do you want to say CWP Team themselves post "bad advice" in the forum? I myself experienced the same and following the instructions I posted fixed masked the issue.
Let's see: CWP nags that hidden processes is not enabled; an OS update changes the methodology; CWP 'solution' is to disable hidden processes. "Your logic is illogical."
Title: Re: CWP7.Pro Error | Unable to Login Admin Panel
Post by: NFT on July 16, 2020, 09:34:25 AM
@cynique correct that is my view also

CWP Team themselves should be SME's (Subject Matter Experts), so they should not list something that looks like a Fix, when it is a workaround, and especially not if this workaround turn off a security feature.

I am not saying the CWP Team themselves in general post "bad advice" in the forum, but a short response like
Quote
disable secure process from admin > security
Would look like a general known fix, why I add "try" as I hope that was what Sandeep meant, as I have seen multiple good advise from this SME.

I to often on the Internet have seen advice to example turn off SELINUX (https://en.wikipedia.org/wiki/Security-Enhanced_Linux (https://en.wikipedia.org/wiki/Security-Enhanced_Linux)) , when something are not working.
And again this should only be used temporally if needed to troubleshot an issue, to see if SELINUX has a policy that prevent something from working, then one should update the policy and get SELINUX enabled ASAP.

We have to remember people often Google issues, and read as little as possible to "solve" their issue, so when a SME tell you to just turn something off, they do not think/expect this will cause them new worse issues.