Question about cURL and remote processing in 3.0.12

Questions & Problems about Installing or Upgrading with Version 3 phpList.
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation.

Question about cURL and remote processing in 3.0.12

Postby kerberos » 7:36pm, Fri 13 Feb, 2015

Our queue has been run via cron-called PHP script that does some business before processing the queue via cURL executing the following:

Code: Select all
http://www.domain.org/lists/admin/index.php?page=pageaction&action=processqueue&login=[ ]&password=[ ];

(where the login and password were obtained earlier from a hidden file).

Since upgrading from 3.0.10 to 3.0.12, it doesn't work.

Do I simply need to change the cURL process to the following?

Code: Select all
http://www.domain.org/lists/admin/index.php?page=pageaction&action=processqueue&secret=[ ];
kerberos
PL Geek
 
Posts: 67
Joined: 9:54pm, Tue 12 Sep, 2006

Re: Question about cURL and remote processing in 3.0.12

Postby kerberos » 4:17pm, Mon 16 Feb, 2015

That didn't work. Suggestions, please?
kerberos
PL Geek
 
Posts: 67
Joined: 9:54pm, Tue 12 Sep, 2006

Re: Question about cURL and remote processing in 3.0.12

Postby danwaterloo » 12:37pm, Tue 17 Feb, 2015

Hi,

The command should look like this:
http(s)://yoursite.com/lists/admin/?page=processqueue&secret=XXXX

Here's what works on my machine to process the queue on another machine:

Code: Select all
curl 'http://yourphplistdomain.com/lists/admin/?page=processqueue&secret=yoursecret'


Please note the ' (single quote character) at the beginning and end of the http command. If you don't have the quote(s), curl appears to truncate the command at the '?' character.

Let us know if this works for you.

Dan
danwaterloo
PL Master
 
Posts: 276
Joined: 3:51am, Wed 30 Oct, 2013
Location: http://www.phplistsupport.com

Re: Question about cURL and remote processing in 3.0.12

Postby kerberos » 3:14pm, Tue 17 Feb, 2015

That worked! A thousand thanks.
kerberos
PL Geek
 
Posts: 67
Joined: 9:54pm, Tue 12 Sep, 2006

Re: Question about cURL and remote processing in 3.0.12

Postby dgl » 1:07pm, Mon 16 Mar, 2015

can any help me out on the cron page=processqueue&secret=XXXX using the following code :cry:
I try this it does not work 01:

<?php
function process_queue() {
//variables
$url = "http://domainname.com/lists/admin/?page=processqueue&secret=hereTheCode";

//open connection
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
$result = curl_exec($ch);

//clean up
curl_close($ch);

return $result;
}
$result = process_queue();

///////

?>

I get this error in the email:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
emailname@emailaddres.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>

Thank You in Advance for the correct Code.
dgl
phpList newbie
 
Posts: 1
Joined: 1:00pm, Mon 16 Mar, 2015


Return to Installing and Upgrading

Who is online

Users browsing this forum: No registered users and 1 guest

cron