Re: Scalability and large site issues
| From: | Rasmus Lerdorf | Date: | Mon, 24 Jul 2000 21:12:20 +0000 |
| Subject: | Re: Scalability and large site issues | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7969@lists.php.net to get a copy of this message | ||
> In PHP, if you find something's not fast enough, you can
> write some of your code in C, compile it and call that from the
> PHP page. Our only experience in doing that is doing 'exec' - I
> imagine there's a faster way, or you could be adventurous and
> write it as a PHP module to compile it in to PHP. Maybe
> even release it for the rest of us, if it's useful.
Yes, the answer for PHP is to write an extension. It is not very
different from writing a COM module for ASP. With the new build framework
in PHP 4, it is actually pretty easy. At the O'Reilly Open Source
conference in Monterey, I walked through the steps on how to build a
custom extension like this. We actually did it live right in the class
there. The slides are online at http://conf.php.net (Advanced
Tutorial).
You are probably better off reading through README.EXT_SKEL in the PHP 4
distribution though.
-Rasmus