2

Any ideas on how i can fix this warning?

Getting this while executing it from shell, on FreeBSD 8.x

# /usr/local/bin/php --run 'echo "test";'
  PHP Warning:  PHP Startup: apc.shm_segments setting ignored in MMAP mode 
  in Unknown on line 0
  test
  Segmentation fault: 11

Happy new year !

4

When APC is configured with mmap it only uses 1 shm_segment. To remove the warning either comment out or delete the apc.shm_segments line in your .ini file.

  • Great, i actually had some apc settings tucked away in extensions.ini - Found it after hours of trial and error, setting apc.shm_segments in php.ini didn't change anything, but some other settings did. So i was pretty confused :) The error message is now gone.. but the seg. fault still persist.. any ideas on how to go around this? – Phliplip Jan 7 '11 at 12:18
  • I found the segfault problem, it was caused by the yaz module. Commented it out from my extensions.ini :) – Phliplip Jan 7 '11 at 14:08
  • What do you have your apc.shm_size set at? Just curious. – Chris_O Jan 8 '11 at 6:02
2

I had the same problem. Running any command throws this error message

PHP Warning:  PHP Startup: apc.shm_segments setting ignored in MMAP mode in Unknown on line 0

in my case the setting was in apc.ini under the path

/etc/php.d/apc.ini

I have updated the line

"apc.shm_segments=3" to "apc.shm_segments=1" 

and it solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.