Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
marklcfc Posted October 18, 2016 Posted October 18, 2016 What is the best option for caching method on a server using PHP 7? I want to use memcached but I'm told that isn't available with PHP 7. Is this true and is there an alternative?
TDBF Posted October 18, 2016 Posted October 18, 2016 4 minutes ago, marklcfc said: What is the best option for caching method on a server using PHP 7? I want to use memcached but I'm told that isn't available with PHP 7. Is this true and is there an alternative? Maybe this Article will help you out.
marklcfc Posted October 18, 2016 Author Posted October 18, 2016 I've asked my hosts time and time again as well as showing them that article above but get told Quote The PHP functions need to be supported by cPanel to not be lost on the upgrades and work with cPanels EasyApache, this also helps ensure the stability of your server. These guides are if you have a stand alone Apache install.
ASTRAPI Posted October 18, 2016 Posted October 18, 2016 Memcached and zend opcache are the best options to use together and both work great with php 7 :-)
IveLeft... Posted October 18, 2016 Posted October 18, 2016 2 hours ago, marklcfc said: I've asked my hosts time and time again as well as showing them that article above but get told Change hosts then to a better one
SteffM Posted October 30, 2016 Posted October 30, 2016 I am currently running php 7.0.12 with Redis and ofcourse opcache Your best bet is to change hosts or host it yourself if you want it all to work nicely on php7 The problem with hosts running WHM/CPanel is that updates to PHP 7 are really slow since not all is stable yet, therefore they have to wait till WHM/easyapache decides to release it.
marklcfc Posted November 2, 2016 Author Posted November 2, 2016 On 30/10/2016 at 4:14 PM, SteffM said: I am currently running php 7.0.12 with Redis and ofcourse opcache Your best bet is to change hosts or host it yourself if you want it all to work nicely on php7 The problem with hosts running WHM/CPanel is that updates to PHP 7 are really slow since not all is stable yet, therefore they have to wait till WHM/easyapache decides to release it. What php handler do you use with redis and opcache? I ran into problems with opcache and fastcgi, my hosts have suggested dso but have no experience of it. also with Redis should I use file system or MySQL database?
marklcfc Posted November 7, 2016 Author Posted November 7, 2016 Any information regarding the above would be much appreciated!
SteffM Posted November 8, 2016 Posted November 8, 2016 I am currently running CentOS 7 with apache and installed the php70u packages: PHP 7.0.12 (cli) (built: Oct 14 2016 09:23:01) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.12, Copyright (c) 1999-2016, by Zend Technologies It doens't matter if you use MySQL or File System, they both do their job well enough, but the fastest would be MySQL.
marklcfc Posted November 8, 2016 Author Posted November 8, 2016 What about php handler? This is the problem I had on fastcgi (I don't know if that is the direct cause), lots of misses and not many hits
SteffM Posted November 8, 2016 Posted November 8, 2016 This doens't look weird to me. You have 58 cache misses and 58 cached scripts, that's how caching works, the first script will always be a miss, the requests afterwards will be serving the cached version. Either your website doesn't get any traffic or you restarted your webserver. If you want to see your hits increasing you need more requests and don't be restarting your webserver/changing files. if you hit F5 a couple of times on your IPB, your cache hits should increase
marklcfc Posted November 8, 2016 Author Posted November 8, 2016 No, cache hits never changed from 2. I had opcache online for a few hours before disabling opcache and looking for advice. My site gets quite alot of hits in that time. My host said: B) As you are running CGI as your PHP handler opcache gets emptied on every request as each of them starts there own cache. The other PHP handler that can be used is "dso".
Tracy Perry Posted November 8, 2016 Posted November 8, 2016 Are you running your own server (vps/dedi) or is this a shared hosting? I know back in 2015 there was several discussions with issues with PHP opcache and shared hosting - it was sharing the cache across the various clients and caused issues. I didn't keep up with it closely as I prefer a high performance setup than a cPanel/WHM setup.
SteffM Posted November 8, 2016 Posted November 8, 2016 1 hour ago, marklcfc said: PHP handler opcache gets emptied on every request as each of them starts there own cache That's quite interesting. I've never been a fan of shared hosting(except for low-traffic word-press websites), due to the fact you can't customize anything and the shared hosting company has a lot of restrictions. DSO is the old name of apache's mod_php I am running mod_php myself, but it's not in a shared hosting environment. It completely depends on what your shared hosting companies allows you to change in your Apache/PHP configuration If they say you can switch to mod_php, you can try doing that in your shared web hosting configuration panel right? This are my opcache statistics:
marklcfc Posted November 8, 2016 Author Posted November 8, 2016 I'm on a dedicated server, I didn't change over to dso because as far as I was aware fastcgi was better for forums. Someone told me this: Quote php-fpm aka FastCGI and opcache work find together. Using DSO causes memory scaling problems as the number of php instances scales with load rather than being fixed. Better to serve a known fixed number of php pages at a time, rather than attempt to serve upto thousands with no warning or scalability. CGI means every page, the webserver forks to run a php instance from scratch. It is slow. suPHP is sudo followed by CGI. It is even slower than CGI.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.