I set up a new linode (Linode 2048) with Ubuntu 16.04, Nginx 1.10.0, and php 7.0.4. I set up a basic Grav installation with the admin plugin and all seems to be working well. I believe that I have all the required php extensions installed:
==> dpkg -l | grep php
ii php-common 1:35ubuntu6 all Common files for PHP packages
ii php7.0-cli 7.0.4-7ubuntu2 amd64 command-line interpreter for the PHP scripting language
ii php7.0-common 7.0.4-7ubuntu2 amd64 documentation, examples and common module for PHP
ii php7.0-curl 7.0.4-7ubuntu2 amd64 CURL module for PHP
ii php7.0-fpm 7.0.4-7ubuntu2 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php7.0-gd 7.0.4-7ubuntu2 amd64 GD module for PHP
ii php7.0-json 7.0.4-7ubuntu2 amd64 JSON module for PHP
ii php7.0-mbstring 7.0.4-7ubuntu2 amd64 MBSTRING module for PHP
ii php7.0-opcache 7.0.4-7ubuntu2 amd64 Zend OpCache module for PHP
ii php7.0-readline 7.0.4-7ubuntu2 amd64 readline module for PHP
ii php7.0-xml 7.0.4-7ubuntu2 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii php7.0-zip 7.0.4-7ubuntu2 amd64 Zip module for PHP
I am not sure how to install some of the optional modules for php 7.0?
apcu
PECL Yaml
xdebug
(I did install opcache.)
When I do “apt-cache search php7.0-”, I do not see any of these modules listed.
Are these optional modules still recommended for Ubuntu 16.04/php 7.0? Has anyone installed them for this environment and can point me to the procedures?
I am really new to Web Development (although, I have lots of experience with Linux), but I am trying to learn! Since I am new, I wanted to start with the newer environment, Ubuntu 16.04, php 7.0, … I want to start off with a solid installation as a foundation to build on. I have been able to set up this environment, including the optional modules listed, on my Mac, using Homebrew (Using Andy’s instructions). I would also like to get the same environment working on Ubuntu 16.04 if that still makes sense.
I do plan on writing an Ubuntu 16.04/PHP 7.0 version of the VPS installation docs as there are several changes required due to new package versions and new file locations.
It downloaded the 1.2 version of yaml and tried to build it, but the build failed.
In file included from /tmp/pear/temp/yaml/yaml.c:35:0:
/tmp/pear/temp/yaml/php_yaml.h:56:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
compilation terminated.
The procedure that I found was for php 5.x, so may be that’s why it failed. I will dig deeper, and see if I can get it working.
Yes, it will be nice when you get a chance to update the VPS installation docs.
Ubuntu 16.04 is very new to me too. I just got things running on a test VPS a couple of days ago. I need to go back and redo it and take notes this time. Wasn’t too bad, but a little different than previous.
Also PHP7.0 is new to Ubuntu so they probably just don’t have all the packages available yet. Took a while to get some of these in Homebrew also, so it’s to be expected.
Yes, I know that it’s all new. I guess since I am just really getting started, I wanted to start with the latest. Also, I tried:
$ sudo pecl install yaml-beta
This time, the build worked:
Build process completed successfully
Installing '/usr/lib/php/20151012/yaml.so’
install ok: channel://pecl.php.net/yaml-2.0.0RC7
configuration option “php_ini” is not set to php.ini location
You should add “extension=yaml.so” to php.ini
Build process completed successfully
Installing '/usr/lib/php/20151012/apcu.so’
Installing '/usr/include/php/20151012/ext/apcu/apc_sma_api.h’
Installing '/usr/include/php/20151012/ext/apcu/apc_cache_api.h’
Installing '/usr/include/php/20151012/ext/apcu/apc_pool_api.h’
Installing '/usr/include/php/20151012/ext/apcu/apc_lock_api.h’
Installing '/usr/include/php/20151012/ext/apcu/apc.h’
Installing '/usr/include/php/20151012/ext/apcu/apc_serializer.h’
Installing '/usr/include/php/20151012/ext/apcu/apc_api.h’
install ok: channel://pecl.php.net/apcu-5.1.0
configuration option “php_ini” is not set to php.ini location
You should add “extension=apcu.so” to php.ini
and I was able to install it via the procedure that I previously noted.
So I now have the beta versions of yaml and apcu installed on my Mac OS, Ubuntu 16.04 VM, but, being new, I do not know how well it’s working.
My Grav 1.10.0 install Configuration Info shows:
Configuration
apcu
APCu Support
Enabled
yaml
LibYAML Support
enabled
Module Version
2.0.0RC7
LibYAML Version
0.1.6
Have you found any speed improvements with APCu in PHP 7.0? In my testing with Grav at least, there is no performance benefit over files. This is a bit strange as it makes a huge difference in PHP 5.x
I just google’ed a website to test the page load speed, http://tools.pingdom.com. Can you recommend a better resource? Anyway, I ran some very quick tests. I may have seen a slight improvement with apcu loaded, but not much. This was a 1 page Grav site. I have been focused on getting a clean Ubuntu 16.04, php 7.0 installation working. And, then I will get back to developing my site, using Grav. I think that I am about there.
Again, keep in mind, I am new at this.
And, btw, I learned that APCU can be installed with just:
sudo apt install php-apcu
This is the latest, 5.1.3 version, which is suppose to be compatible with php 7.0.