Re: PHP Extensions as Shared Objects?

From: Date: Mon, 02 Jun 2008 12:46:23 +0000
Subject: Re: PHP Extensions as Shared Objects?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-274918@lists.php.net to get a copy of this message
mike wrote:
On 5/29/08, Weston C <westonc@gmail.com> wrote:
Fortunately, I'll have full control of the hosting environment in the context this matters. :) dl is definitely interesting, but I'm worried that runtime invocation might mean performance hits. Is there a way to do load/startup time inclusion?
you could put it in your php ini file extension = "foo.so" then I believe the impact will be on the first instance for that php engine. so in fastcgi mode, you'd only have the hit once every PHP_FCGI_MAX_REQUESTS when the child restarts...
Have a look at a standard Mandriva or Fedora/CentOS PHP install. You'll see that the various parts of the PHP engine are all very modular with several PECL modules pre-built for your convenience. The php.ini file is split into files in /etc/php.d/*.ini so that the packages can put their own little config systems into the php.ini "file" without dicking around with automated editing. When using PHP as a module the impact is pretty low, only once per restart. As Mike wrote the low impact is also apparent in FCGI mode too (but it's a bit more obvious where the extra load it creates is manifested). Personally, the convenience of modularity sells this approach for me. I do generally roll my own RPMs to keep things up to day and patched, but again I just use that format/deployment method as it's convenient. Col

« previous php.general (#274918) next »