• Resolved Service2client

    (@cpa2client)


    Duplicator 1.1.4 can’t find php?

    I’m installing on VMware Win 10 using xampp and bitnami WordPress, the theme. The default install works fine but this theme I’m installing is getting this error. PHP is working on default install, located here

    localhost/
    c:/xampp/apps/wordpress/htdocs

    Error: PHP is not running

    Duplicator requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.

    Installer file contents

    <?php
    /*
    Copyright 2011-12 Cory Lamle lifeinthegrid.com

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License, version 2, as
    published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

    SOURCE CONTRIBUTORS:
    Gaurav Aggarwal
    David Coveney of Interconnect IT Ltd
    https://github.com/interconnectit/Search-Replace-DB/
    */

    if (file_exists(‘dtoken.php’)) {
    //This is most likely inside the snapshot folder.

    //DOWNLOAD ONLY: (Only enable download from within the snapshot directory)
    if (isset($_GET[‘get’]) && isset($_GET[‘file’])) {
    //Clean the input, strip out anything not alpha-numeric or “_.”, so restricts
    //only downloading files in same folder, and removes risk of allowing directory
    //separators in other charsets (vulnerability in older IIS servers), also
    //strips out anything that might cause it to use an alternate stream since
    //that would require :// near the front.
    $filename = preg_replace(‘/[^a-zA-Z0-9_.]*/’,”,$_GET[‘file’]);
    if (strlen($filename) && file_exists($filename) && (strstr($filename, ‘_installer.php’))) {
    //Attempt to push the file to the browser
    header(‘Content-Description: File Transfer’);
    header(‘Content-Type: application/octet-stream’);
    header(‘Content-Disposition: attachment; filename=installer.php’);
    header(‘Content-Transfer-Encoding: binary’);
    header(‘Expires: 0’);
    header(‘Cache-Control: must-revalidate, post-check=0, pre-check=0’);
    header(‘Pragma: public’);
    header(‘Content-Length: ‘ . filesize($filename));
    //FIXME: We should consider removing all error supression like this
    //as it makes troubleshooting a wild goose chase for times that the
    //script failes on such a line. The same can and should be accomplished
    //at the server level by turning off displaying errors in PHP.
    @ob_clean();
    @flush();
    if (@readfile($filename) == false) {
    $data = file_get_contents($filename);
    if ($data == false) {
    die(“Unable to read installer file. The server currently has readfile and file_get_contents disabled on this server. Please contact your server admin to remove this restriction”);
    } else {
    print $data;
    }
    }
    } else {
    header(“HTTP/1.1 404 Not Found”, true, 404);
    header(“Status: 404 Not Found”);
    }
    }

    //Prevent Access from rovers or direct browsing in snapshop directory, or when
    //requesting to download a file, should not go past this point.
    exit;
    }
    ?>

    <?php if (false) : ?>
    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
    <title>Error: PHP is not running</title>
    </head>
    <body>
    <h2>Error: PHP is not running</h2>
    <p>Duplicator requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.</p>
    </body>
    </html>
    <?php endif; ?>

    <?php
    /* ==============================================================================================
    ADVANCED FEATURES – Allows admins to perform aditional logic on the import.

    $GLOBALS[‘TABLES_SKIP_COLS’]
    Add Known column names of tables you don’t want the search and replace logic to run on.

    $GLOBALS[‘REPLACE_LIST’]
    Add additional search and replace items to step 2 for the serialize engine.
    Place directly below $GLOBALS[‘REPLACE_LIST’] variable below your items
    EXAMPLE:
    array_push($GLOBALS[‘REPLACE_LIST’], array(‘search’ => ‘https://oldurl/&#8217;, ‘replace’ => ‘https://newurl/&#8217;));
    array_push($GLOBALS[‘REPLACE_LIST’], array(‘search’ => ‘ftps://oldurl/&#8217;, ‘replace’ => ‘ftps://newurl/&#8217;));
    ================================================================================================= */

    $GLOBALS[‘FW_TABLEPREFIX’] = ‘wp_’;
    $GLOBALS[‘FW_URL_OLD’] = ‘http://demo3.ltheme.com/wordpress-one-page-themes/lt-app-showcase&#8217;;
    $GLOBALS[‘FW_URL_NEW’] = ‘//localhost/wordpress/’;
    $GLOBALS[‘FW_PACKAGE_NAME’] = ‘lt_app_showcase_onepage.zip’;
    $GLOBALS[‘FW_PACKAGE_NOTES’] = ”;
    $GLOBALS[‘FW_SECURE_NAME’] = ‘lt_app_showcase_onepage’;
    $GLOBALS[‘FW_DBHOST’] = ‘localhost’;
    $GLOBALS[‘FW_DBPORT’] = ‘3306’;
    $GLOBALS[‘FW_DBNAME’] = ‘admin’;
    $GLOBALS[‘FW_DBUSER’] = ‘admin’;
    $GLOBALS[‘FW_DBPASS’] = ‘xxxxxxx’;
    $GLOBALS[‘FW_SSL_ADMIN’] = 0;
    $GLOBALS[‘FW_SSL_LOGIN’] = 0;
    $GLOBALS[‘FW_CACHE_WP’] = 0;
    $GLOBALS[‘FW_CACHE_PATH’] = 0;
    $GLOBALS[‘FW_BLOGNAME’] = ”;
    $GLOBALS[‘FW_WPROOT’] = ‘//localhost/wordpress/’;
    $GLOBALS[‘FW_DUPLICATOR_VERSION’] = ‘1.1.4’;
    $GLOBALS[‘FW_OPTS_DELETE’] = json_decode(‘[“duplicator_ui_view_state”,”duplicator_package_active”,”duplicator_settings”]’, true);

    //DATABASE SETUP: all time in seconds
    $GLOBALS[‘DB_MAX_TIME’] = 5000;
    $GLOBALS[‘DB_MAX_PACKETS’] = 268435456;
    ini_set(‘mysql.connect_timeout’, ‘5000’);

    //PHP SETUP: all time in seconds
    ini_set(‘memory_limit’, ‘5000M’);
    ini_set(“max_execution_time”, ‘5000’);
    ini_set(“max_input_time”, ‘5000’);
    ini_set(‘default_socket_timeout’, ‘5000’);
    @set_time_limit(0);

    $GLOBALS[‘DBCHARSET_DEFAULT’] = ‘utf8’;
    $GLOBALS[‘DBCOLLATE_DEFAULT’] = ‘utf8_general_ci’;

    //UPDATE TABLE SETTINGS
    $GLOBALS[‘TABLES_SKIP_COLS’] = array(”);
    $GLOBALS[‘REPLACE_LIST’] = array();

    /* ================================================================================================
    END ADVANCED FEATURES: Do not edit below here.
    =================================================================================================== */

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error: PHP is not running’ is closed to new replies.