Programming/php2014. 10. 14. 17:12
php 5.5 부터 Zend에서 기본 내장된 opcache라는 녀석이 있는데..
ARM에서 크로스 컴파일로 하려니

일단 dlopen 에서 패스를 하지 못해
extensions are not supported on this platform 이런 에러 발생..
이거야 configure에서 해당 부분을 강제로 스킵하게 하면 되지만

flock structure도 배를 째서..
그냥 강제로 flock_type=linux로 해서 컴파일 하는데 성공!

하지만 
정작 기능을 활성화 시키면
Fatal Error Unable to allocate shared memory segment of 8388608 bytes: unknown: Numerical result out of range (34)
에러를 발생한다.
opcache의 경우 opcache.memory_consumption 캐싱용량을 최소 8MB 이상으로 하기에 그 이하로 지정해도
무조건 8MB 이상으로 하기에 php.ini나 opcache.ini 에서 opcache.memory_consumption = 1M로 해도
뜬금없이 8MB로 나와서 헤메게 하는 부분.. -_-
그런 중요(?)한건 좀 메뉴얼에 제대로 명시하라고!! (디버깅 모드로 메시지 출력하도록 해서 발견)

opcache.memory_consumption integer
The size of the shared memory storage used by OPcache, in megabytes.
 
[링크 : http://php.net/manual/en/opcache.configuration.php] 

아무튼.. shared 메모리를 자꾸 외쳐서
/etc/sysctl.conf에서 설정해주고 리부팅 해도
이래저래 안되서.. 결론적으로 포기 ㅠㅠ

[링크 : https://www.msi.umn.edu/.../support/download/Linux_shared_mem_seg.html] shared memory
[링크 : http://pic.dhe.ibm.com/...com.ibm.swg.im.soliddb.accel.doc%2Fdoc%2Fsma.kernels.linux.html] sysctl
[링크 : http://stackoverflow.com/questions/17224798/how-to-use-php-opcache]
[링크 : https://github.com/zendtech/ZendOptimizerPlus/issues/134

'Programming > php' 카테고리의 다른 글

php.ini extension_dir  (0) 2014.10.20
php 5.3.22 / xcache 1.3.2  (0) 2014.10.15
php - extensions are not supported on this platform / arm  (0) 2014.10.14
php php-cgi 차이점?  (0) 2014.10.10
<? <?php 설정  (0) 2014.10.10
Posted by 구차니