Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-14730

PHP version check should be removed from index.php

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Medium Medium
    • 4.0.5, 4.1.2, 4.2.0alpha1
    • 4.0.4, 4.1.0, 4.1.1
    • Install, Misc
    • 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.

      Attachments

        Activity

          People

            andre1 andre1
            qwix qwix
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: