chamilo-lms icon indicating copy to clipboard operation
chamilo-lms copied to clipboard

Display_error warning stay red in installation php.ini check even if right in php.ini

Open baelmyhu opened this issue 9 years ago • 10 comments

Current behavior / Resultado actual / Résultat actuel

In php.ini display_errors = Off and installation page show Display Error = On see (https://content.screencast.com/users/hborderi/folders/Jing/media/cd7b7a98-1c69-4e58-9acb-584919954f37/2017-11-28_1642.png) Same for entry Memory limit see https://content.screencast.com/users/hborderi/folders/Jing/media/65a343ad-1ea1-4fbf-b4c2-1e4da3b0ed33/2017-11-28_1650.png

Expected behavior / Resultado esperado / Résultat attendu

Display Error = Off in green for current installation

Steps to reproduce / Pasos para reproducir / Étapes pour reproduire

Chamilo Version / Versión de Chamilo / Version de Chamilo

1.11.6

baelmyhu avatar Nov 28 '17 15:11 baelmyhu

Are you sure your display_errors is not updated by a .htaccess or by PHP settings in your VirtualHost config? This being said, I think the installation process forces this setting to "On" somewhere at the beginning (just for the installation time).

ywarnier avatar Nov 28 '17 15:11 ywarnier

[Debian GNU/Linux 7.11 (wheezy)] Actually, for display_errors, if it is Off, ini_get('display_errors') = "", and if it is On ini_get('display_errors') = "1"

For memory_limit, you're right, the install script put it to "-1"

baelmyhu avatar Nov 29 '17 15:11 baelmyhu

I cannot reproduce the error. "display_errors" can be setup in many different places ... Check your virtual host.

jmontoyaa avatar Dec 07 '17 12:12 jmontoyaa

I was having the same problem and I think I found why. The installation page calls /main/install/index.php which starts with a line saying ini_set('display_errors', '1');

mrik974 avatar Jan 15 '18 11:01 mrik974

I can reproduce the problem and mrik974 is right it comes from the ini_set at the beginning of main/install/index.php that makes the check always red on the prerequisit test. So I think we should or remove it or change the system check because it always gets red and let people think there is something wrong and stop the installation process.

diff --git a/main/install/index.php b/main/install/index.php
index f8e094e165..75876f6189 100755
--- a/main/install/index.php
+++ b/main/install/index.php
@@ -17,9 +17,9 @@ use ChamiloSession as Session;
  * @package chamilo.install
  */
 
-ini_set('display_errors', '1');
+//ini_set('display_errors', '1');
 ini_set('log_errors', '1');
-ini_set('memory_limit', -1);
+//ini_set('memory_limit', -1);
 ini_set('max_execution_time', 0);
 error_reporting(-1);

When I comment those 2 lines I get the correct value of my system and all is green for the install. @jmontoyaa why do we need those ini_set ?

NicoDucou avatar Mar 02 '18 13:03 NicoDucou

I am also experiencing this issue. PHP 7.1

july8six avatar Mar 09 '18 06:03 july8six

Did anyone test an installation recently to confirm that the issue is gone?

ywarnier avatar Jun 11 '18 20:06 ywarnier

I just did a new installation and everything is fine. I close this task

NicoDucou avatar Jul 17 '18 11:07 NicoDucou

same error on 1.11.6

image

jorgemop avatar Jul 30 '18 19:07 jorgemop

@jorgemop this is fixed in the development version, to be published as v1.11.8. This is not yet available. We cannot change the 1.11.6 package after having published it. You can either download the development version (see README for 1.11.x branch) or wait for 1.11.8 to be released.

ywarnier avatar Jul 30 '18 19:07 ywarnier