anonīms Posted September 12, 2010 Report Share Posted September 12, 2010 phpinfo izmet, ka ir ieslēgts. PNG Support enabled Mēģinot kodu $src = imagecreatefromjpeg(".../stats_background.png"); header('Content-Type: image/png'); imagepng($src); imagedestroy($src); kods nestrādā, bet visu png attiecīgi nomainot pret jpeg kods strādā. Kas vēl varētu būt par vainu, ka hostings neatļauj vai viņam nepatīk png? Quote Link to comment Share on other sites More sharing options...
mickys Posted September 12, 2010 Report Share Posted September 12, 2010 $src = imagecreatefromjpeg(".../stats_background.png"); huh? Quote Link to comment Share on other sites More sharing options...
anonīms Posted September 12, 2010 Author Report Share Posted September 12, 2010 Drukas kļūda, bet tas nemaina būtību. Tas pats arī bija ar bilžu augšuplādi. PNG bildes neļāva. Tas ir - augšuplādējās kā melnas bildes Quote Link to comment Share on other sites More sharing options...
briedis Posted September 12, 2010 Report Share Posted September 12, 2010 Kas tas tāds par relatīvo ceļu ar 3 punktiem? :)) Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 12, 2010 Report Share Posted September 12, 2010 Kas vēl varētu būt par vainu, ka hostings neatļauj vai viņam nepatīk png? notestee lokaali tad parliecinasies kas par kljuudu, piedevam dazji hostingi ir stipri inerti (it iipashu frajie arzemju) un izmanto vecu PHP vers. attieciigi arii paveca GDlib.. Quote Link to comment Share on other sites More sharing options...
briedis Posted September 12, 2010 Report Share Posted September 12, 2010 ..vienmēr var arī pārbaudīt, vai tas fails tur tiešām eksistē ar var_dump(file_exists(cels)); Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 12, 2010 Report Share Posted September 12, 2010 ..vienmēr var arī pārbaudīt, vai tas fails tur tiešām eksistē ar Aizmirsu piebilst, ka *NIx vrjanta vajag parliecinaties arii par to vai faila nosaukums nav lielie/mazie simboli .. piedevam parbaudiit jau var arii ar tiiru HTML ;) Quote Link to comment Share on other sites More sharing options...
anonīms Posted September 12, 2010 Author Report Share Posted September 12, 2010 uz localhosta precīzi tas pats kods iet. (Tā bilde arī eksistē, es vnk esmu pilno ceļu izdzēsis forumā). Uz hostinga PHP versija ir pat jaunāka. Vienīgā atšķirība ir tāda, ka localhostā nav šāda lieta, bet hostingā pie gd gan uzrādas libPNG Version 1.4.1 Quote Link to comment Share on other sites More sharing options...
briedis Posted September 12, 2010 Report Share Posted September 12, 2010 Esi ieslēdzis error reportingu, nekādas kļūdas nelec laukā? 100% zini, ka fails eksistē (uz hostinga)? ar file_exists pārbaudīji? Quote Link to comment Share on other sites More sharing options...
mad182 Posted September 12, 2010 Report Share Posted September 12, 2010 Cik liela pikseļos ir bilde un kāds ir atmiņas limits? imagecreatefrompng vajag vairāk atmiņas, kā jpeg un gif funkcijām uz to pasu attēla izmēru. Quote Link to comment Share on other sites More sharing options...
anonīms Posted September 12, 2010 Author Report Share Posted September 12, 2010 (edited) wtf, ko tas nozīmē var_dump(file_exists("http://adrese.lv/public/blv/stats_background.png")); ejot caur browseri šī bilde ir, bet file_exsists neko neuzrāda.. :/ var_dump(file_exists("stats_background.png")); true, bet tāpat kods neiet. bildes svars nav liels. Edited September 12, 2010 by anonīms Quote Link to comment Share on other sites More sharing options...
anonīms Posted September 12, 2010 Author Report Share Posted September 12, 2010 error_reporting(E_ALL); ini_set("display_errors", 1); $b = "stats_background.png"; var_dump(file_exists($b)); $src = imagecreatefrompng($b); header('Content-Type: image/png'); imagepng($src); imagedestroy($src); bilde tāpat nav. Atgriež true Quote Link to comment Share on other sites More sharing options...
briedis Posted September 12, 2010 Report Share Posted September 12, 2010 Nu tevis dotajā variantā būs headers already sent var_dump dēļ... Quote Link to comment Share on other sites More sharing options...
anonīms Posted September 13, 2010 Author Report Share Posted September 13, 2010 bija arī. // koments Quote Link to comment Share on other sites More sharing options...
Леший Posted September 13, 2010 Report Share Posted September 13, 2010 <?php var_dump(imagetypes() & IMG_PNG); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.