ThWboard Support-Forum (Archiv)

Ort: / Boardübersicht / PHP / MySQL Probleme / Cronjob geht nicht


Seite 1 von 1

PhoenixDH schrieb am 27.07.2005 um 15:08 Uhr

Wie muss ich meine Datei abändern, damit der Cronjob läuft ?

Der Aufruf des Cronjobs in Confixx erfolgt so:

php /var/www/web34/html/tuning/Forum/inc/board_image.php

Der Quellcode:

<?

include "http://www.tuning-freaks-pfalz.de/Forum/inc/config.inc.php";
include "http://www.tuning-freaks-pfalz.de/Forum/inc/functions.inc.php";
include "http://www.tuning-freaks-pfalz.de/Forum/inc/thwbcode.inc.php";

$mysql = mysql_connect($mysql_h, $mysql_u, $mysql_p);
$db = mysql_select_db($mysql_db);

$r_user = mysql_query("SELECT count(userid) AS usercount FROM ".$pref."user");
$user = mysql_result($r_user, 0);

$r_post = mysql_query("SELECT count(postid) AS postcount FROM ".$pref."post");
$post = mysql_result($r_post, 0);

$r_thread = mysql_query("SELECT count(threadid) AS threadcount FROM ".$pref."thread");
$thread = mysql_result($r_thread, 0);

$r_fights =  mysql_query("SELECT fightswon FROM ".$pref."gallery_photos WHERE fightswon>0");
$fights =0;
while($a_fights = mysql_fetch_array($r_fights))
{
   $fights = $a_fights[0] + $fights;
}

$r_bilder =  mysql_query("SELECT COUNT(photo_id) FROM ".$pref."gallery_photos GROUP BY photo_id");
$bilder = mysql_num_rows( $r_bilder );

$image = "./board_image.png";
$image_end = "../../Nav/board_image.png";
$im = imagecreatefrompng($image);
$tc  = ImageColorAllocate ($im, 0, 0, 0);
ImageString($im, 3, 145, 2, "Statistik von www.tuning-freaks-pfalz.de", $tc);
ImageString($im, 2, 145, 15, "Mitglieder: $user", $tc);
ImageString($im, 2, 145, 25, "Gepostet: $post Beiträge in $thread Themen", $tc);
ImageString($im, 2, 145, 35, "Bilder in der Galerie: $bilder", $tc);
ImageString($im, 2, 145, 45, "Carfights: $fights", $tc);
header("Content-Type: image/png");
Imagepng($im,'',100);
Imagepng($im,$image_end);
ImageDestroy ($im);

?>

Kann mir jemand weiterhelfen ?

Welche Rechte braucht das Script ? 644 ?

Seite 1 von 1