Pentiums Posted April 20, 2009 Report Share Posted April 20, 2009 (edited) Šodien atradu lielisku attēlu apstrādes klasi, kods te: http://paste.php.lv/81642bb943753d0056666f...837c1e?lang=php Uzliku uz servera ImageMagick, visu "sačīnīju", bet izrādās ka šamejs skripts nestrādā!! Lai samazinātu attēlu pielietoju: $phMagick = new phMagick('/var/www/images/200903281311545.jpg'); $phMagick->setDestination('/var/www/images/800_200903281311545.jpg')->resize(800,600); Nekas nenotiek, pat erroru neizmet, mapei 'images' chmod ir uzlikts uz '777'! uz phpinfo() parādās, ka imagick module enabled, tātad imagemagick strādā. Vēl drošības pēc ar šo te pārbaudiju vai imagemagick samazina bildīti header('Content-type: image/jpeg'); $i = new Imagick('bilde.jpg'); $i->thumbnailImage(100, 0); echo $i; viss notikās. Edited April 20, 2009 by Pentiums Quote Link to comment Share on other sites More sharing options...
bubu Posted April 20, 2009 Report Share Posted April 20, 2009 error_reporting(E_ALL); ini_set("display_errors", 1); ir salikti? Quote Link to comment Share on other sites More sharing options...
Pentiums Posted April 20, 2009 Author Report Share Posted April 20, 2009 jā! Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted April 20, 2009 Report Share Posted April 20, 2009 Vai nevarētu būt problēma, ka mainīgo esi nosaucis tieši tāpat kā klasi? Pat ja tas tehniski nerada problēmas, man nešķiet, ka tā ir laba doma. Pamēģini: $magiskais_picturz = new phMagick('/var/www/images/200903281311545.jpg') or die('Viss ir slikti! Nesanāk new phMagick!'); $magiskais_picturz->setDestination('/var/www/images/800_200903281311545_new.jpg')->resize(800,600) or die('Viss ir slikti! Nesanāk setDestination->resize'); // un pieliekam, arī, lai taisa jaunu failu, kamēr tiksim skaidrībā, kas notiek. Quote Link to comment Share on other sites More sharing options...
Pentiums Posted April 20, 2009 Author Report Share Posted April 20, 2009 neviens no die nenostrādā. Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted April 20, 2009 Report Share Posted April 20, 2009 Un failu ar _new galā neuztaisa arī? Quote Link to comment Share on other sites More sharing options...
Pentiums Posted April 20, 2009 Author Report Share Posted April 20, 2009 uztaisa! Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted April 20, 2009 Report Share Posted April 20, 2009 Un tajā failā nav nekas? Quote Link to comment Share on other sites More sharing options...
Pentiums Posted April 20, 2009 Author Report Share Posted April 20, 2009 ir, tur rakstīts "NEŠANSĒ" Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted April 20, 2009 Report Share Posted April 20, 2009 Un kura klases daļa atbild par šī brīnuma ierakstīšanu? :) Quote Link to comment Share on other sites More sharing options...
Pentiums Posted April 20, 2009 Author Report Share Posted April 20, 2009 neviena, kur tad man klase likt to file put contents? es ieliku skripta apaksaa. Quote Link to comment Share on other sites More sharing options...
p4F Posted April 21, 2009 Report Share Posted April 21, 2009 $img = new phMagick('/var/www/images/200903281311545.jpg'); $img->setDestination('/var/www/images/800_200903281311545.jpg')->resize(800,600); Quote Link to comment Share on other sites More sharing options...
Pentiums Posted April 21, 2009 Author Report Share Posted April 21, 2009 nu neiet :( laikam vaina būs kautkur pie servera configiem. būs vien jāsamierinās un jāizmanto kāda cita klase :( 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.