PHPList Cron无法运行,而是打开了cron文件

问题描述 投票:0回答:1

我已安装在vps中:VersiónPHP 7.2.2PhpList 3.4.5Plesk玛瑙版本17.8.11更新#66

我总是以管理员身份执行cron任务。在以前的版本中,它工作得很好。但是在此版本中,我有一个问题,即cron无法执行,而是打开了文件。

该服务器与其他cron配合良好。仅与此版本的phplist不起作用,而是打开phplist文件。如何纠正?

Run scheduled task
Task "/usr/bin/php -q /var/www/vhosts/mydomain.com/httpdocs/admin/index.php -p processqueue -c /var/www/vhosts/mydomain.com/httpdocs/config/config.php" completed with error in 0 seconds, output:

phpList - phpList version 3.4.5 (c) 2000-2019 phpList Ltd, https://www.phplist.com
<title>phpList :: phpList :: Enviar la cola</title></head>
<body class="invisible processqueue">
<div id="dialog"></div><div id="hiddendiv"></div>

<div class="container-fluid">

<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">

<div id="languageswitcher">
<form name="languageswitchform" method="post" action="">
<select name="setlanguage" onchange="document.languageswitchform.submit()">
<option value="ar" >العربية</option>
<option value="bg" >Bulgarian</option>
<option value="ca" >Català</option>
<option value="cs" >Česky</option>
<option value="da" >danske</option>
<option value="de" >Deutsch</option>
<option value="el" >ελληνικά</option>
<option value="en" >english</option>
<option value="es" selected="selected">español</option>
<option value="es_AR" >Español (Argentina)</option>
<option value="fa" >فارسی</option>
<option value="fi" >suomi</option>
<option value="fr" >française</option>
<option value="gl" >Galician</option>
<option value="he" >עברית</option>
<option value="hr" >Croatian</option>
<option value="hu" >magyar</option>
<option value="is" >Icelandic</option>
<option value="it" >italiano</option>
<option value="ja" >日本語</option>
<option value="lt" >Lithuanian</option>
<option value="lv" >Latvian</option>
<option value="nb" >Norwegian</option>
<option value="nl" >Nederlands</option>
<option value="nl_BE" >Vlaams</option>
<option value="pl" >polski</option>
<option value="pt" >Portuguese</option>
<option value="pt_BR" >Portuguès (Brazil)</option>
<option value="ro" >Romanian</option>
<option value="ru" >русский</option>
<option value="sk" >Slovak</option>
<option value="sl" >Slovenian</option>
<option value="sq" >Albanian</option>
<option value="sr" >Srpski</option>
<option value="sv" >svenska</option>
<option value="tr" >Turkish</option>
<option value="vi" >Việt</option>
<option value="zh_CN" >简体中文</option>
<option value="zh_TW" >Traditional Chinese</option>
</select>
</form>
</div> </div>

<div id="logged">
<a id="login" class="navbar-btn btn-primary btn-sm" href="./?page=home">conectarse</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>
<!-- content starts here -->
<h4 class="pagetitle">Enviar la cola</h4><div class="hidden"><a href="./?page=home&amp;tk=a503fa16f7b08a7d01be978eeb472297" title="Ir a la página principal">Página principal</a></div>
cron-task phplist
1个回答
0
投票

[3个月后,我认为您已经找到了答案,但是无论如何,因为我刚刚找到了答案。

我在plesk中运行phplist。

问题是php正在使用。在plesk中,当您从命令行使用php时,将获取最旧的php。我用/opt/plesk/php/7.4/bin/php替换了php,并且效果很好。

如果您还运行plesk,请尝试这篇文章:https://support.plesk.com/hc/en-us/articles/115003766853-How-to-specify-command-line-command-php-version-for-SSH-user-on-the-Plesk-server-

我的phplist脚本现在看起来像这样:

!/ bin / bash

/ opt / plesk / php / 7.4 / bin / php -q /var/www/vhosts/my-domain.com/news/admin/index.php -c /var/www/vhosts/my-domain.com /news/config/config.php $ *

使用./phplist -pprocessqueue(从命令行运行)

alex

© www.soinside.com 2019 - 2024. All rights reserved.