Command line or cron does not processqueue, displays html code

I cannot get a cron to process the queue. I have the following software and MANUALLY_PROCESS_QUEUE’, 0 in my config file.

I see a display of html code after running: /usr/bin/php /home/mysite/public_html/phplist/admin/index.php -pprocessqueue -c /home/mysite/public_html/phplist/config/config.php $*

Any thoughts?

phpList version 3.4.7
PHP 5.4.16 (cli)
Centos 7

config.php
define(‘MANUALLY_PROCESS_QUEUE’, 0);

[root@host ~]# /usr/bin/php /home/mysite/public_html/phplist/admin/index.php -pprocessqueue -c /home/mysite/public_html/phplist/config/config.php $*

phpList - phpList version 3.4.7 © 2000-2019 phpList Ltd, https://www.phplist.com

phpList :: phpList :: Send the queue
    <div id="container">

                    <nav id="navigation" class="navbar navbar-inverse  navbar-fixed-top col-lg-2 col-md-3">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse_" data-target="#menuTop" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="./" class="navbar-brand"><img src="ui/phplist-ui-bootlist/logo.svg" alt="phpList, email newsletter manager, logo" title="phpList, the world's most popular Open Source newsletter manager" /></a>
                    </nav>
            <div id="sidebar" class="sidebar col-lg-2 col-md-3">
                                        <div id="context-menu" class="menu block">
                                        </div>
                <div id="recent" class="menu visited block">
                                        </div> 
                <div class="col-sm-12 sidebar-footer">
                        <div id="language">
العربية Bulgarian Català Česky danske Deutsch ελληνικά english español Español (Argentina) فارسی suomi française Galician עברית Croatian magyar Icelandic italiano 日本語 Lithuanian Latvian Norwegian Nederlands Vlaams polski Portuguese Portuguès (Brazil) Romanian русский Slovak Slovenian Albanian Srpski svenska Turkish Việt 简体中文 Traditional Chinese
                        <div id="logged">
                            <a id="login" class="navbar-btn btn-primary btn-sm" href="./?page=home">login</a>                       </div>
                            </div>
            </div>    <!-- end #sidebar -->

        <div class="col-lg-10 col-md-9 col-lg-offset-2 col-md-offset-3" id="content" tabindex=-1>
                <div id="globalhelp">
                                </div>
                <div id="wrapp">
                        <div id="progressbar"></div>

Send the queue

Dashboard
[root@host ~]#

@gscerb You might be running the wrong version of php. You raised the same problem a few months ago 3.4.5 cron processqueue failure did you try the suggestions in the response?

Possibly phplist has a fatal error causing some irrelevant output. Look at the php or web server logs.

I did try the suggestion with no luck. I have the same problem on two different installations on two different servers.

@gscerb I guess that phplist is failing. You will need to look at the web server log and php error log to try to find the cause.

Also, can you reformat the phplist output in your original post so that all of it is displayed as preformatted text using the </> button.

A possible cause is not having a default time zone set. Run this command from a command prompt:

php -r 'echo date_default_timezone_get();'

If the timezone is not being set automatically then try adding this to the end of config.php

date_default_timezone_set('America/Los_Angeles');

see https://www.php.net/manual/en/timezones.php for the supported timezones.

I was running phplist 3.4.7 with PHP 5.4.16 (cli)

I now understand the this version of phplist requires PHP 7.

So I changed my command from the PHP 5 location “/usr/bin/php” to my PHP 7 location “/opt/rh/rh-php72/root/usr/bin/php”

Now the command is properly executed.

Thanks for steering me in the right direction.