Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory_limit 설정이 -1로 되어있을 때 썸네일이 올바르게 생기지 않는 문제 #2249

Closed
wdl opened this issue Mar 28, 2018 · 0 comments
Labels
Milestone

Comments

@wdl
Copy link

wdl commented Mar 28, 2018

썸네일을 생성할 때, /classes/file/FileHandler.class.phpcreateImageFile 함수를 타는 것으로 확인하였습니다.

이 함수 내에서는 다시 checkMemoryLoadImage 함수로 이미지 파일을 불러올만한 메모리 여유가 있는지 조회하는 것으로 보이는데, 이 함수 내에서 ini_get('memory_limit')를 바로 사용하는 것이 문제가 있습니다.

현재 해당 함수 내에서 판단하는 기준이

$availableMemory = self::returnBytes(ini_get('memory_limit')) - memory_get_usage();
if($availableMemory < $memoryNeeded)
{
	return FALSE;
}

이기 때문에, memory_limit-1 이라면 메모리 부족으로 판단하여 썸네일이 생기지 않습니다.

http://php.net/memory_limit에서 값 -1은 메모리 제한을 두지 않는 것으로 기술하여서, 이러한 설정을 사용하는 서버는 썸네일 생성에 문제가 있을 것으로 보입니다.

확인 부탁드립니다.

@ghost ghost self-assigned this Mar 29, 2018
@ghost ghost added the type/bug label Mar 30, 2018
@ghost ghost added this to the 1.9-next milestone Mar 30, 2018
@ghost ghost closed this as completed Apr 9, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant