1

I am aware of the pre-flight that Joomla runs before installation to show what the settings and what might need to be changed. I develop websites on one server and then move them to a hosting service for the client. I'd like to run this same sort of pre-flight check on that Joomla installation to see if the configuration needs to be changed.

The way I do this now, is I quickly installed a new version of Joomla on the new hosting service, do the pre-flight, change the configurations and then remove this version of Joomla and install the one I built for the client.

Is there a Joomla extension that does this, that can be run any time in a fully installed version of Joomla?

Is there a way to run the pre-flight check list which is already built-into every Joomla installation?

2

I assume you transfer your sites manually from development server to your client's server.

I highly recommend using Akeeba Backup (free and paid version available) in combination with Akeeba Kickstart, to transfer your site. The restoration script (ANGIE - Akeeba Next Generation Installation Engine) will show you the same information as the Joomla installer before you proceed with the installation of your backup:

ANGIE - Akeeba Next Generation Installer Engine

(Sorry about the screenshot language, but you get the general idea...)

The documentation is very good, but these are the basic steps to transfer your site:

  1. Install Akeeba Backup on your development site, and take a full backup (this includes files and database by default).
  2. Move the backup file to the live server (.jpa file type by default).
  3. Upload and extract Akeeba Kickstart (or at least the file kickstart.php) to the live server, in the same folder as your backup file.
    (Note that the pro version of Kickstart requires you to change the file name of kickstart.php before you can run it)
  4. Run kickstart.php by visiting http://YOURDOMAIN.COM/kickstart.php
  5. The script will extract your backup, and give you a link to the installer.
  6. Check the configuration shown and make changes as needed to your hosting environment.
  7. Follow the rest of the steps for restoring your backup, the interface is very similar to what the normal Joomla installer uses.

Update

In order to manually check for PHP options using a custom script, take a look at the file /installation/model/setup.php (from the Joomla installation package) at about line #230, the method getPhpOtions() returns an array of PHP config options.

public function getPhpOptions()
    {
        $options = array();

        // Check the PHP Version.
        $option = new stdClass;
        $option->label  = JText::sprintf('INSTL_PHP_VERSION_NEWER', JOOMLA_MINIMUM_PHP);
        $option->state  = version_compare(PHP_VERSION, JOOMLA_MINIMUM_PHP, '>=');
        $option->notice = null;
        $options[] = $option;

        // Check for magic quotes gpc.
        $option = new stdClass;
        $option->label  = JText::_('INSTL_MAGIC_QUOTES_GPC');
        $option->state  = (ini_get('magic_quotes_gpc') == false);
        $option->notice = null;
        $options[] = $option;

        // Check for register globals.
        $option = new stdClass;
        $option->label  = JText::_('INSTL_REGISTER_GLOBALS');
        $option->state  = (ini_get('register_globals') == false);
        $option->notice = null;
        $options[] = $option;

        // Check for zlib support.
        $option = new stdClass;
        $option->label  = JText::_('INSTL_ZLIB_COMPRESSION_SUPPORT');
        $option->state  = extension_loaded('zlib');
        $option->notice = null;
        $options[] = $option;

        // Check for XML support.
        $option = new stdClass;
        $option->label  = JText::_('INSTL_XML_SUPPORT');
        $option->state  = extension_loaded('xml');
        $option->notice = null;
        $options[] = $option;

        // Check for database support.
        // We are satisfied if there is at least one database driver available.
        $available = JDatabaseDriver::getConnectors();
        $option = new stdClass;
        $option->label  = JText::_('INSTL_DATABASE_SUPPORT');
        $option->label .= '<br />(' . implode(', ', $available) . ')';
        $option->state  = count($available);
        $option->notice = null;
        $options[] = $option;

        // Check for mbstring options.
        if (extension_loaded('mbstring'))
        {
            // Check for default MB language.
            $option = new stdClass;
            $option->label  = JText::_('INSTL_MB_LANGUAGE_IS_DEFAULT');
            $option->state  = (strtolower(ini_get('mbstring.language')) == 'neutral');
            $option->notice = ($option->state) ? null : JText::_('INSTL_NOTICEMBLANGNOTDEFAULT');
            $options[] = $option;

            // Check for MB function overload.
            $option = new stdClass;
            $option->label  = JText::_('INSTL_MB_STRING_OVERLOAD_OFF');
            $option->state  = (ini_get('mbstring.func_overload') == 0);
            $option->notice = ($option->state) ? null : JText::_('INSTL_NOTICEMBSTRINGOVERLOAD');
            $options[] = $option;
        }

        // Check for a missing native parse_ini_file implementation.
        $option = new stdClass;
        $option->label  = JText::_('INSTL_PARSE_INI_FILE_AVAILABLE');
        $option->state  = $this->getIniParserAvailability();
        $option->notice = null;
        $options[] = $option;

        // Check for missing native json_encode / json_decode support.
        $option = new stdClass;
        $option->label  = JText::_('INSTL_JSON_SUPPORT_AVAILABLE');
        $option->state  = function_exists('json_encode') && function_exists('json_decode');
        $option->notice = null;
        $options[] = $option;

        // Check for mcrypt support
        $option = new stdClass;
        $option->label  = JText::_('INSTL_MCRYPT_SUPPORT_AVAILABLE');
        $option->state  = is_callable('mcrypt_encrypt');
        $option->notice = $option->state ? null : JText::_('INSTL_NOTICEMCRYPTNOTAVAILABLE');
        $options[] = $option;

        // Check for configuration file writable.
        $writable = (is_writable(JPATH_CONFIGURATION . '/configuration.php')
            || (!file_exists(JPATH_CONFIGURATION . '/configuration.php') && is_writable(JPATH_ROOT)));

        $option = new stdClass;
        $option->label  = JText::sprintf('INSTL_WRITABLE', 'configuration.php');
        $option->state  = $writable;
        $option->notice = ($option->state) ? null : JText::_('INSTL_NOTICEYOUCANSTILLINSTALL');
        $options[] = $option;

        return $options;
    }
  • 1
    @Edward_178118 - Perhaps write a CLI script? – Lodder Aug 3 '16 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.