Robis Posted April 22, 2004 Report Share Posted April 22, 2004 (edited) Sveiki! Manis izveidotais image thumbnailu veidoshana skripts http://paste.php.lv/949 (ir iznjemts header("Content-type: image/png")), tachu, veicot sho skriptu (kursh atrodas kaa php fails pict_thumbs.php ieksh /pictures/) un noraadot pareizu image/jpeg failu (.jpg), man raada shaadu erroru: <br /> <b>Fatal error</b>: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 9088 bytes) in <b>/home/virtual/site/var/www/html/pictures/pict_thumbs.php</b> on line <b>32</b><br /> Vai tas ir taapeec, ka bildes, kuraam meegjinu uztaisiit thumbus ir apmeeram 700Kb lielas un 2272x1704 pixelju izmeeri??? Ko tad lai es daru ar shiim bildeem, kaa lai samazina??? Edited April 22, 2004 by Robis Link to comment Share on other sites More sharing options...
Aleksejs Posted April 22, 2004 Report Share Posted April 22, 2004 Man Gimps uzrāda, ka šāda veida bilde aizņem ~11,1MB - tātad, lai apstrādātu tādas bildes tev jāatļauj php izmantot vismaz tik daudz atmiņas. Tas jāmaina php.ini failā. Link to comment Share on other sites More sharing options...
Robis Posted April 22, 2004 Author Report Share Posted April 22, 2004 Bet kaa es to varu izmainiit uz publiskaa servera? varbuut ir kaada php komanda? Link to comment Share on other sites More sharing options...
sviesc Posted April 22, 2004 Report Share Posted April 22, 2004 kātad :blink: padomā loģiski tad jau jebkurš maziņs hackerītis varētu manīt php konfigu kā viņam vajag jābūt citai izejau varbūt vienkārši samazini bildes ar kādu progu :blink: Link to comment Share on other sites More sharing options...
Aleksejs Posted April 22, 2004 Report Share Posted April 22, 2004 Nē, nevari izmainīt, ja netiec klāt php.ini failam/ draudzīgajam adminam /utt Link to comment Share on other sites More sharing options...
Robis Posted April 22, 2004 Author Report Share Posted April 22, 2004 Hmm... Es nezinu, lapa staav uz serveris.lv !!! Nezin kaut ko par to??? A kaada opcija php.ini man jaamaina tieshi??? Link to comment Share on other sites More sharing options...
Robis Posted April 22, 2004 Author Report Share Posted April 22, 2004 Aleksej, a tu nezini kaada ini opcija jaamaina un uz ko??? Link to comment Share on other sites More sharing options...
Aleksejs Posted April 22, 2004 Report Share Posted April 22, 2004 (edited) memory_limit Edited April 22, 2004 by Aleksejs Link to comment Share on other sites More sharing options...
Robis Posted April 22, 2004 Author Report Share Posted April 22, 2004 un jaaizmaina laikam uz "16M" ja? Bet memory_limit skaitaas PHP_INI_ALL, tas noziimee "Entry can be set anywhere", tachu uzliekot skripta saakumaa ini_set("memory_limit", "16M"); man raadiijaas taa pati kljuuda! Link to comment Share on other sites More sharing options...
Robis Posted April 22, 2004 Author Report Share Posted April 22, 2004 + piebildiishu, ka man shis ini_set("memory_limit", "12M"); atgriezh FALSE. Nesaprotu, kaa lai mainu ini? Bet uz publiskajiem serveriem shii php.ini konfiguraacija ir uz visu serveri un saitiem, vai arii uz katra saita atsevishkji? Link to comment Share on other sites More sharing options...
Robis Posted April 23, 2004 Author Report Share Posted April 23, 2004 Hei, paskat, tikai izmainiita php.ini konfiguraacija uz 16M, tachu tik un taa - tagad jau vinjsh raada shaadu kljuudu!!! ini_set failed!<br /> <b>Fatal error</b>: Allowed memory size of 16777216 bytes exhausted at (null):0 (tried to allocate 9088 bytes) in <b>/home/virtual/site/var/www/html/pictures/pict_thumb.php</b> on line <b>42</b><br /> Es meegjinaaju atkal ar to pashu bildi! Cik tad tur iisti atminjas vajag??? PLEASE HELP!!! Link to comment Share on other sites More sharing options...
Robis Posted April 23, 2004 Author Report Share Posted April 23, 2004 TIESHAAM NEVIENS NEZIN ATBILDI??? Link to comment Share on other sites More sharing options...
Aleksejs Posted April 23, 2004 Report Share Posted April 23, 2004 (edited) A nevar būt tā, ka tev vienā skriptā tiek vērtas vaļā ļoti daudzas bildes vienlaicīgi? Tad pēc katra Imagecerate, jāseko attiecīgam imagedestroy. Edited April 23, 2004 by Aleksejs Link to comment Share on other sites More sharing options...
Robis Posted April 23, 2004 Author Report Share Posted April 23, 2004 Netiek veertas ja daudzas bildes vienlaiciigi valjaa - attieciigaas bildes fails tiek noraadiits ieksh mainiigaa $_GET['pic'] - paskaties ludzu, skriptu: http://paste.php.lv/949 Link to comment Share on other sites More sharing options...
Aleksejs Posted April 23, 2004 Report Share Posted April 23, 2004 Nu pamēģini pielikt tos ImageDestroy($destimg); ImageDestroy($srcimg); funkcijas (kā tev viņa īsti saucās "createImageThumbnail" vai "doImageThumbnail" ???) beigās pēc imagu izvadīšanas. Pamēģini ar 30k bildīti. Vai tad rodas problēmas? Link to comment Share on other sites More sharing options...
Recommended Posts