SELFPHP: Version 5.8.2 Befehlsreferenz - Tutorial – Kochbuch – Forum für PHP Einsteiger und professionelle Entwickler

SELFPHP


Professional CronJob-Service

Suche



CronJob-Service    
bei SELFPHP mit ...



 + minütlichen Aufrufen
 + eigenem Crontab Eintrag
 + unbegrenzten CronJobs
 + Statistiken
 + Beispielaufrufen
 + Control-Bereich

Führen Sie mit den CronJobs von SELFPHP zeitgesteuert Programme auf Ihrem Server aus. Weitere Infos



:: Buchempfehlung ::

Handbuch der Java-Programmierung

Handbuch der Java-Programmierung zur Buchempfehlung
 

:: Anbieterverzeichnis ::

Globale Branchen

Informieren Sie sich über ausgewählte Unternehmen im Anbieterverzeichnis von SELFPHP  

 

:: Newsletter ::

Abonnieren Sie hier den kostenlosen SELFPHP Newsletter!

Vorname: 
Name:
E-Mail:
 
 

Zurück   PHP Forum > SELFPHP > PHP Grundlagen

PHP Grundlagen Hier kann über grundlegende Probleme oder Anfängerschwierigkeiten diskutiert werden

Antwort
 
Themen-Optionen Ansicht
  #1  
Alt 09.11.2007, 09:47:00
ossi242 ossi242 ist offline
Anfänger
 
Registriert seit: Nov 2007
Beiträge: 5
Fehlermeldung nach genau 672 zugriffen????

Hallo zusammen!

Nachdem mir hier vor zwei Tagen schon so super geholfen wurde, will ich es mal etwas schwieriger machen! :-)

Hier erstmal mein PHP script:
Code:
<?php




error_reporting(E_ALL);




$dl=0;
$k=0;



init();


function init()
{



global $k;


if ($k==10)
{
$k=0;


$datei1 = fopen("start_stop.txt", "r");
$read=fread($datei1,10);
fclose($datei1);

if ($read=="stop")
{
exit();
}

usleep(20000);


}

$k++;

read();
}











function read()
{
         global $dl;


	$curl = curl_init();
    	curl_setopt ($curl, CURLOPT_URL, "http://xxx.xxx.xxx.xxx:8088/client/wert_akt.html");

         //curl_setopt ($curl, CURLOPT_URL, "http://xxx.xxx.xxx.xxx:8080/test.html");
         curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

    	$result = curl_exec ($curl);
    	curl_close ($curl);

         //$test=fopen("wert_akt.html","r");
         //$result=fread($test,500);
         //fclose($test);



      	usleep(20000);


         $datei = fopen("test.txt", "a");

         $dl++;


	$x=0;

	if(preg_match_all("!\<td\>(.*?)\</td\>!",$result,$table,PREG_SET_ORDER))
	{


		for ( $i = 0; $i < count($table); $i++ )
		{
  			$ta=$table[$i][1];
  			$ausgabe=$ta."\t";
  			fwrite($datei,$ausgabe);

  			$x++;

  			if ($x==4)
  			{

   				$ausgabe=$dl."\n";
   				fwrite($datei,$ausgabe);
   				$x=0;
  			}

		}
	}


	fclose($datei);


         	usleep(20000);



	init();

}




?>
Im Groben geht es darum das ich das Script über einen Web browser anstoße indem ich es aufrufe, und in eine Text datei "start" schreibe, das script überprüft regelmäßig ob ich das script über den Webbrowser angehalten habe in diesem fall schreibe ich über den Browser Stop in die .txt! Das script soll erstmal endlos auf dem server laufen, bis ich es stoppe, ohne das der Client mit ihm Verbunden ist! Später soll es sich nach einer gewissen Zeit (24 std) selber beenden und wieder starten, aber darum geht es momentan nicht! Es geht also um eine Zyklische Aufzeichnung von Daten die in der wert_akt.html hinterlegt sind und sich bei jedem aufruf(fopen) aktualisieren! Diese Daten schreibe ich fortlaufend in die test.txt.das funktioniert so weit ganz gut!

Nun zum Problem:

Das script meldet nach genau 672 Zugriffen (speicher ich als laufvariable $dl ind der test.txt) auf die test.txt bzw. nach 672 Curl aufrufen den windows fehler:

httpd.exe hat einen Fehler verursacht und wird geschlossen!

Diese Fehlermeldung ist zeitlich total unabhängig, da ich das script mit unterschiedlichen usleep() und sleep() verzögerung verlangsamt und beschleunigt (100ms bis 2s) habe aber es immer nach genau 672 Zugriffen abbricht! Auch die max.execution Time des scriptes ist so hoch, das sie nicht abläuft!

Die Httpd.exe ist mein Apache Server auf dem das PHP Script läuft, aber ich habe keinen Plan wo das problem liegen könnte!

Hat irgend jemand eine Idee wo das Problem liegt?????

Vielen Dank schonmal!

Gruß
Mit Zitat antworten
  #2  
Alt 09.11.2007, 10:53:54
ossi242 ossi242 ist offline
Anfänger
 
