Author Topic: PHP Defender/snuffleupagus fecks up PHP  (Read 13104 times)

0 Members and 1 Guest are viewing this topic.

Offline
**
PHP Defender/snuffleupagus fecks up PHP
« on: March 01, 2021, 10:58:45 PM »
Hi,

The new feature within the security center (PHP Defender) with PHP-FPM 7.4 in my case on BASIC kills PHP

This results in contacting a Website and you just get a File to Download instead of the Site.

It is working for a while maybe a few hours an suddenly a minute later the error kicks in.

I found this Error Message in the PHP-FPM Selector Status for 7.4:

Code: [Select]
Started The PHP FastCGI Process Manager.
Mar 01 23:24:11 srv1.xxxx php-fpm[1046]: [01-Mar-2021 23:24:11] NOTICE: PHP message: PHP Fatal error:  [snuffleupagus][0.0.0.0][config][log] Could not open configuration file /usr/local/cwpsrv/htdocs/resources/admin/include/modules/security_center/defender_rules/cwp_php_defender_basic.rules : No such file or directory in Unknown on line 0

after restarting php it works again, but it took me some time to figure out whats wrong.

In PHP Defender you can see this for all domains on the Server:

Code: [Select]
Invalid configuration file
File: Unknown (0')
Action: config

This happened 2 times now on my CWP.

I uninstalled PHP Defender for now, maybe there is a bit more work to do before releasing it.

Again my details:

PHP-FPM 7.4
CWPpro version: 0.9.8.1048

thanks
« Last Edit: March 01, 2021, 11:03:15 PM by Painkiller88 »

Offline
**
Re: PHP Defender/snuffleupagus fecks up PHP
« Reply #1 on: March 05, 2021, 08:58:36 AM »
Does no one else recorgnized this problem or is something missing in my topic? Or maybe i wrote it to complicated?

Thanks

Offline
*****
Re: PHP Defender/snuffleupagus fecks up PHP
« Reply #2 on: March 05, 2021, 10:47:03 AM »
Devs are working on it

Offline
**
Re: PHP Defender/snuffleupagus fecks up PHP
« Reply #3 on: March 14, 2021, 09:15:56 AM »
Is it fixed already? Can we use PHP Defender now?

As you never provide a changelog, we never know whats done and whats not.

Offline
**
Re: PHP Defender/snuffleupagus fecks up PHP
« Reply #4 on: March 17, 2021, 08:24:29 PM »
Still the same Problem.

Activated PHP Defender today because there was another update to the .51 version.

So PHP-Defender on Basic, and now 2 hours later all sites with errors.

Uninstalled PHP-Defender, restarted PHP-FPM and all fine

Offline
*****
Re: PHP Defender/snuffleupagus fecks up PHP
« Reply #5 on: March 19, 2021, 09:36:13 AM »
Will be fixed in a future version.
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
**
Re: PHP Defender/snuffleupagus fecks up PHP
« Reply #6 on: April 07, 2021, 06:27:27 PM »
Is it already fixed so we can use it?

Thanks

Offline
*
Re: PHP Defender/snuffleupagus fecks up PHP
« Reply #7 on: May 03, 2021, 10:40:57 AM »
Is it already fixed so we can use it?

Thanks

Solved!

Offline
*
Re: PHP Defender/snuffleupagus fecks up PHP
« Reply #8 on: May 04, 2021, 02:38:23 AM »
I faced another problem with PHPDefender. It can be installed well. But I cant change the rule at all.
The path for the rule is: /usr/local/cwp/.conf/phpdefender/rules/
When installed I choose intermediate.
One of my site got blocked with the reason: fatal error because of usage ini_set("display_errors").
Then I open the  cwp_php_defender_interm.rules
I change the line:
sp.disable_function.function("ini_set").param("varname").value_r("display_errors").drop()
to
#sp.disable_function.function("ini_set").param("varname").value_r("display_errors").drop() --> add comment sign, so it is ignored.

Restarting apache, but still get the same error. Then change that line to:
sp.disable_function.function("ini_set").param("varname").value_r("display_errors").allow()

But still gave the same error.
So, where is actually PHPdefender store the log data and is there any file contains the locked domain, so it kept giving the same error, even when I have removed PHPdefender, the same error still show up.
And which the rules file that PHPdefender execute for real?

It is really confusing, and there is no complete documentation at CWP. Opening the site snuffleupagus.readthedocs.io does not give any useful information.

Has CWP developer tested it before launching this feature?

Thanks.
we are web developer in Indonesia with address: Tatamedia Solusindo | web hosting with mutiple choices | discounted software store

Offline
*
Re: PHP Defender/snuffleupagus fecks up PHP
« Reply #9 on: April 19, 2022, 11:53:44 AM »
I have tried today to install it too, on a CWP Pro 0.9.8.1135, Rocky Linux 8.5, Webserver main Nginx,varnish,apache, and site config is nginx, php-fpm. I tried the basic php defender configuration and i got 502 bad getaway error. If i delete the config and reload the page it`s working.

Offline
***
Re: PHP Defender/snuffleupagus fecks up PHP
« Reply #10 on: April 20, 2022, 11:27:27 PM »
I have tried today to install it too, on a CWP Pro 0.9.8.1135, Rocky Linux 8.5, Webserver main Nginx,varnish,apache, and site config is nginx, php-fpm. I tried the basic php defender configuration and i got 502 bad getaway error. If i delete the config and reload the page it`s working.

Check the error domlogs for which rule is making you get a 502, and then remove/disable that specific rule or whitelist the specific file that is getting flagged by snuffleupagus