scythe000 Posted May 9, 2018 Posted May 9, 2018 Hi all! I'm on 6.2.0 and PHP 5.6. I'd like to upgrade to PHP 7.0 or 7.1, but i get this error on both my sites: Fatal error: Uncaught Error: Call to undefined function apc_fetch() Any thoughts? GoDaddy cPanel Linux hosting. Quote
Al Brookbanks Posted May 9, 2018 Posted May 9, 2018 It means that PHP 7 on the server hasn't been compiled with APC support. Either compile APC or edit the includes/global.inc.php file to use "file" instead of "apc" as cache method. Quote
scythe000 Posted May 9, 2018 Author Posted May 9, 2018 Aha, ok, let me call them about that. Thank you! Quote
scythe000 Posted May 9, 2018 Author Posted May 9, 2018 Hmm...apcu is enabled they say...but still getting this: Fatal error: Uncaught Error: Call to undefined function apc_fetch() in /home/store/classes/cache/apc.class.php:172 Stack trace: #0 /home/store/classes/cache/apc.class.php(235): Cache->read('sql.empties') #1 /home/store/classes/cache/cache.class.php(113): Cache->_getEmpties() #2 /home/store/classes/config.class.php(78): Cache_Controler->enable(true) #3 /home/store/classes/config.class.php(97): Config->__construct(Array) #4 /home/store/controllers/controller.index.inc.php(22): Config::getInstance(Array) #5 /home/store/index.php(20): include('/home/xxx...') #6 {main} thrown in /home/store/classes/cache/apc.class.php on line 172 Interestingly, I'm seeing a lot of comments on various threads that APC is no longer being actively developed and alternatives should be used? https://www.inmotionhosting.com/support/website/php-configuration/install-apc-for-php It does look like my server supports memcached and redis. Would one of those be a better choice than file? Quote
bsmither Posted May 9, 2018 Posted May 9, 2018 In admin, PHP Info, determine what exactly got loaded with respect to APC or APCU (note the table for this extension). There is this conversation: https://github.com/Homebrew/homebrew-php/issues/2712 which makes reference to: https://secure.php.net/manual/en/apcu.installation.php Quote
scythe000 Posted May 9, 2018 Author Posted May 9, 2018 I can't even get phpinfo to load on the CC sites, but heres one from my wordpress site on the same host. Could it be an issue with my php.ini? session.save_path = "/tmp/" register_globals = off allow_url_fopen = off expose_php = Off max_input_time = 60 variables_order = "EGPCS" extension_dir = ./ upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" [Zend] zend_extension=/usr/local/zo/ZendExtensionManager.so zend_extension=/usr/local/zo/4_3/ZendOptimizer.so zend_extension=/home/content/xxx/html/ioncube/ioncube_loader_lin_5.2.so Quote
bsmither Posted May 9, 2018 Posted May 9, 2018 For now, please make the edit in /includes/global.inc.php, choosing either "file" or "memcached". Quote
havenswift-hosting Posted May 10, 2018 Posted May 10, 2018 12 hours ago, bsmither said: For now, please make the edit in /includes/global.inc.php, choosing either "file" or "memcached". Choose "file" as "memcached" is unlikely to be installed on a standard shared hosting platform Quote
scythe000 Posted May 10, 2018 Author Posted May 10, 2018 (edited) Luckily, they did have memcached as a PHP option. I enabled it, and edited the global.inc.php, and all seems to be running fine on php 7.1! Edited May 10, 2018 by scythe000 typo Quote
Al Brookbanks Posted May 10, 2018 Posted May 10, 2018 My local development environment is PHP 7.2 and it runs like a dream on that too. I've got one customer who store doesn't function very well on PHP 7.0 but I think its due to badly configured opcache, switching to 5.6 fixed it but I never got to the bottom of what the actual problems was. W Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.