Command line fails silently on windows

I have been trying to get command line working on windows. I run phpList locally to reduce security issues and processing overhead on my site (yes I have a working unsubscribe function I process externally).

After fiddling with the one or two post suggestions dealing with this issue, I am currently trying:

php  -d display_errors=on ./admin/index.php -c../config/config.php

from the lists directory. I am expecting to get a list of -p commands I can run. Instead it just exits with no errors. If I run this with a -psystemstats or similar, the same thing happens.

php -v:

PHP 5.6.3 (cli) (built: Nov 12 2014 17:18:08)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies

This doesn’t look correct. In which directory are you running this command?
./admin and ../config appear to be inconsistent.

It’s consistent. I’m in /lists. index.php is in /lists/admin. It gets passed the parameter ../config/config.php. It failed with “config not found” until I parsed this out. Now it fails silently.

@seth Windows might work differently to Linux but the equivalent command would be

admin/index.php -c config/config.php -p xxxx

But I use absolute file paths rather than relative, so I suggest you try that.

Thanks for the tips. That is not the issue. I can put $foo = “bar”; into config.php and echo $foo from index.php.

By flailing gracefully, I noticed that inserting echo $GLOBALS['commandline']; before

include_once dirname(__FILE__).'/lib.php'; on approx line 104 of admin/index.php returns 1, while inserting directly after this line returns nothing. For some reason that global is being unset in lib.php, and the rest of the CL script then fails. I could not easily discern where this was occurring there…

Edit:

Digging deeper. lib.php calls class.phplistmailer.php. In beginning of that file, if I change:

if (defined('PHPMAILER_PATH') and PHPMAILER_PATH != '') {
    //require_once '/usr/share/php/libphp-phpmailer/class.phpmailer.php'
    require_once PHPMAILER_PATH;
} 

to

if (defined('PHPMAILER_PATH') and PHPMAILER_PATH != '') {
    //require_once '/usr/share/php/libphp-phpmailer/class.phpmailer.php'
    //require_once PHPMAILER_PATH;
	require_once dirname(__FILE__).'/PHPMailer/PHPMailerAutoload.php';
} 

it seems to work (no major testing yet). This is odd since I am definitely sending emails from this instance of phplist (yes I have more than one) from the web interface.

Edit: With more testing this appeared to resolve the issue.I never figured out why.