"PHP script execution mode" when using APC accelator


What mode i should use? Apache or FCGId?


Either setting would work. However, we typically recommend using FCGI or CGI, as it allows PHP scripts to be executed as the Virtual Server owner.


Ok, thnak you. Is Apahce mod fastest?

Both FCGID and mod_php are fast. I don’t know the specific benchmarks as to which is faster – but you could always run some tests to find out :slight_smile:

You could use tools such as Apache Benchmark (ab) to test any speed differences.


just FYI

if you want to try mpm worker (which is supposed to be faster than the default prefork), then you can not use mod_php

Thanks both :slight_smile:

Whats mpm worker, how do i use that?

If i use CGI wrapper, i get this error: PHP Warning: PHP Startup: apc.shm_segments setting ignored in MMAP mode in Unknown on line 0

But, changing to FCGId fixes it.


It sounds like an APC configuration issue.

Most likely, your PHP configuration is setting “apc.shm_segments” – and you’re simply receiving a warning stating that the setting will be ignored in the mode you’re using.

If you can find where that’s being set, you should be able to comment it out to prevent the warning.

That said, using FCGID is the Virtualmin default, and is a fast and efficient PHP Execution Mode – if you aren’t having problems with that, that might be a good way to go.