MesutEyrice adlı üyeden alıntı: mesajı görüntüle
Merhaba,

Aldığınız hata yazısını paylaşırsanız, Hangi modüllerin çalışıp çalışmadığını veya hatanın neyden kaynaklandığını söyleyebiliriz.

Eğer hatayı göremiyorsanız aşağıdaki kodu sayfanın başına ( PHP açılış kodlarının altına ) yapıştırın ve tekrar çalıştırın. Dizin durumuna göre bir log dosyası oluşturacaktır ve içerisinde hata kodları gözükecektir. Bunu iletmenizi rica ederim.

error_reporting(~E_NOTICE);
ini_set("error_log", "php-error.log");
[07-Feb-2017 10:14:12 UTC] PHP Warning: imagejpeg(): Filename cannot be empty in /home/deneyelim/web/deneyelim.com/public_html/fotograf.php on line 671
[07-Feb-2017 10:14:13 UTC] PHP Warning: imagejpeg(): Filename cannot be empty in /home/deneyelim/web/deneyelim.com/public_html/fotograf.php on line 671
[07-Feb-2017 10:14:13 UTC] PHP Warning: imagejpeg(): Filename cannot be empty in /home/deneyelim/web/deneyelim.com/public_html/fotograf.php on line 671
[07-Feb-2017 10:14:13 UTC] PHP Warning: imagejpeg(): Filename cannot be empty in /home/deneyelim/web/deneyelim.com/public_html/fotograf.php on line 671
[07-Feb-2017 10:14:13 UTC] PHP Warning: imagejpeg(): Filename cannot be empty in /home/deneyelim/web/deneyelim.com/public_html/fotograf.php on line 671
[07-Feb-2017 10:14:13 UTC] PHP Warning: imagejpeg(): Filename cannot be empty in /home/deneyelim/web/deneyelim.com/public_html/fotograf.php on line 671
[07-Feb-2017 10:14:13 UTC] PHP Warning: imagejpeg(): Filename cannot be empty in /home/deneyelim/web/deneyelim.com/public_html/fotograf.php on line 671
[07-Feb-2017 10:14:13 UTC] PHP Warning: imagejpeg(): Filename cannot be empty in /home/deneyelim/web/deneyelim.com/public_html/fotograf.php on line 671

--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 13:24:09 -->-> Daha önceki mesaj 12:24:46 --

Arkadaşlar sorunu çözdük. Sorun PHP sürümünden kaynaklı oluşmaktadır.
PHP 5.3 de;

case "jpg": imagejpeg($this->_image_resource, "", $quality); break;
olarak yazdığımız kodu*
PHP 5.4'de*
case "jpg": imagejpeg($this->_image_resource, NULL, $quality); break;
olarak düzenlememiz yani " " (çift tırnak alanını NULL olarak değiştirmemiz gerekmektedir.
Örnek kod aşağıdadır.

PHP 5.3
public function Parse($quality=80){
$name = $this->generateCacheName();
$content = "";
if(!$this->_cache || ($this->_cache && $this->cacheExpired())){
ob_start();
header ("Content-type: " . $this->_mime);

if($this->_extension == "png" || $this->_extension == "gif"){
imagesavealpha($this->_image_resource, true);
}

switch ($this->_extension) {
case "jpg": imagejpeg($this->_image_resource, NULL, $quality); break;
case "jpeg": imagejpeg($this->_image_resource, NULL, $quality); break;
case "gif": imagegif($this->_image_resource); break;
case "png": imagepng($this->_image_resource); break;
default: $this->showError('Failed to save image!'); break;
}
PHP 5.4

public function Parse($quality=80){
$name = $this->generateCacheName();
$content = "";
if(!$this->_cache || ($this->_cache && $this->cacheExpired())){
ob_start();
header ("Content-type: " . $this->_mime);

if($this->_extension == "png" || $this->_extension == "gif"){
imagesavealpha($this->_image_resource, true);
}

switch ($this->_extension) {
case "jpg": imagejpeg($this->_image_resource, NULL, $quality); break;
case "jpeg": imagejpeg($this->_image_resource, NULL, $quality); break;
case "gif": imagegif($this->_image_resource); break;
case "png": imagepng($this->_image_resource); break;
default: $this->showError('Failed to save image!'); break;
}