ViszinisA Posted April 20, 2006 Report Share Posted April 20, 2006 Fatal error: Maximum execution time of 30 seconds exceeded in c:\webserver\apache\htdocs\ideas\picres.php on line 49 Q1: kas tas ir? Q2: kur to var nomainiit? Q3: vai var nomainiit ka tieshi shai lapai limits ir lielaaks? Q4: varbuut mans kods suukaa? bet 15 bildes = 30 sec KODS SHEIT Q5: kas shodien jauns? {prikols} tas kods uzrakstiits lai arii buutu man info izstraades laikaa un tad nu shis iedod man kaut ko shaadu: in Trial Examens Latv val is file 100_0332.JPG with size 1728x2304 and new size will be 113x150 1. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0333.JPG with size 1728x2304 and new size will be 113x150 2. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0334.JPG with size 1728x2304 and new size will be 113x150 3. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0335.JPG with size 1728x2304 and new size will be 113x150 4. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0336.JPG with size 1728x2304 and new size will be 113x150 5. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0337.JPG with size 1728x2304 and new size will be 113x150 6. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0338.JPG with size 1728x2304 and new size will be 113x150 7. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0339.JPG with size 1728x2304 and new size will be 113x150 8. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0340.JPG with size 1728x2304 and new size will be 113x150 9. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0341.JPG with size 1728x2304 and new size will be 113x150 10. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0342.JPG with size 1728x2304 and new size will be 113x150 11. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0343.JPG with size 1728x2304 and new size will be 113x150 12. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0344.JPG with size 1728x2304 and new size will be 113x150 13. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0345.JPG with size 1728x2304 and new size will be 113x150 14. image loaded | small img saved | normal img saved | in Trial Examens Latv val is file 100_0346.JPG with size 1728x2304 and new size will be 113x150 15. image loaded | Fatal error: Maximum execution time of 30 seconds exceeded in c:\webserver\apache\htdocs\ideas\picres.php on line 49 beigaas FATAL ERROR :)))) Link to comment Share on other sites More sharing options...
GedroX Posted April 20, 2006 Report Share Posted April 20, 2006 (edited) Globāli to var nomainīt php.ini failā zem max_execution_time. Lokāli failā vari izmainīt ieliekot set_time_limit(sekundes) - tad tavs skripts drīkstēs vēl tik ilgi 'vilkties'. Ar katru nākamo f-jas izsaukumu iepriekšējais limits tiek novākts un darbojas jaunais, tādēļ droši var likt ciklā iekšā un ja cikls būs sanācis bezgalīgais, php darbosies mūžam. :D P.S. Es tavā vietā izmantotu funkciju imagecreatefromjpeg/ gif/ png nevis imagecopyresampled, kaut gan neesmu īsti pārliecināts, vai tā ir labāk. Edited April 20, 2006 by GedroX Link to comment Share on other sites More sharing options...
Roze Posted April 20, 2006 Report Share Posted April 20, 2006 A1: Skripta maksimālais izpildes laiks (jebšu precīzāk paziņojums par tā pārsniegšanu). A2: php.ini max_execution_time = 30 jauzliek lielāks (apache pēc tam jānorestartē) A3: lapas sākumā ini_set('max_execution_time',60); vai set_time_limit(60) piemēram A4: Pavirši paskatoties likās ok.. Link to comment Share on other sites More sharing options...
ViszinisA Posted April 20, 2006 Author Report Share Posted April 20, 2006 heh paldies :) Q1: tipaz taas 30 sec = 15 bildes = normaali??? Q2: vai mans kods tik leens? sry es vinju rakstiiju apmeeram 15 minuutes kaut kur vakar naktii ap 2.00 :)) Link to comment Share on other sites More sharing options...
GedroX Posted April 20, 2006 Report Share Posted April 20, 2006 A1: skatoties, cik spēcīga mašīna tev stāv. A2: Neko īpaši gudrāku tur nevar izdarīt.. Vienīgais, ja domā darīt kautko nopietnu, ieteiktu uzreiz thumbnail-us netaisīt, bet gan uzticēt to cron-am (schedule task), lai ik minūti kādus 10 uztaisa, lai nav tik lielas un pēkšņas noslodzes. Link to comment Share on other sites More sharing options...
ViszinisA Posted April 20, 2006 Author Report Share Posted April 20, 2006 njaa taa kaa es maajaas straadaaju uz parasta pc (athlon 3000+ 2 ghz 512 ram) itkaa vajadzeeja buut normaaali bet viss ir ok vieniigi tas timeouts :)) bet taa vairs nav :)) Link to comment Share on other sites More sharing options...
Roze Posted April 20, 2006 Report Share Posted April 20, 2006 Vienīgais kam varbūt varētu piesieties ir kāpēc tu pārseivo arī lielo bildi ja tu to nemaz neresaizo? If (false !== ($m = imagejpeg($img_old,'bildes/'.$gal.'/large/'.$file)))//save lielo { echo "normal img saved | <br>"; } Link to comment Share on other sites More sharing options...
ViszinisA Posted April 20, 2006 Author Report Share Posted April 20, 2006 varbuut tapeec ka normaali ir mape Bildes -> Tad ir mape Bildes -> Tmp (kur glabaajas visas bildes kuras buutu jaaposto JAUNAS tipa) peec tam no tmp njem visas mapes un kopee uz Bildes -> Gal_name -> large un small uz large kopee normaalu neresaizotu Q1: kaaa lieto cron-am (schedule task)???? Link to comment Share on other sites More sharing options...
GedroX Posted April 20, 2006 Report Share Posted April 20, 2006 A1: Nu skatoties, kas tev ir - Win vai Linux. Link to comment Share on other sites More sharing options...
ViszinisA Posted April 20, 2006 Author Report Share Posted April 20, 2006 man winXP maajaas un laikam linux buus uz servera Q: bet tipa tas buus kaa uz servera vai tas kas iebuuveets win schedule task?? Link to comment Share on other sites More sharing options...
GedroX Posted April 20, 2006 Report Share Posted April 20, 2006 Tas jau tiek operētājsistēmā iedefinēts, ka katras N minūtes jāpalaiž .../php/php.exe -d include_path=... Link to comment Share on other sites More sharing options...
john.brown Posted April 20, 2006 Report Share Posted April 20, 2006 A kāda izmērā tev ir orģināli? Tas nav normāli, 15 webiska izmēra bildes resaizot vairāk kā 30 s uz tāda kompja. Vai arī viņas ir bezjēdzīgi lielas... Link to comment Share on other sites More sharing options...
Blitz Posted April 20, 2006 Report Share Posted April 20, 2006 Ja tev bildeem nevajag tur baigo kvalitati tad vari izmantot imagecopyresized nevis imagecopyresampled! Stradas daudzreiz atrak bet kvalitate ari bus juutami svakaaka... Link to comment Share on other sites More sharing options...
Roze Posted April 20, 2006 Report Share Posted April 20, 2006 varbuut tapeec ka normaali ir mape Bildes -> Tad ir mape Bildes -> Tmp (kur glabaajas visas bildes kuras buutu jaaposto JAUNAS tipa) peec tam no tmp njem visas mapes un kopee uz Bildes -> Gal_name -> large un small uz large kopee normaalu neresaizotu Q1: kaaa lieto cron-am (schedule task)???? Nu tad dari to ar http://lv.php.net/rename nevis ar imagejpeg() :) Link to comment Share on other sites More sharing options...
Recommended Posts