1

I have PHP running on WSL on windows along with nginx+php-fpm. The web component is running php OK, but console PHP produces opcode output for some reason. For example i have such PHP file:

?php echo "test OK\r\n";

When i run it as

php test.php

It will produce this output:

root@computer:/mnt/d/php/zona.sp# php test.php

$_main: ; (lines=2, args=0, vars=0, tmps=0) ; (after pass 1) ; /mnt/d/php/zona.space/test.php:1-3 L0 (2): ECHO string("test ok ") L1 (3): RETURN int(1)

$_main: ; (lines=2, args=0, vars=0, tmps=0) ; (after pass 2) ; /mnt/d/php/zona.space/test.php:1-3 L0 (2): ECHO string("test ok ") L1 (3): RETURN int(1)

$_main: ; (lines=2, args=0, vars=0, tmps=0, no_loops) ; (after pass 7) ; /mnt/d/php/zona.space/test.php:1-3 ; return [long] RANGE[1..1] L0 (2): ECHO string("test ok ") L1 (3): RETURN int(1) test ok

Why this happens?

root@computer:/mnt/d/php/zona.sp# php -v

PHP 7.2.9-1 (cli) (built: Aug 19 2018 06:56:13) ( NTS )

Copyright (c) 1997-2018 The PHP Group

Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

with Zend OPcache v7.2.9-1, Copyright (c) 1999-2018, by Zend Technologies

1 Answer 1

1

Somewhere in your PHP configuration, you have set opcache.opt_debug_level to a nonzero value. Remove this setting from your php.ini or the included ini file where it is set, or set it back to its default value of 0.

1
  • Thank you! Did not mention this when install opcache. Commented Oct 17, 2018 at 17:18

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.