CronJobs und savemode
Verfasst: Fr 7. Dez 2007, 12:40
Steuere ich die Cronjobs auf einem Server mit PHP5 und safemode ON direkt per crontab und lynx kommte folgende Fehlermeldung:
Orig. Version in Contenido 4.6.15
Geänderte Version
Getestet in Version 4.6.15.
Serverumgebung:
Gruß aus Franken
Ortwin
Abhilfe schafft folgende Ergänzung in den cronfiles in contenido/cronjobs, hier Beispielhaft an der contenido/cronjobs/move_articles.php gezeigt.Warning: file_exists(): open_basedir restriction in effect. File(/LC_MESSAGES/contenido.po) is not within the allowed path(s): (/srv/www/webxxx/html/:/srv/www/webxxx/phptmp/:/srv/www/webxxx/files/:/srv/www/webxxx/atd/) in /srv/www/webxxx/html/contenido/includes/functions.i18n.php on line 98 Warning: file_exists(): open_basedir
Orig. Version in Contenido 4.6.15
Code: Alles auswählen
<?php
/*****************************************
* File : $RCSfile: move_articles.php,v $
* Project : Contenido
* Descr : Cron Job to implement the move article feature
*
* Author : Timo A. Hummel
*
* Created : 26.05.2003
* Modified : $Date: 2006/04/28 09:20:55 $
*
* © four for business AG, www.4fb.de
*
* $Id: move_articles.php,v 1.10 2006/04/28 09:20:55 timo.hummel Exp $
******************************************/
include_once ('../includes/startup.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.user.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.xml.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.navigation.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.template.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.backend.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.table.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.notification.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.area.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.layout.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.client.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.cat.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.treeitem.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'cfg_sql.inc.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'cfg_language_de.inc.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'functions.general.php');
include_once ('../includes/functions.con.php');
if ($_SERVER["PHP_SELF"] == "" || function_exists("runJob"))
{
$db = new DB_Contenido;
conFlagOnOffline();
conMoveArticles();
}
?>
Code: Alles auswählen
<?php
/*****************************************
* File : $RCSfile: move_articles.php,v $
* Project : Contenido
* Descr : Cron Job to implement the move article feature
*
* Author : Timo A. Hummel
*
* Created : 26.05.2003
* Modified : $Date: 2006/04/28 09:20:55 $
*
* © four for business AG, www.4fb.de
*
* $Id: move_articles.php,v 1.10 2006/04/28 09:20:55 timo.hummel Exp $
******************************************/
include_once ('../includes/startup.php');
// safemode bug by oldperl, see forum http://contenido.org/forum
page_open(array('sess' => 'Contenido_Session'));
i18nInit($cfg["path"]["contenido"].$cfg["path"]["locale"], $belang);
page_close();
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.user.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.xml.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.navigation.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.template.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.backend.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.table.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.notification.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.area.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.layout.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.client.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.cat.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.treeitem.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'cfg_sql.inc.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'cfg_language_de.inc.php');
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'functions.general.php');
include_once ('../includes/functions.con.php');
if ($_SERVER["PHP_SELF"] == "" || function_exists("runJob"))
{
$db = new DB_Contenido;
conFlagOnOffline();
conMoveArticles();
}
?>
Serverumgebung:
- Apache2
- PHP5.2.4
- SafeMode ON
Gruß aus Franken
Ortwin