tiy Posted March 26, 2007 Report Share Posted March 26, 2007 1. Ka var saglabat bildi ieksh mysql, ja to uzgenereju un negribu saglabat uz servera, bet pa taisno datu baze. 2. Ka var no mysql izvadit longblob man ir saglabata liela bilde ~500, bet izvadot to lauka sakuma bilde ir tadakada vina ir un, tad sakas gluki. Link to comment Share on other sites More sharing options...
andrisp Posted March 26, 2007 Report Share Posted March 26, 2007 (edited) Ko nozīmē "liela bilde ~500" ? kb ? Ko nozīmē, ka sākumā ir bilde tāda kā viņa ir, bet tad sākas gļuki ? Kādi gļuki ? Un vispār izklausās, jau ka tu to bildi esi pieseivojis datubāzē. Kāpēc prasi, kā to izdarīt ? Edited March 26, 2007 by andrisp Link to comment Share on other sites More sharing options...
tiy Posted March 26, 2007 Author Report Share Posted March 26, 2007 (edited) Ta ari ir bildi glabaju ieksh db, bet kad velku ara ir gluki ! katru reizi bildes gluki mainas, tas ir ar select kaut ko nevar izvilkt lidz galam. header ar suti image http://yy.lv/upload/index.php?ACT=4&f=33130&ext=BMP patesteju ar bildi 70kb iet labi. Edited March 26, 2007 by tiy Link to comment Share on other sites More sharing options...
andrisp Posted March 26, 2007 Report Share Posted March 26, 2007 (edited) Ar 70kb bildi vienmēr viss ir ok? Paskaties šo http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html Vispār ieteiktu neglabāt attēlus datubāzē, ja iespējams. Edited March 26, 2007 by andrisp Link to comment Share on other sites More sharing options...
tiy Posted March 26, 2007 Author Report Share Posted March 26, 2007 Ja ar bildi kas ir 70 viss ir ok. Ne nevar glabat citur. Link to comment Share on other sites More sharing options...
andrisp Posted March 26, 2007 Report Share Posted March 26, 2007 Atkomentē header daļu kodam un paskaties ar ko beidzas bildes outputs. Varbūt kaut kāds errors parādīsies. Link to comment Share on other sites More sharing options...
tiy Posted March 26, 2007 Author Report Share Posted March 26, 2007 Ne erroru nav vienkarshu outputs beidzas. neiet mysql --max_allowed_packet=32M iegju mysql ieksha uzrakstiju tapatas neiet? kur myslq glabajas konfig fails(i), jo ieksh myslq foldera atveru visus ini failus uzrakstiju ar rokam tur tapatas nesamainijas, kur vaina ? iet mysqld --max_allowed_packet=16M Man nemainas max allowed packet 1048576 / 1024 = 1 laikam viens mb Link to comment Share on other sites More sharing options...
tiy Posted March 26, 2007 Author Report Share Posted March 26, 2007 sql vienkarshi uzrakstiju shito un samainijas, bet tas nedeva nekadu jegu, varbut ta ir php vaina? SET GLOBAL max_allowed_packet=10000000; Link to comment Share on other sites More sharing options...
rpr Posted March 27, 2007 Report Share Posted March 27, 2007 vai slashus stripo? Link to comment Share on other sites More sharing options...
tiy Posted March 27, 2007 Author Report Share Posted March 27, 2007 Ne tas nav nepiecieshamns, jo kad notiek strips ar glukot sak, meginaju abus variantus. ps. nevaru atrast atbildi uz sho jautajumu : Ka var saglabat bildi ieksh mysql, ja to uzgenereju un negribu saglabat uz servera, bet pa taisno datu baze? Link to comment Share on other sites More sharing options...
andrisp Posted March 27, 2007 Report Share Posted March 27, 2007 A kā tu iedabūji iekš datubāzes to bildi ar kuru tu tagad eksperimentē ? Enīvei, lukur sagūglēju tutoriāli - vienu http://www.php-mysql-tutorial.com/php-mysql-upload.php Link to comment Share on other sites More sharing options...
tiy Posted March 27, 2007 Author Report Share Posted March 27, 2007 (edited) Ja tieshi ar tadu pashu variantu. Bet ja ir tada situacija header ("Content-type: image/png"); $im = imagecreatetruecolor(320, 240); $black = imagecolorallocate($im, 0, 0, 0); $ink = imagecolorallocate($im, 255, 255, 255); $gray = imagecolorallocate($im, 128, 128, 128); imagefilledrectangle($im,80,60,240,180,$black); imagerectangle($im,80,60,240,180,$ink); imagejpeg($im); //no ka tad datus janolasa, jo pati f-ja atgriez "bool", intersanti? $query = "INSERT INTO images (`id`,`img`) VALUES ('1','". hvz ko te likt??? ."')"; imagedestroy($im); Edited March 27, 2007 by tiy Link to comment Share on other sites More sharing options...
andrisp Posted March 27, 2007 Report Share Posted March 27, 2007 Skaidrs. Varētu nebūt pats labākais variants, bet - http://lv2.php.net/manual/en/function.imagejpeg.php#55987 Link to comment Share on other sites More sharing options...
tiy Posted March 27, 2007 Author Report Share Posted March 27, 2007 (edited) Tads hack it ka iet (uz maziem failiem) uz lieliem patesteshu velak. ty Edited March 27, 2007 by tiy Link to comment Share on other sites More sharing options...
andrisp Posted March 27, 2007 Report Share Posted March 27, 2007 Nu tas jau it kā nav haks, bet nu patestē. Moška kaut kādi brīnumi parādīsies. Link to comment Share on other sites More sharing options...
Recommended Posts