Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Call to undefined function opcache_reset() #2792

Closed
juju4 opened this issue Jan 8, 2018 · 5 comments
Closed

Error: Call to undefined function opcache_reset() #2792

juju4 opened this issue Jan 8, 2018 · 5 comments

Comments

@juju4
Copy link
Contributor

juju4 commented Jan 8, 2018

Work environment

Questions Answers
Type of issue Bug
OS version (server) CentOS,
OS version (client) 7
PHP version 5.6, 7.2
MISP version / git hash HEAD

Expected behavior

Since about 2 weeks, I have my automated travis build for my MISP ansible role failing for centos7.
https://travis-ci.org/juju4/ansible-MISP/builds

looking at it today, It seems to be similar to #2727 but for

opcache_reset();

and fixed like datenstrom/yellow#258
even if opcache_reset() is a base function https://secure.php.net/manual/fr/function.opcache-reset.php

I tried with php56 and php72 from remi yum repository with same result
https://api.travis-ci.org/v3/job/326519049/log.txt
https://api.travis-ci.org/v3/job/326505894/log.txt

Ubuntu 16.04 is normal
https://api.travis-ci.org/v3/job/326519050/log.txt
(search for /var/www/MISP/app/Console/cake userInit -q)
even if

----------------------------------------------------------------
  Ubuntu 16.04.1 LTS                          built 2016-12-10
----------------------------------------------------------------
Last login: Mon Jan  8 20:40:14 2018 from 10.0.2.2
vagrant@vhost:~$ grep -rin opcache.enable_cli /etc/php/*
/etc/php/7.0/cli/php.ini:1770:;opcache.enable_cli=0
/etc/php/7.0/apache2/php.ini:1770:;opcache.enable_cli=0

on centos7

[vagrant@vhost ~]$ cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 
[vagrant@vhost ~]$ grep -rin opcache /etc/php* /etc/httpd/*
/etc/httpd/conf.d/php.conf:51:    #php_value opcache.file_cache   "/var/lib/php/opcache"
grep: /etc/httpd/logs: Permission denied
Binary file /etc/httpd/modules/libphp7-zts.so matches
Binary file /etc/httpd/modules/libphp7.so matches
grep: /etc/httpd/run: Permission denied

same result if I force it
juju4/ansible-MISP@96231aa

L2624 seems to be recent and from commit
6e7a9da#diff-5043d40040a721280ed4c0c7fb144ecb
I suppose that a if function is needed too but unsure

comment?

Thanks

@RichieB2B
Copy link
Contributor

MISP works fine with php56 from SCL with the php56-php-opcache package installed as well.

@RichieB2B
Copy link
Contributor

That is rh-php56 and rh-php56-php-opcache from SCL.

@juju4
Copy link
Contributor Author

juju4 commented Jan 8, 2018

you win! seems remi reviewed recently the split of their php packages. works fine adding php-opcache. Thanks!

@juju4 juju4 closed this as completed Jan 8, 2018
iglocska added a commit that referenced this issue Jan 9, 2018
@iglocska
Copy link
Member

iglocska commented Jan 9, 2018

Thanks for the heads-up, even though you've fixed it by installing the package - we should check whether the function exists before trying to execute it. Fixed in case others run into the same issue.

@juju4
Copy link
Contributor Author

juju4 commented Jan 9, 2018

Thanks @iglocska

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants