📜 ⬆️ ⬇️

Solving the problem of "empty admin" MODX Revo

When installing MODX Revolution, many have a problem with the fact that when they enter the admin panel, the main content (right block) is not loaded.

This behavior is a consequence of the work of the Suhosin module and / or eAccelerator.

Under the decision of the cut.

The problem is that the default MODX Revo admin panel uses caching of JS and CSS files using Minify . One of the “head-on” solutions, which many places recommend “if the rest did not work,” is disabling caching. Just in case, I will tell you how it is done:
Open the file /core/cache/system_settings/config.cache.php
string 'compress_js' => '1 ′, change to ' compress_js '=>' 0 ′,
string 'compress_css' => '1 ′, change to ' compress_css '=>' 0 ′,
')
then, when the admin panel is loaded, go to System-> Settings and enter compress in the search, several items will be displayed, we need to set the values ​​of NON for compress_js and compress_css .

The solution is working, that's the only way we slow down the admin panel by loading 100,500 scripts and styles, and we would like the admin panel to work faster.

Consider better better solutions.

Solving the problem with Suhosin.


Most often, it is possible to solve the problem with Suhosin by specifying the value of the variable suhosin.get.max_value_length equal to 4096 in the php-config suhosin.ini:
suhosin.get.max_value_length = 4096

Or, if the server settings allow, then write the following line to /manager/.htaccess :
php_value suhosin.get.max_value_length 4096

Although this setting is spelled out in the minify script, it may not work if you are not allowed to change this setting from the PHP script.

If everything is good and caching is working, then you can not read further.

Solving the problem with eAccelerator.


I have a bunch of apache + nginx + php running with eAccelerator on my server. For some unknown reason, the caching of scripts worked once. It was empirically found out that the problem is due to the eAccelerator. Googling explanatory tips did not give, disabling eAccelerator is not an option at all, disabling script caching is also not an option.

The solution is simple.
Open the file /manager/min/index.php and at the very top (after <? Php of course) we write:
@ini_set('eaccelerator.enable', 0);
thereby turning off the eAccelerator for this script.
Of course, for this to work, you should have the ability to change settings from PHP scripts.

Alternatively, if the server settings allow, you can put the following line in the /manager/min/.htaccess file:
php_value eaccelerator.enable 0

After the done manipulations the caching of scripts and styles works, the admin works faster!

Source: https://habr.com/ru/post/151508/


All Articles