While it’s mentioned in the hosting part of the user documentation, is it really necessary to have Zend OPcache enabled for Grav to work (at all)? My current hosting doesn’t have cPanel or such and I’m contacting the webmaster via e-mail or IRC everytime I need some feature/module turned on in Apache or some extra PHP module installed. The system is running Debian stable.
I also find it a little annoying that the documentation doesn’t go into detail about what I really need in order to get Grav up and running in a production environment. I mean I’ve got a ready site which was running just fine on my laptop (on Debian stable with “php -S localhost:8000”). Now I’m not sure if blank screen on my vhost under /grav is just due to missing modules or not. Gets me all frustrated you know…
[finnish]Hei Paavo, lyhyt vastaus: se tulee mukana.[/finnish]
Long answer is that we use Zend opcache, but it is already included in our package. So there’s no need to install anything else as long as your PHP meets the minimum requirements. Which is mostly PHP 5.4+ with some extensions like gd enabled.
Sorry, I meant Zend cache, not opcache. Silly of me. OPcache isn’t needed and PHP 5.5 already has it included.
It would be nice to know which extensions exactly since I’m not completely sure whether or not the target system has the needed extensions. PHP 5.4 is there and so are Apache’s rewrite and headers modules.
I’ll let someone else to reply. Been working too intensively all the day and it looks like I have no idea what I’m talking on!
This is something I need to add to the documentation so it’s a good to outline them here first. The required PHP modules and apache things are as follows:
Apache:
mod_rewrite
mod_headers
PHP 5.4+
-
gd
(graphics library needed by image handling) -
curl
(for GPM) -
ssl
(for GPM) -
mbstring
(usually included)
Most of these are generally part of hosting server PHP installations, but if you are building PHP yourself, you should makes sure these at least are there. Regarding optional ones:
Optional
-
apc
(PHP 5.4) orapcu
(PHP 5.5+) for faster performance -
opache
(PHP5.4+) for faster performance - included but often needs to be loaded inphp.ini
-
xdebug
(for debugging in development only)
Good to know. Now that I’ve checked that the only things missing are optional I can go on wondering why I’m getting blank white pages of death.
You should turn on your PHP errors display (via your php.ini
) that will tell you what the error is.
http://learn.dev/basics/requirements#apache-requirements
I’ve added this information to the docs, if we find other things we can add it here.
I’m afraid I can’t do that since I’m not root nor webmaster, hence missing the permissions to edit it and php.ini resides in its default location (/etc/php5/apache2/php.ini). I also assume that my problem is purely related to PHP and not to having my site on a vhost residing under /var/www/ where my luser and group owns the files.
It could also be related to permissions. Perhaps you can access the error log file? that would contain the error messages also.
So close but no cigar. I’m not permitted to access anything under /var/log/
Time to contact the webmaster.
It’s working after now webmaster switched from mod_php to fastcgi and php-fpm and writing with my user was enabled under my vhost.
Thanks for adding the clarifications to documentation too. I’m now super happy that I’ve been able to migrate my project into production environment!
Glad you got it sorted!