Jump to content

Script stops running.


ballhogjoni

Recommended Posts

Sure thing...

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://".$_POST['domain']."/wp-admin/install.php?step=2&sitename=".urlencode($_POST['sitename'])
        ."&adminuser=".urlencode($_POST['adminuser'])."&adminemail=".urlencode($_POST['adminemail'])."&INST_password=".urlencode($_POST['INST_password'])
        ."&anchor_one=".urlencode($_POST['anchor_one'])."&anchor_two=".urlencode($_POST['anchor_two'])
        ."&anchor_three=".urlencode($_POST['anchor_three'])."&akismet=".urlencode($_POST['akismet'])
        ."&theme=".urlencode($_POST['theme']));
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);

$resp = curl_exec($ch);

 

This calls the second script which is over 1200 lines of code. Don't know if you need to see that or not. Here is the code when the scripts stops running.

$plugins = array(
          array("google-sitemap-generator","google-sitemap-generator/sitemap.php"),
          array("xml-sitemaps-for-videos","xml-sitemaps-for-videos/video-sitemap.php"),
          array("si-captcha-for-wordpress","si-captcha-for-wordpress/si-captcha.php"),
          array("ps-auto-sitemap","ps-auto-sitemap/ps_auto_sitemap.php"),
          array("wp-super-cache","wp-super-cache/wp-cache.php"),
          array("no-self-ping","no-self-ping/no-self-pings.php"),
          array("login-lockdown","login-lockdown/loginlockdown.php"),
          array("kb-robotstxt","kb-robotstxt/kb-robots-txt.php"),
          array("all-in-one-seo-pack","all-in-one-seo-pack/all_in_one_seo_pack.php"),
          array("searchterms-tagging-2","searchterms-tagging-2/searchterms-tagging2.php"),
          array("seo-automatic-links","seo-automatic-links/seo-links.php"),
          array("si-contact-form","si-contact-form/si-contact-form.php"),
          array("simple-tags","simple-tags/simple-tags.php"),
          array("wp-minify","wp-minify/wp-minify.php"),
          array("jetpack","jetpack/jetpack.php"),
          array("wordpress-google-seo-positioner","wordpress-google-seo-positioner/position_yourself.php"),
          array("akismet","akismet/akismet.php"),
          array("redirection","redirection/redirection.php"),
          array("wp-missed-schedule","wp-missed-schedule/wp-missed-schedule.php"),
          array("better-blogroll","better-blogroll/better_blogroll.php")
  );

  include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
  include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; //for plugins_api..
  foreach($plugins as $plugin) {
    $api = plugins_api('plugin_information', array('slug' => $plugin[0], 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth.

    if ( is_wp_error($api) )
      wp_die($api);

    $title = __('Plugin Install');
    $parent_file = 'plugins.php';
    $submenu_file = 'plugin-install.php';

    $title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version );
    $nonce = 'install-plugin_' . $plugin;
    $url = 'update.php?action=install-plugin&plugin=' . $plugin[0];
    if ( isset($_GET['from']) )
      $url .= '&from=' . urlencode(stripslashes($_GET['from']));

    $type = 'web'; //Install plugin type, From Web or an Upload.

    $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
    $upgrader->install($api->download_link);
  }

 

this loop gets all the way to the akismet array and then stops. This code is lines 423-468.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.