Support forums : Branches

Making the installer more obvious

Discussion about existing branches and the directions they need to go in, or, for branches that are going to happen. "Quickies" is wide open. "Branches" is more focused.

Moderator: Dracones

Re: Making the installer more obvious

Postby EdB » Mon Sep 12, 2011 5:31 pm

Referencing the bits leading up to viewtopic.php?f=24&t=906&p=6575#p6575 does your recent forays into this neck of the woods let you say if we check PHP and MySQL versions prior to attempting installation?

If not we most certainly should, but it can easily be a different branch given that this branch is geared to what one sees more than what it does that one doesn't see.
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: Making the installer more obvious

Postby leeturner » Mon Sep 12, 2011 5:50 pm

EdB wrote:And hey has anyone ever used the second linked "here"? I mean, WTF it can't find where the damned file is when all it has to do is look for it? Never actually looked at the code behind that bit though.


No, I've nerver needed to click that second 'here'. Seems to me that it would be obvious where the installer is due to the fact we know where we are as we are actually displaying a web page.

I'll look at that while playing with the look and feel.
leeturner
Dracone
User avatar
 
Posts: 730
Joined: Fri Dec 11, 2009 11:55 am
Location: Brighton, UK

Re: Making the installer more obvious

Postby leeturner » Mon Sep 12, 2011 5:57 pm

EdB wrote:Referencing the bits leading up to viewtopic.php?f=24&t=906&p=6575#p6575 does your recent forays into this neck of the woods let you say if we check PHP and MySQL versions prior to attempting installation?

If not we most certainly should, but it can easily be a different branch given that this branch is geared to what one sees more than what it does that one doesn't see.


Not seen anything in the code and a quick test by changing MAMP to use PHP4 shows that the installer just fails with an error in the error log:

Code: Select all
PHP Parse error:  syntax error, unexpected ':', expecting '(' in /Applications/MAMP/htdocs/installer_base_config/qp_inc/_core/_misc.funcs.php on line 1116


We need to do better than that. :D

L
leeturner
Dracone
User avatar
 
Posts: 730
Joined: Fri Dec 11, 2009 11:55 am
Location: Brighton, UK

Re: Making the installer more obvious

Postby leeturner » Mon Sep 12, 2011 6:02 pm

Actually I take that back, we do in the installer:

Code: Select all
   // CONNECT TO DB:
   $DB = new DB( $tmp_db_config );
   unset($tmp_db_config);

   if( $DB->error )
   { // restart conf
      echo '<div class="error"><p class="error">'.T_('Check your database config settings below and update them if necessary...').'</p></div>';
      display_base_config_recap();
      $action = 'start';
   }
   else
   {
      $DB->halt_on_error = true;  // From now on, halt on errors.
      $DB->show_errors = true;    // From now on, show errors (they're helpful in case of errors!).

      // Check MySQL version
      $mysql_version = $DB->get_var( 'SELECT VERSION()' );
      list( $mysl_version_main, $mysl_version_minor ) = explode( '.', $mysql_version );
      if( ($mysl_version_main * 100 + $mysl_version_minor) < 500 )
      {
         die( '<div class="error"><p class="error"><strong>'
            .sprintf( T_('The minimum requirement for this version of %s is %s version %s '
                  .'but you are trying to use version %s!'),
               $app_name, 'MySQL', '5.0', $mysql_version )
            .'</strong></p></div>' );
      }
   }
}

// Check PHP version
list( $version_main, $version_minor ) = explode( '.', phpversion() );
if( ($version_main * 100 + $version_minor) < 500 )
{
   die( '<div class="error"><p class="error"><strong>'
      .sprintf( T_( 'The minimum requirement for this version of %s is %s version %s but you are '
            .'trying to use version %s!'),
         $app_name, 'PHP', '5.0', phpversion() )
      .'</strong></p></div>' );
}


However, it doesn't get there when I change to php4 because it just fails

L
leeturner
Dracone
User avatar
 
Posts: 730
Joined: Fri Dec 11, 2009 11:55 am
Location: Brighton, UK

Re: Making the installer more obvious

Postby EdB » Mon Sep 12, 2011 6:05 pm

Wanna call it a different branch? Get this branch in merge where it can languish till the newest gatekeeper finally starts working on some of the really old stuff, then the newer stuff gets reviewed and merged, then this becomes part of core, THEN we see about making sure we actually do the checks before install?

Heck seeing edoc7's last on that other thread makes me think maybe we should have a quick check of some kind on dashboard for if a blog is moved to a server with older bits. OTOH it means adding code for a reasonably rare circumstance and I kinda think we should avoid that neighborhood. Leave "this is cool to do for not common bits" up to tiny little plugins for example.

UPDATE: so all we need to do is make the fail method for PHP and MySQL more human-friendly. Same thing though. Wanna do it in this branch or save it for a "this is the guts of installer" branch?
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: Making the installer more obvious

Postby leeturner » Mon Sep 12, 2011 8:35 pm

EdB wrote:Heck seeing edoc7's last on that other thread makes me think maybe we should have a quick check of some kind on dashboard for if a blog is moved to a server with older bits. OTOH it means adding code for a reasonably rare circumstance and I kinda think we should avoid that neighborhood. Leave "this is cool to do for not common bits" up to tiny little plugins for example.


Agreed

Yeah, I think I'll put this branch to bed one I have changed the look and feel of the 'no config' page and then start a new branch for the php/mysql bits.

L
leeturner
Dracone
User avatar
 
Posts: 730
Joined: Fri Dec 11, 2009 11:55 am
Location: Brighton, UK

Re: Making the installer more obvious

Postby leeturner » Fri Sep 16, 2011 10:18 am

leeturner
Dracone
User avatar
 
Posts: 730
Joined: Fri Dec 11, 2009 11:55 am
Location: Brighton, UK

Previous

Return to Branches

Who is online

Users browsing this forum: No registered users and 2 guests

cron