waf-fle with PHP7

511 views
Skip to first unread message

Konstantin Gavrilenko

unread,
Aug 2, 2016, 2:00:38 PM8/2/16
to waf-fle
Hi list,

I am setting up the waf-fle on the latest ubuntu 16.04 server, and there seems to be some problems with regards to apc support.

both servers have the apcu installed,

i   php5-apcu                       - APC User Cache for PHP 5
i   php-apcu                        - APC User Cache for PHP  


looking at the php modules, the server with php5 returns, apc and apcu

# php -m 
[PHP Modules]
apc
apcu

on the PHP7 it only returns the apcu.
# php -m 
[PHP Modules]
apcu
calendar

while trying to connect mlog2waffle to the sensor, the following error is given,

 PHP Fatal error:  Uncaught Error: Call to undefined function apc_fetch() in /usr/local/waf-fle/functions.php:2951\nStack trace:\n#0 /usr/local/waf-fle/controller/index.php(44): sensorLogin('127.0.0.1', 'd2FmMTpNYXJsYjB...', '', NULL)\n#1 {main}\n  thrown in /usr/local/waf-fle/functions.php on line 2951


Thus the question, does waf-fle works with php7?  any sugestions?

thanks


Klaubert Herr da Silveira

unread,
Aug 4, 2016, 8:15:11 PM8/4/16
to waf...@googlegroups.com
Hi Konstantin, 

I haven't tried waf-fle with php 7, have you tried to disable APC in config.php?

Best regards, 
Klaubert

--
You received this message because you are subscribed to the Google Groups "waf-fle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to waf-fle+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Konstantin Gavrilenko

unread,
Aug 10, 2016, 6:08:10 AM8/10/16
to waf-fle
Hi Klaubert,

certainly, I have disabled the APC in the config.php file.

during the initial setup I get into followings errors that can be resolved by simply commenting out the break line.

PHP Fatal error:  'break' not in the 'loop' or 'switch' context in /usr/local/waf-fle/dashboard/setup.php on line 408
PHP Fatal error:  'break' not in the 'loop' or 'switch' context in /usr/local/waf-fle/dashboard/setup.php on line 507


Further, the setup indicates that the APC is disabled

++++++++++++
WAF-FLE 0.6 Setup

Checking config.php settings...
   config.php present...
   Config looks correct.


Checking PHP Version...
   PHP version must be 5.3 or higher.


Checking php extensions...
   APC Extension: missing. Not required by config.php
   GeoIP Extension: present;
   PDO Extension: present;
   MySQL PDO Driver: present;
   json Extension: present;
   pcre Extension: present;
   zlib Extension: present;
   date Extension: present;
   session Extension: present;
   Running on Apache: Ok;

Database not exist! (or credentials on config.php are yet valid) 
Go! Create the database and user...
+++++++++++++++++++++++++

Having logged in with the admin users, browsing through the waf site, I frequently see the following errors in the apache errorlog.

[Wed Aug 10 11:01:19.599632 2016] [:error] [pid 20128] [client 178.248.108.1:41150] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/waf-fle/header.php:242) in /usr/local/waf-fle/functions.php on line 1535, referer: https://waf1.xxxxxx.com/waf-fle/index.php
[Wed Aug 10 11:01:19.600378 2016] [:error] [pid 20128] [client 178.248.108.1:41150] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/waf-fle/header.php:242) in /usr/local/waf-fle/functions.php on line 1536, referer: https://waf1.xxxxxx.com/waf-fle/index.php


The info part of the management tab returns the following information.

WAF-FLE Version: 0.6.4
APC Cache extension: Extension APCu (5.1.3) loaded, enabled but disabled in WAF-FLE
PHP version: 7.0.8-0ubuntu0.16.04.2
PHP Zend Version: 3.0.0
MySQL Version: 5.7.13-0ubuntu0.16.04.2
Database Name: waffle
Database Size: 113.46 kB
Number of sensors: 0
Number of events on DB: 0


for now I have to redirect mlog2waffle to a machine running php5, but it would be great to have it working with php7




To unsubscribe from this group and stop receiving emails from it, send an email to waf-fle+u...@googlegroups.com.

WILLIAM FERNANDO REICHERT

unread,
Sep 7, 2018, 9:46:46 PM9/7/18
to waf-fle
Hi, did you solve this error?
I encounter the same problem with php5.6 and also php7.0

J. R. Johnstone

unread,
Sep 20, 2018, 9:21:27 PM9/20/18
to waf-fle
I had APC disabled in the configuration and it seemed to be ignored.  I'm using Debian and installed the packages php-apcu and php-apcu-bc for backwards compatibility and that fixed that problem.  Still working on the other issues, some are fixed by others on the forks of this repository.


Regards,


J. R. Johnstone
@StygianBlues

 
Reply all
Reply to author
Forward
0 new messages