"PHP script execution mode" when using APC accelator

8 posts / 0 new
Last post
#1 Mon, 01/09/2012 - 15:43
Owdy

"PHP script execution mode" when using APC accelator

Hello

What mode i should use? Apache or FCGId?

Mon, 01/09/2012 - 19:44
andreychek

Howdy,

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.

-Eric

Mon, 01/09/2012 - 22:16
Owdy

Ok, thnak you. Is Apahce mod fastest?

Tue, 01/10/2012 - 09:49
andreychek

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 :-)

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

-Eric

Wed, 01/11/2012 - 10:55
helpmin

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

Wed, 01/11/2012 - 11:26
Owdy

Thanks both :)

Whats mpm worker, how do i use that?

Thu, 01/12/2012 - 09:38
Owdy

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.

Tue, 01/31/2012 - 09:27
andreychek

Howdy,

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.

-Eric

Topic locked