Registriert seit: Nov 2007
Beiträge: 5
AW: Fehlermeldung nach genau 672 zugriffen????

Ich nochmal! Falls es weiterhilft, hier nochmal der error Log des Apache:

Code:
Fri Nov 09 08:17:55 2007] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Fri Nov 09 08:17:55 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 08:17:55 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 08:17:55 2007] [notice] Parent: Created child process 1256
[Fri Nov 09 08:17:55 2007] [notice] Child 1256: Child process is running
[Fri Nov 09 08:17:55 2007] [notice] Child 1256: Acquired the start mutex.
[Fri Nov 09 08:17:55 2007] [notice] Child 1256: Starting 250 worker threads.
[Fri Nov 09 08:17:55 2007] [notice] Child 1256: Starting thread to listen on port 8080.
[Fri Nov 09 08:20:28 2007] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Fri Nov 09 08:20:28 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 08:20:28 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 08:20:28 2007] [notice] Parent: Created child process 860
[Fri Nov 09 08:20:28 2007] [notice] Child 860: Child process is running
[Fri Nov 09 08:20:28 2007] [notice] Child 860: Acquired the start mutex.
[Fri Nov 09 08:20:28 2007] [notice] Child 860: Starting 250 worker threads.
[Fri Nov 09 08:20:28 2007] [notice] Child 860: Starting thread to listen on port 8080.
[Fri Nov 09 08:21:20 2007] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Fri Nov 09 08:21:20 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 08:21:20 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 08:21:20 2007] [notice] Parent: Created child process 684
[Fri Nov 09 08:21:21 2007] [notice] Child 684: Child process is running
[Fri Nov 09 08:21:21 2007] [notice] Child 684: Acquired the start mutex.
[Fri Nov 09 08:21:21 2007] [notice] Child 684: Starting 250 worker threads.
[Fri Nov 09 08:21:21 2007] [notice] Child 684: Starting thread to listen on port 8080.
[Fri Nov 09 08:22:18 2007] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Fri Nov 09 08:22:18 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 08:22:18 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 08:22:18 2007] [notice] Parent: Created child process 2832
[Fri Nov 09 08:22:18 2007] [notice] Child 2832: Child process is running
[Fri Nov 09 08:22:18 2007] [notice] Child 2832: Acquired the start mutex.
[Fri Nov 09 08:22:18 2007] [notice] Child 2832: Starting 250 worker threads.
[Fri Nov 09 08:22:18 2007] [notice] Child 2832: Starting thread to listen on port 8080.
[Fri Nov 09 08:50:01 2007] [notice] Parent: Received restart signal -- Restarting the server.
[Fri Nov 09 08:50:01 2007] [notice] Child 2832: Exit event signaled. Child process is ending.
[Fri Nov 09 08:50:01 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 08:50:01 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 08:50:01 2007] [notice] Parent: Created child process 2404
[Fri Nov 09 08:50:01 2007] [notice] Child 2404: Child process is running
[Fri Nov 09 08:50:02 2007] [notice] Child 2832: Released the start mutex
[Fri Nov 09 08:50:02 2007] [notice] Child 2404: Acquired the start mutex.
[Fri Nov 09 08:50:02 2007] [notice] Child 2404: Starting 250 worker threads.
[Fri Nov 09 08:50:03 2007] [notice] Child 2832: Waiting for 250 worker threads to exit.
[Fri Nov 09 08:50:03 2007] [notice] Child 2832: All worker threads have exited.
[Fri Nov 09 08:50:03 2007] [notice] Child 2832: Child process is exiting
[Fri Nov 09 08:50:03 2007] [notice] Child 2404: Starting thread to listen on port 8080.
[Fri Nov 09 08:51:08 2007] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Fri Nov 09 08:51:08 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 08:51:08 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 08:51:08 2007] [notice] Parent: Created child process 1384
[Fri Nov 09 08:51:08 2007] [notice] Child 1384: Child process is running
[Fri Nov 09 08:51:08 2007] [notice] Child 1384: Acquired the start mutex.
[Fri Nov 09 08:51:08 2007] [notice] Child 1384: Starting 250 worker threads.
[Fri Nov 09 08:51:08 2007] [notice] Child 1384: Starting thread to listen on port 8080.
[Fri Nov 09 09:32:44 2007] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Fri Nov 09 09:32:44 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 09:32:44 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 09:32:44 2007] [notice] Parent: Created child process 3352
[Fri Nov 09 09:32:44 2007] [notice] Child 3352: Child process is running
[Fri Nov 09 09:32:44 2007] [notice] Child 3352: Acquired the start mutex.
[Fri Nov 09 09:32:44 2007] [notice] Child 3352: Starting 250 worker threads.
[Fri Nov 09 09:32:44 2007] [notice] Child 3352: Starting thread to listen on port 8080.
[Fri Nov 09 09:33:32 2007] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Fri Nov 09 09:33:33 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 09:33:33 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 09:33:33 2007] [notice] Parent: Created child process 2348
[Fri Nov 09 09:33:33 2007] [notice] Child 2348: Child process is running
[Fri Nov 09 09:33:33 2007] [notice] Child 2348: Acquired the start mutex.
[Fri Nov 09 09:33:33 2007] [notice] Child 2348: Starting 250 worker threads.
[Fri Nov 09 09:33:33 2007] [notice] Child 2348: Starting thread to listen on port 8080.
[Fri Nov 09 09:34:21 2007] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Fri Nov 09 09:34:21 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 09:34:21 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 09:34:21 2007] [notice] Parent: Created child process 1424
[Fri Nov 09 09:34:22 2007] [notice] Child 1424: Child process is running
[Fri Nov 09 09:34:22 2007] [notice] Child 1424: Acquired the start mutex.
[Fri Nov 09 09:34:22 2007] [notice] Child 1424: Starting 250 worker threads.
[Fri Nov 09 09:34:22 2007] [notice] Child 1424: Starting thread to listen on port 8080.
[Fri Nov 09 09:36:36 2007] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Fri Nov 09 09:36:36 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 09:36:36 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 09:36:36 2007] [notice] Parent: Created child process 3000
[Fri Nov 09 09:36:36 2007] [notice] Child 3000: Child process is running
[Fri Nov 09 09:36:36 2007] [notice] Child 3000: Acquired the start mutex.
[Fri Nov 09 09:36:36 2007] [notice] Child 3000: Starting 250 worker threads.
[Fri Nov 09 09:36:36 2007] [notice] Child 3000: Starting thread to listen on port 8080.
[Fri Nov 09 09:37:32 2007] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Fri Nov 09 09:37:32 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 09:37:32 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 09:37:32 2007] [notice] Parent: Created child process 2152
[Fri Nov 09 09:37:33 2007] [notice] Child 2152: Child process is running
[Fri Nov 09 09:37:33 2007] [notice] Child 2152: Acquired the start mutex.
[Fri Nov 09 09:37:33 2007] [notice] Child 2152: Starting 250 worker threads.
[Fri Nov 09 09:37:33 2007] [notice] Child 2152: Starting thread to listen on port 8080.
[Fri Nov 09 09:38:26 2007] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Fri Nov 09 09:38:26 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Fri Nov 09 09:38:26 2007] [notice] Server built: Sep  5 2007 08:58:56
[Fri Nov 09 09:38:26 2007] [notice] Parent: Created child process 1244
[Fri Nov 09 09:38:26 2007] [notice] Child 1244: Child process is running
[Fri Nov 09 09:38:26 2007] [notice] Child 1244: Acquired the start mutex.
[Fri Nov 09 09:38:26 2007] [notice] Child 1244: Starting 250 worker threads.
[Fri Nov 09 09:38:26 2007] [notice] Child 1244: Starting thread to listen on port 8080.
Hoffentlich hilft das um das Problem in den Griff zu bekommen!
Mit Zitat antworten
  #3  
