chasecmiller / Crumbls-Cache

Caching for WP via PHPFastCache
4 stars 3 forks source link

issue in autoload.php #24

Closed mxmkmarquette closed 7 years ago

mxmkmarquette commented 7 years ago

defined('PFC_BIN_DIR') || define('PFC_BIN_DIR', __DIR__ . '/phpFastCache/Bin/');

this line should be

defined('PFC_BIN_DIR') || define('PFC_BIN_DIR', __DIR__ . '/phpFastCache/bin/');

because on activation it cause error if not.

chasecmiller commented 7 years ago

Since the folder is named Bin with an upper case B, it should be correct. What error are you getting?

mxmkmarquette commented 7 years ago

no the folder is called bin with a lower case :P so either we put a big B or a minus b on either the folder name or in the php files.

Plugin could not be activated because it triggered a fatal error.
Warning: Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading. in /home/mpqc/public_html/neufsvies/wp-content/plugins/crumbls_cache/assets/php/autoload.php on line 62

Fatal error: Cannot locate the Psr/Cache files in /home/mpqc/public_html/neufsvies/wp-content/plugins/crumbls_cache/assets/php/autoload.php on line 39

and line 39 is

trigger_error('Cannot locate the Psr/Cache files', E_USER_ERROR);

if ((!defined('PFC_IGNORE_COMPOSER_WARNING') || !PFC_IGNORE_COMPOSER_WARNING) && class_exists('Composer\Autoload\ClassLoader')) {
  trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading.',
E_USER_WARNING);

so i fix it my way like it's maybe a dumb way lol i just saw that in code it's Bin and in directory it's bin so when i rename it or like change it in php it's activating and making possible to use the plugin

chasecmiller commented 7 years ago

Weird. I actually didn't write that file. I think you might need to erase the version of code you have and redownload, because in the git, it shows it as an upper case letter.

chasecmiller commented 7 years ago

Looks like the git was setup as case insensitive but not matching, so there were two folders named phpfastcache and phpFastCache and that's throwing it all off. I'll remake it here this evening or tomorrow morning.

mxmkmarquette commented 7 years ago

no problemo my friend :) glad that you found the issue :)

chasecmiller commented 7 years ago

Should be wrapped up in the latest version. Looks good here.

mxmkmarquette commented 7 years ago

ok gonna test it my friend