Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 !

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
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
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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