Enable Zend OpCache/Change Document Root

Enable Zend OpCache/Change Document Root

by Ahmed Ibrahim -
Number of replies: 4

I am installing a new version from moodle from this link:

https://docs.moodle.org/28/en/Step-by-step_Installation_Guide_for_Ubuntu

In the last steps, there exists a sections named:

Suggestions: Enable Zend OpCache/Change Document Root

This section says that we will do changes into /etc/php5/apache2/conf.d/05-opcache.ini

While it contains a link for getting the new settings and says that we will change php.ini

Which file will we make change into?

php.ini seems to be right, but will we do anything into /etc/php5/apache2/conf.d/05-opcache.ini?

Best regards

Average of ratings: -
In reply to Ahmed Ibrahim

Re: Enable Zend OpCache/Change Document Root

by Colin Fraser -

AFAIK, the opcache does not have anything to do with Moodle, rather it is a PHP device to speed up loading of pages. I also understand that in more recent versions of PHP the opcache has been enabled by default, but I may be mistaken. You may want to check the PHP documentation here. 

In reply to Ahmed Ibrahim

Re: Enable Zend OpCache/Change Document Root

by Colin Fraser -

AFAIK, the opcache does not have anything to do with Moodle, rather it is a PHP device to speed up loading of pages. I also understand that in more recent versions of PHP the opcache has been enabled by default, but I may be mistaken. You may want to check the PHP documentation here. 

In reply to Colin Fraser

Re: Enable Zend OpCache/Change Document Root

by Ahmed Ibrahim -
I am asking about the moodle step by step documentation 

What do you think?

In reply to Ahmed Ibrahim

Re: Enable Zend OpCache/Change Document Root

by Colin Fraser -

First, check to make sure the opcache is running or not. If it is then you need do nothing more I would think. If it is not, then changes to the php.ini file, then restart of the server should resolve any further issue. I do not know how to test if the opcache is available or not, again, the Zend documentation may be able to help here. 

The Moodle docs have always suffered from being written by experts, people to whom the topic is trivial. They are not always clear, unfortunately. In this case, the DocumentRoot is likely to be the Apache server http.conf file, but what it seems to be talking about is creating something like an alias, look at the paragraph preceding the above quote. What that is saying is you can shorten your URL path to the Moodle by directing the DocumentRoot to the /moodle directory. Not clear unless you have some server knowledge.