Details
-
Improvement
-
Resolution: Fixed
-
Medium
-
4.0.4, 4.1.0, 4.1.1
-
None
Description
Currently in index.php we always check the PHP version is correct :
if ( version_compare( phpversion(), '5.1' ) < 0 ) { print( "<h1>Unsupported PHP version " . phpversion() . "</h1>" ); print( "<p>eZ Publish 4.x does not run with PHP 4.</p>". "<p>For more information about supported software please visit ". "<a href=\"http://ez.no/download/ez_publish\" >eZ Publish download page</a></p>" ); exit; }
The problem is that we run this code a lot of times whereas it is only needed once, during the setup wizard.
I propose to move this code piece to kernel/setup/steps/ezstep_welcome.php
There is one drawback though if the user starts the setup wizard with the wrong PHP version (for example PHP 4 for ezp 4.*) he might see a lot of errors in the setup wizard and might not notice the wizard states the PHP version is not correct.