Jump to content

Wordpess Plugin - cron.php script needs password


edhkirk

Recommended Posts

The script below requires a password "code" in order to move forward.  I have the password, and it executes fine through an HTTP command with a query string.

 

I have to run this file from a unix command from another php file.  I am getting errors when I try to use a session variable to pass the code.  For example:  $_SESSION['code'] = 'f988040a';

 

Is there any way to get the password "code" to this file?

 

 

 

 

 

<?php

 

require_once(dirname(__FILE__) . '/../../../wp-config.php');

                                   

nocache_headers();

 

// if uninstalled, let's not do anything

if(! get_option('wpo_version'))

  return false;

 

// check password

if(isset($_REQUEST['code']) && $_REQUEST['code'] == get_option('wpo_croncode'))

{

require_once( dirname(__FILE__) . '/wpomatic.php' );

 

$wpomatic->runCron();

} else                                                                         

    $wpomatic->log('Warning! cron.php was called with the wrong password or without one!');

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.