private function validate_step2()
 {
     $next = UIBase::GrabInput('ANY', 'next');
     if ($next == 0) {
         $this->next_step = 1;
         return TRUE;
     }
     $php_version = UIBase::GrabGoodInput('ANY', 'buildver');
     // only if illegal action, will have err
     if (!$this->validate_php_version($php_version)) {
         $this->next_step = 0;
         return FALSE;
     }
     $this->pass_val['php_version'] = $php_version;
     $options = new BuildOptions($php_version);
     $options->SetValue('ExtraPathEnv', UIBase::GrabGoodInput('ANY', 'path_env'));
     $options->SetValue('InstallPath', UIBase::GrabGoodInput('ANY', 'installPath'));
     $compilerFlags = UIBase::GrabGoodInput('ANY', 'compilerFlags');
     $configParams = UIBase::GrabGoodInput('ANY', 'configureParams');
     //set the input even it has error, so user can modify
     $options->SetValue('ConfigParam', $configParams);
     $options->SetValue('CompilerFlags', $compilerFlags);
     $options->SetValue('AddOnSuhosin', NULL != UIBase::GrabGoodInput('ANY', 'addonSuhosin'));
     $options->SetValue('AddOnMailHeader', NULL != UIBase::GrabGoodInput('ANY', 'addonMailHeader'));
     $options->SetValue('AddOnAPC', NULL != UIBase::GrabGoodInput('ANY', 'addonAPC'));
     $options->SetValue('AddOnXCache', NULL != UIBase::GrabGoodInput('ANY', 'addonXCache'));
     $options->SetValue('AddOnMemCache', NULL != UIBase::GrabGoodInput('ANY', 'addonMemCache'));
     $options->SetValue('AddOnMemCached', NULL != UIBase::GrabGoodInput('ANY', 'addonMemCached'));
     $options->SetValue('AddOnOPcache', NULL != UIBase::GrabGoodInput('ANY', 'addonOPcache'));
     // can be real input err
     $v1 = $this->validate_extra_path_env($options->GetValue('ExtraPathEnv'));
     $v2 = $this->validate_install_path($options->GetValue('InstallPath'));
     $v3 = $this->validate_complier_flags($compilerFlags);
     $v4 = $this->validate_config_params($configParams);
     if (!$v1 || !$v2 || !$v3 || !$v4) {
         $options->SetType('INPUT');
         $options->SetValidated(FALSE);
         $this->pass_val['input_options'] = $options;
         $this->next_step = 2;
         return FALSE;
     }
     if (strpos($configParams, '--with-litespeed') === FALSE) {
         $configParams .= " '--with-litespeed'";
     }
     $configParams = "'--prefix=" . $options->GetValue('InstallPath') . "' " . $configParams;
     $options->SetValue('ConfigParam', escapeshellcmd($configParams));
     $options->SetValue('CompilerFlags', escapeshellcmd($compilerFlags));
     $options->SetType('BUILD');
     $options->SetValidated(TRUE);
     $this->pass_val['build_options'] = $options;
     $this->next_step = 3;
     return TRUE;
 }