Alt 27.11.2007, 10:20:32
ossi242 ossi242 ist offline
Anfänger
 
Registriert seit: Nov 2007
Beiträge: 5
AW: Fehlermeldung nach genau 672 zugriffen????

Hallo!

So, Problem gelöst! Nach längerem probieren habe ich das Problem gefunden!

Für alle die die es interessiert:

das Problem war, das windows wohl irgendwie ein Problem damit hatte das ich die Init() / read() Funktion ständig wieder aus sich selbst heraus aufgerufen hat! Ich habe diese Funktion durch eine do-while schleife ersetzt, seitdem habe ich kein Problem mehr mit abbrüchen während der Abarbeitung!

Gruß
Mit Zitat antworten
  #4  
Alt 27.11.2007, 12:06:49
defabricator defabricator ist offline
Senior Member
 
Registriert seit: Sep 2007
Ort: Potsdam
Alter: 55
Beiträge: 1.020
AW: Fehlermeldung nach genau 672 zugriffen????

Naja, prinzipiell kein Windows spezifisches Problem.
siehe http://en.wikipedia.org/wiki/Callstack
__________________
Wat der Bauer nich kennt, dit frisster nich.
Mit Zitat antworten
Antwort


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind aus.
[IMG] Code ist aus.
HTML-Code ist aus.

Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Fehlermeldung $end davinci PHP für Fortgeschrittene und Experten 1 25.11.2006 12:16:16
Seltsame Fehlermeldung... Thomapyrien PHP für Fortgeschrittene und Experten 3 25.05.2005 17:26:52
Fehlermeldung ausgeben, wenn keine Datensätze gefunden werden ... finkenmann PHP Grundlagen 3 14.08.2003 17:43:47
MS-SQL und eine severity14 - Fehlermeldung Salem PHP Grundlagen 1 27.12.2002 11:22:50
zulange zuweisung bei php ergibt eine fehlermeldung!!! antialles PHP für Fortgeschrittene und Experten 2 02.10.2002 23:45:36


Alle Zeitangaben in WEZ +2. Es ist jetzt 19:22:27 Uhr.


Powered by vBulletin® Version 3.8.3 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.


© 2001-2024 E-Mail SELFPHP OHG, info@selfphp.deImpressumKontakt