@walletpan11
Profile
Registered: 1 year, 7 months ago
Apache - Marcus Povey So I've been using myCloud for a while now as a convenient method of sharing specific files across my devices. I've also learned How to Make a Minecraft Server, which has been pretty fun. It's an PHP application so it's easy to set up. Anyway, I updated my server to PHP 7.3 which allows it to run the latest Known code, in addition to other things. PHP 7.3 is the most up-to-date stable code that can be used by everyone. This was a problem as ownCloud could only be used on PHP versions up to and including 7.2. The next version of ownCloud will apparently support PHP 7.3 but release dates are slow, and I really needed to get my syncing setup and running again. It is possible to make use of PHP 7.2 on the ownCloud server and PHP 7.3 on all other applications. Installing PHP-FPM If you're running the old school mod_php apache module first thing you must do is install PHP-FPM. I was going to do this in the past, as this is essentially the most modern method of running PHP. It's quicker, provides greater performance options, and, crucially, for me, decouples Apache and PHP so you can run multiple versions. On Debian based servers (mine is Debian, and I have an external PHP 7.3 apt repository installed) This turns out to be incredibly easy: You will also need to install all PHP modules (pdo and gd) However, it's your choice. The next step is to change your configuration: Two things to note here. First replace the a2dismod with the latest version of PHP. Additionally, you'll notice that I didn't activate the PHP 7.2 FPM configuration. This is because PHP 7.3 should be the default, however PHP 7.2 can be enabled on selected virtual hosts. You should now see something similar to this when you look up phpinfo() Notice the PHP version and Server API. If you look at your server's processes, you'll see both PHP 7.3 and PHP 7.2 FPM servers running: Configuring ownCloud's VirtualHost for PHP 7.2 Now, you have to change your ownCloud VirtualHost to make use of the PHP 7.2 fast CGI server. Again, this is really really easy, and is pretty much a cut and paste from the php7.2-fpm.conf file you'll find in your /etc/apache2/conf-available directory. memes rain The following should be included in your ownCloud virtual host definition Now when you run PHPinfo() on your ownCloud domain, you should find it running PHP 7.2! Now I can get back to syncing my files, while running the latest PHP version for other domains. This is a helpful feature that can be used to accomplish more than slow software updates. To begin this method will let me run a cutting-edge version of PHP like PHP 7.4 against, for example my development version of Known and keep my blog running the stable version. Anyway, I thought this was pretty cool. Hopefully you'll find it useful too!
Forums
Topics Started: 0
Replies Created: 0
Forum Role: Participant