When I click the compiler status inside the “shell” folder by command line in the root of
my store, it returns that the compiler is enabled so as in admin, however when I check that in the root folder of my Magento site is return the status is disabled !
$/var/www/magento# php shell/compiler.php state Compiler Status: Disabled Compilation State: Compiled Collected Files Count: 6764 Compiled Scopes Count: 4 $/var/www/magento# cd shell/ $/var/www/magento/shell# php compiler.php state Compiler Status: Enabled Compilation State: Compiled Collected Files Count: 6764 Compiled Scopes Count: 4
Although I try to fix this by turning compiler mode off, recompiling, and then turning it back on, I get the same result!
This “works as designed” (except it’s just poorly designed). Here’s the bit of code from
compiler.phpthat determines status.the key line is
$compilerConfig = '../includes/config.php';. This path goes up one directory from the current directory to findconfig.php. A PHP shell script’s working directory is the one it’s invoked from, not the one it lives in. So you you saythe script looks for a file in
or
since it doesn’t find one, it assumes a state of disabled.