私は私のimagecreatefrompng機能の問題を持っている、それが上の前に取り組んで共有ホスティング私はPHP5とUbuntuの上にインストールapache2のにそれを移行したときに、内部サーバーエラー500Apache2の内部サーバーエラー500
PHPのバージョン5.5をロードしていませんでした私は、WebサーバーのApache2にVERIFに画像ファイルを変更し、何度 2-再起動
1-試みたUbuntuの
<?php
//Set the Content Type
header('Content-type: image/jpeg');
// Create Image From Existing File
$jpg_image = imagecreatefrompng('icon.png');
// Allocate A Color For The Text
$white = imagecolorallocate($jpg_image, 0, 0, 0);
// Set Path to Font File
$font_path = 'OpenSans-Bold.ttf';
// Set Text to Be Printed On Image
$text = "1";
// Print Text On Image
imagettftext($jpg_image, 10, 0, 18, 20, $white, $font_path, $text);
imagesavealpha($jpg_image, true);
// Send Image to Browser
imagepng($jpg_image);
// Clear Memory
imagedestroy($jpg_image);
?>
にホストされている0.9 のApache 2.4 ファイルが破損している場合はy 3 php5-imagickやphp5-exactimageのようなphp5の画像に関する少数のコンポーネントのインストール 4- apache2.confのEnableSendFileをOffに設定 5 try catchにコードを入れようとしましたが、例外をキャッチすることができます
この問題は解決できませんか? PHPコンポーネントをインストールする必要がありますか、何かをアップグレードする必要がありますか?
おかげで、
よろしく、