eM^ Posted October 31, 2006 Report Share Posted October 31, 2006 Problema tāda: agraak lietoju fsockopen() lai parbauditu vai serveris online vai off, bet tagat es taisot jaunu majaslapu taisu un pie fsockopen izmantoshanas uzmet tizlu error. itkaa jau logisks errors, bet tads veel nekad nebija bijis! taatad kods: $connect = fsockopen("87.110.173.128",27016,$errno,$errstr,30); if($connect) { include ("query.php"); } else { echo("Server Offline!"); } un errors shads: Warning: fsockopen(): unable to connect to 87.110.173.128:27016 in c:\mikus\appserv\www\index.php on line 105 nezinu kas pa vainu, bet man shito vajag novaakt, jo weblapaa ipashi skaisti jau neizskataas... varbuut pie vainas ir kkas ieksh php.ini? Link to comment Share on other sites More sharing options...
Roze Posted October 31, 2006 Report Share Posted October 31, 2006 $connect = @fsockopen("87.110.173.128",27016,$errno,$errstr,30); proti ar '@' var likt funkcijai noklusēt paziņojumus.. Link to comment Share on other sites More sharing options...
blackhalt Posted October 31, 2006 Report Share Posted October 31, 2006 (edited) Ports ir ritīgs? Nezinu kas tas par 27016 Counter Strike portu, bet tur ir vaļā 80 ports. Ā, skaidrs :) http://lv.php.net/manual/en/function.error-reporting.php Edited October 31, 2006 by blackhalt Link to comment Share on other sites More sharing options...
GedroX Posted November 1, 2006 Report Share Posted November 1, 2006 Publicētā lapā jāliek error_reporting(0); Link to comment Share on other sites More sharing options...
Delfins Posted November 1, 2006 Report Share Posted November 1, 2006 Nē, flags `display_erorrs = OFF` PS: tikpat labi apakšā var būt error handlers ar loggeri. Link to comment Share on other sites More sharing options...
eM^ Posted November 1, 2006 Author Report Share Posted November 1, 2006 (edited) joprojaam nesaprotu kas pa vainu. Kaapeec man taa agraak nebija, kad liku ar fsockopen parbaudiit vai serveris onlien vai offline un viss bija kaa pa sviestu, bet tagat uzliekot to error_reporting man taapat lapa kaadas 5sek laadeejaas... un vispaar jau es shito taisiju tikai viena skripta deel jo vinjam ja ir offline vinsh piekasaas par: Warning: fread(): Length parameter must be greater than 0. in c:\appserv\www\czarquery.php on line 319 un varbuut pashaa skriptaa varat paliidzeet? nav manis taisiits, bet zinu kur tieshi probleema. SKRIPTS TE Edited November 1, 2006 by eM^ Link to comment Share on other sites More sharing options...
Delfins Posted November 1, 2006 Report Share Posted November 1, 2006 Nu līks kods.. Tas ka ilgi lādējās ir OK, jo pie offline jau notiks timeout gaidīšana... Error reportingu moš ka tev vispār nav iespējams iesetot no skripta... ierobežojums Kā variants ir - batch job, kas backgroundā updeito infu un ieraksta txt failā... Jo šitādas lietas tā parasti nedara - katram visitoam taisa konekciju uz kaut kurieni savākt status (game stats) Link to comment Share on other sites More sharing options...
eM^ Posted November 1, 2006 Author Report Share Posted November 1, 2006 nu laikam vien jaizmanto error_reporting iespejas un vnk janonjem errori un miers. nekas ka ilgak ladejas, vnk jacenshas tas serveris turet online pec iespejas biezaak... Pladies palidzetajiem. Link to comment Share on other sites More sharing options...
andrisp Posted November 1, 2006 Report Share Posted November 1, 2006 Varbūt mazāka timeout laika norādīšana līdzēs ? Link to comment Share on other sites More sharing options...
eM^ Posted November 1, 2006 Author Report Share Posted November 1, 2006 nee nevajadzees, es izdomaju savadak, bez fsockopen, bet tur tapat errorus vajadzeja novaakt... Link to comment Share on other sites More sharing options...
Recommended Posts