2013-07-13 6 views
0

저는 최근 Win 7 컴퓨터에 PHP를 다시 설치했습니다. 그렇게하면서 PHP 4에서 PHP 5.1.4로 업그레이드했습니다. GD 기능은 더 이상 작동하지 않습니다. php.ini 파일에서 php_gd2.dll 행의 주석 처리를 제거했습니다 :PHP 5.1.4에서 GD를 활성화하려면 어떻게해야합니까?

;extension=php_fdf.dll 
;extension=php_filepro.dll 
extension=php_gd2.dll  <-- This line was originally commented 
;extension=php_gettext.dll 
;extension=php_ifx.dll 

그러나 문제가 해결되지 않았습니다.

GD Support enabled 
GD Version bundled (2.0.28 compatible) 
FreeType Support enabled 
FreeType Linkage with freetype 
FreeType Version 2.1.9 
T1Lib Support enabled 
GIF Read Support enabled 
GIF Create Support enabled 
JPG Support enabled 
PNG Support enabled 
WBMP Support enabled 
XBM Support enabled 

이 myimage.htm입니다 :

<IMG SRC="myiamge.php" BORDER="1"> 

을 그리고 이것은 myimage.php입니다 :은 phpinfo()이이 GD에 대해 말한다

내가 myimage을 나의 브라우저를
<?php 
$my_img = imagecreate(200, 80); 
$background = imagecolorallocate($my_img, 0, 0, 255); 
$text_color = imagecolorallocate($my_img, 255, 255, 0); 
$line_color = imagecolorallocate($my_img, 128, 255, 0); 
imagestring($my_img, 4, 30, 25, "test", $text_color); 
imagesetthickness ($my_img, 5); 
imageline($my_img, 30, 45, 165, 45, $line_color); 
header("Content-type: image/png"); 
imagepng($my_img); 
imagecolordeallocate($line_color); 
imagecolordeallocate($text_color); 
imagecolordeallocate($background); 
imagedestroy($my_img); 
?> 

. htm, 깨진 이미지의 아이콘을 봅니다. 내가 도대체 ​​뭘 잘못하고있는 겁니까? 나는 멍청이야. 친절하게 대해.

+0

myimage.php에 어떤 오류가 기록 되었습니까? –

+4

5.1.4? 정말? 조금 더 업그레이드하십시오 :-) –

답변

1

php 5.1.4는 매우 오래된 버전입니다 (2006 년 5 월!) - PHP 5.4 이상 또는 5.5 이상 (최신 버전)으로 업그레이드해야합니다. 그런 다음 configuration steps을 따라 GD 라이브러리를 활성화 할 수 있습니다.

+0

WinLAMP (http://winlamp.sourceforge.net/)를 다운로드 한 사이트에 따르면 최신 버전은 Apache 2.0.58, PHP 5.1.4 및 MySQL 5.0.22입니다. . 그리고 지금은 그것을 증명할 방법이 없지만 PHP 4에서 제 코드가 예상대로 작동했다는 것을 알고 있습니다. – Fredashay

+0

좋아요, 이제 막 PHP를 다시 얻었습니다. 분명히 Sourceforge는 죽은 사이트입니다 (누가 호스팅 청구서를 지불하는지 궁금합니다). 다른 사람이 나를 다운로드 할 수있는 WinLAMP를 제공하는 다른 사이트로 안내 할 수 있습니까? 그렇지 않으면 나는 5.1.4에 붙어있다. 구글은 소스 포지 (the sourceforge)에 링크되어있다. – Fredashay

+0

1) 별도의 구성 요소를 설치하는 방법을 배워야합니다. 그리 어렵지 않습니다. 2) 전체 패키지는 http://www.wampserver.com/en/ – Danack

관련 문제