1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Upgrading to PHP 7

Discussion in 'Server Configuration and Hosting' started by Live Free, Jun 11, 2016.

  1. Live Free

    Live Free Active Member

    I recently upgraded from a legacy VPS to a managed dedicated VPS. I'm trying to optimize my server, but before I go into full-blow optimization mode, I'm doing the basics, like upgrading to PHP 7 from PHP 5.4.

    Is there anything I need to keep in mind while upgrading to PHP 7?

    Should I upgrade my other fundamental software? If I do, is there an optimal version? Would the latest version be compatible with Xenforo?

    Current Set-Up:

    CentOS 7.2
    PHP 5.4.45
    memcache 2.2.7
    MySQL 5.6.30
    Memecached 1.4.25
    Apache 2.4.18
    EasyApache 3

    In addition to upgrading to PHP 7, should I be upgrading any of the above?

  2. Mouth

    Mouth Well-Known Member

    MySQL -> Percona
    Apache -> Nginx
    Memcache -> Redis
    Xon and maszd like this.
  3. ManagerJosh

    ManagerJosh Well-Known Member

    A great alternative is moving MySQL to MariaDB as well as discontinuing Apache and replacing it with LiteSpeed.

    I don't believe you need caching since with PHP 5.6 (I believe), caching is included by default.
  4. Live Free

    Live Free Active Member

    @Mouth @ManagerJosh

    Thank you for the responses. I have actually been reading here and there about some of those changes already, but there's a lot of information out there. An upgrade from Apache to something else would largely be beyond my skill level. I can teach myself what I need to know, but I need to keep in mind I'm on a managed server that might not be willing to help if things break.

    What benefits would Percona or MariaDB have over MySQL? How are they different than MySQL?

    What benefits would Nginx or LiteSpeed have over Apache as applied specifically to optimizing a Xenforo forum? I've read a lot of good things about nginx.

    I'm mostly considered about the end-users experience.
  5. Mouth

    Mouth Well-Known Member

    Speed, efficiency, lower memory usage = better user experience.
    Live Free likes this.
  6. Mouth

    Mouth Well-Known Member

    Percona is a drop-in replacement for MySQL, meaning you just have to install it from your package manager and it will auto-replace MySQL
    Nginx is mostly a drop-in replacement for Apache, but you'll need to create/adjust some web server level settings to make it work and point it at your Xf installation.
    Last edited: Jun 11, 2016
  7. Tracy Perry

    Tracy Perry Well-Known Member

    nginx is nowhere near a "mostly drop in replacement" for Apache - other than they both provide HTTP services. It doesn't use .htaccess (but stanza's in the vhost config or main nginx config). The vhost syntax is totally different. It's not "harder" but you do have to get used to it. AFAIK, the only cPanel tie-in there is for nginx is to use it as a reverse proxy to Apache.
    If not requiring a panel (but I imagine it is required if as most "managed services" require it and you mention EasyApache which I believe is tied to cPanel) then a CentOS/CentMin install is the ticket. Only "headache" is setting up mail on the system.
    If using cPanel, then LiteSpeed is the viable option.
    I believe the latest cPanel lets you replace MySQL with MariaDB (not sure since I don't "do" panels).
    eva2000 likes this.
  8. Mouth

    Mouth Well-Known Member

  9. Tracy Perry

    Tracy Perry Well-Known Member

    Did you happen to go to nginxcp.com and read their index page?

    Screen Shot 2016-06-10 at 10.34.44 PM.png

    Sure looks like the are telling you it will work as a front end reverse proxy of your cPanel server ALONG with Apache.
    They do state later you can select.. so not really sure which it does.

    Some further reading looks like you have to SSH and manually configure vhosts to use nginx as the HTTP server... and if you had to do that, why not just dump cPanel itself and the overhead.
    Last edited: Jun 11, 2016
  10. Mouth

    Mouth Well-Known Member

    .... plenty of step-by-step guides on how to achieve that. As I said, mostly a drop-in replacement. Web server for web server, just configure appropriately, each with slightly different approaches. OP did say was willing to learn and teach self.
  11. ManagerJosh

    ManagerJosh Well-Known Member

  12. Solidus

    Solidus Well-Known Member

    MariaDB is 100% a drop-in replacement.
    Live Free and Xon like this.
  13. RoldanLT

    RoldanLT Well-Known Member

    If you insist on using Cpanel, then replace:
    Apache > Nginx front end Proxy or the easier LiteSpeed
    Mysql > MariaDB 10.1
    PHP 7
    Memcached or Redis for Data Caching.
    Live Free likes this.
  14. Alex - A2Hosting

    Alex - A2Hosting Active Member

    I recommend you contacting your hosting provider before following any of the above steps. Whilst you should be ok, you should find out if your fully managed provider will still cover you if you adopt some of the above changes (Nginx for example). Whilst they should, it is best to confirm just in case -- save yourself paying for a fully managed server then finding out they can't support you when you need it.

    Also, since you're on a fully managed server, if they support it, you could ask them to make the above changes for you saving you the headache.

    MariaDB is a drop-in replacement for MySQL.
    Live Free likes this.

Share This Page