ja ich führe bei mir um das ganze zu starten eine sh datei aus die dann sämtliche crons einrichtet sozusagen
install_cron.sh
#!/bin/bash
echo "Wie Lautet der Zielpfad (Ohne '/' am Ende!):"
read cpath
echo "0 4,10,16,22 * * * php $cpath/reload_stat.php
0 0 * * * $cpath/bak/bak.sh
* * * * * php $cpath/shell2.php
0 * * * * php $cpath/globalcron.php" > $cpath/cron.txt
crontab -u root $cpath/cron.txt
#rm $cpath/cron.txt
shell2.php
|
PHP Quellcode
|
1
2
3
4
5
6
7
8
9
10
|
<?
$shell = shell_exec("ps aux | grep ehshell");
echo "<pre>".$shell."</pre>";
$pos = strpos($shell, "/var/www/vhosts/meinedomain.de/subdomains/srv1/httpdocs/ehshell.php");
if ($pos === false) {
echo "false";
shell_exec("php /var/www/vhosts/meinedomain.de/subdomains/srv1/httpdocs/ehshell.php & disown");
}
?>
|
ehshell.php
|
PHP Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<?
while(1)
{
$shell = shell_exec('ps aux | grep nohup');
//echo "<pre>".$shell."</pre>";
$pos = strpos($shell, "/var/www/vhosts/meinedomain.de/subdomains/srv1/httpdocs/nohup.php");
if ($pos === false) {
echo "false";
shell_exec("php /var/www/vhosts/meinedomain.de/subdomains/srv1/httpdocs/nohup.php & disown");
}
sleep(2);
}
?>
|
und in der nohup.php taucht ja auch der fehler auf in zeile 15
Hier mal zeile 13 bis 19
|
PHP Quellcode
|
1
2
3
4
5
6
7
|
while($row = mysql_fetch_array($res))
{
$pid = pcntl_fork();
if($pid == -1)
echo "PCNTL_FROK IST NICHT DA";
else if($pid)
{
|
Wie kann ich das den behbenen den Fehler der mein Webserver ausspuckt.... wenn ich das in Plesk auf cgi stelle geht das dennoch nicht
Gruß
Dragon
EDIT: habs lösen können bin nach der Anleitung vor gegangen und nun läuft es
http://ubuntuforums.org/showthread.php?t=549953
Danke Benny.... hate deinen Beitrag völlig übersehn