nginx - How do I configure PHP 5.5 opcache so I can run the same script in different environments? -
i have server setup running nginx 1.1.19 , php 5.5.7 on ubuntu 12.04 lts. when opcache enabled, if there file identical in both development
, production
environments, file run production
. however, if change 1 character in either file, php correctly run proper script.
for example, if clone same project 2 different directories , thing change between 2 app_env
environmental variable in configuration file, whenever point browser development
environment, of database parameters production
config loaded.
if turn opcache
off, weird behavior ceases , works expect.
is there opcache
config parameter can set force php resolve correct script location? tried setting revalidate_path
1
, switched problem around (pointing either production
or development
yielded development
environment.
for i've turned opcache
off, i'd know more it.
short answer: yes - taken answer on over serverfault provided similar question:
make sure
opcache.use_cwd
parameter settrue
application's configuration of opcache - it's setfalse
default , leaving set default cause collisions if you're hosting more 1 php application on system...
when shipped, opcache.us_cwd
set default of false
- that's how on ubuntu 14.04 zend server ami zend themselves, though have heard modern distributions have changed default setting false true. haven't seen it's worth confirming on setup validate if terrye's comment accurate specific configuration on webhost.
Comments
Post a Comment