anonīms Posted March 30, 2011 Report Share Posted March 30, 2011 Super problēma. Gatavs produkts tiek nodots pasūtītājam, bet izrādas, ka viņam gan konfigurācija, gan pats serveris ir mēsls. uz php5 (2 hostingiem mēģināts) viss iet perfekti, bet redz šiem, augšuplādējot bildi vnk neizmet ne erroru, pilnīgi neko (to ieslēgšana ar nelīdz) kods tiek līdz šaj funkcijai un tālāk apstājas function load($filename) { $image_info = getimagesize($filename); $this->image_type = $image_info[2]; if( $this->image_type == IMAGETYPE_JPEG ) { $this->image = imagecreatefromjpeg($filename); } elseif( $this->image_type == IMAGETYPE_GIF ) { $this->image = imagecreatefromgif($filename); } elseif( $this->image_type == IMAGETYPE_PNG ) { $this->image = imagecreatefrompng($filename); } } kur varētu būt problēma? kods par spicu priekšs php4 (man tā neliekas) ;/ Quote Link to comment Share on other sites More sharing options...
briedis Posted March 30, 2011 Report Share Posted March 30, 2011 Aizkomentējot visu un ik pa rindiņai atkomentējot nevar atrast cēloni? Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 30, 2011 Author Report Share Posted March 30, 2011 Tur tā lieta, ka nav ko atrast. Es pat speciāli pamēģināju augšupladēt tīri jpg failu, btw Array ( [0] => 1280 [1] => 1024 [2] => 2 [3] => width="1280" height="1024" [bits] => 8 [channels] => 3 [mime] => image/jpeg ) pārrakstīju arī funkciju vnk uz function load($filename) { $this->image = imagecreatefromjpeg($filename); } bet tāpat nekā. Quote Link to comment Share on other sites More sharing options...
briedis Posted March 30, 2011 Report Share Posted March 30, 2011 (edited) ..un ja aizkomentē to pašu vienīgo rindiņu iekš tā load(), arī nofeilo kods? Edited March 30, 2011 by briedis Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 30, 2011 Author Report Share Posted March 30, 2011 jap function load() { } Katrā ziņā uzrakstīta viņiem ziņa ir. Atliek gaidīt. Quote Link to comment Share on other sites More sharing options...
briedis Posted March 30, 2011 Report Share Posted March 30, 2011 Nu tad problēma noteikti nav šeit, ja jau aizkomentē visu saturu un tāpat nekas nenotiek. Debug, debug, debug :) Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted March 30, 2011 Report Share Posted March 30, 2011 Iesleedzot error reporting noteikti tiktu paraadiita kaada kljuuda, ja taa buutu saistiita ar PHP4 vs PHP5 atshkjiriibaam (vai jebkot PHPiigu) Quote Link to comment Share on other sites More sharing options...
e-remit Posted March 30, 2011 Report Share Posted March 30, 2011 Nezinu vai šoreiz, bet ar JPG bildēm ir pieredze, ka nepietiek PHP rezervētās atmiņas, jo JPG ir saspiests fails, kas, izsaucot getimagesize(), tiek atspiests. Nokonvertē pats to bildi, uz kuru uzkārās, par BMP un ieraudzīsi reālo bildes izmēru atmiņā, tad paskaties, vai PHP pietiek atmiņa to izdarīt? Quote Link to comment Share on other sites More sharing options...
wintermute Posted March 30, 2011 Report Share Posted March 30, 2011 Ieleic pašā lapas sākumā šito: ini_set('display_errors', 1 ); error_reporting( E_ALL ); Un parādi mums, kādas kļūdas tu redzi. Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 31, 2011 Author Report Share Posted March 31, 2011 Warning: imagesx(): supplied argument is not a valid Image resource in /usr/local/www/.../application/controllers/IMGupload.php on line 64 Warning: imagesy(): supplied argument is not a valid Image resource in /usr/local/www/.../application/controllers/IMGupload.php on line 67 Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /usr/local/www/.../application/controllers/IMGupload.php on line 86 Fatal error: Call to undefined function: imagejpeg() in /usr/local/www/.../application/controllers/IMGupload.php on line 44 Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 31, 2011 Author Report Share Posted March 31, 2011 echo $_FILES['file']['tmp_name']; izvada /var/tmp/phphecXVF Tā tam ir jābūt? Quote Link to comment Share on other sites More sharing options...
wintermute Posted March 31, 2011 Report Share Posted March 31, 2011 Tu labāk apskaties iekš phpinfo() vai tev ir GD extension's ielādēts. Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 31, 2011 Author Report Share Posted March 31, 2011 ir :/ gdGD Support enabled GD Version bundled (2.0.28 compatible) GIF Read Support enabled GIF Create Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled Quote Link to comment Share on other sites More sharing options...
daGrevis Posted March 31, 2011 Report Share Posted March 31, 2011 Pārbaudi vai tas, ko Tu padot imagesx() ir "image resource". Ar var_debug()! Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 31, 2011 Author Report Share Posted March 31, 2011 (edited) īsti nezināmu iemeslu dēļ kods ir aizgājis drusku tālāk. Tagad vēl lielākas acis. Fatal error: Call to undefined function: imagecreatefromjpeg() in /usr/local/www/.../application/controllers/IMGupload.php on line 32 Kādā sakarā var neeksistēt šī funkcija, ja viņa ir php4/5 EDIT: Configure Command './configure' '--with-mysql=/usr/local/mysql' '--with-apache=../apache_1.3.34' '--with-gd' '--with-zlib' '--with-gettext' Edited March 31, 2011 by anonīms 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.