Results 1 to 5 of 5

Thread: Removing PHP extensions

  1. #1
    Join Date
    Sep 2010
    Beans
    3

    Question Removing PHP extensions

    Hello,
    Basically I'm trying to build PHP without some extensions like ereg. Then I tried to remove ereg folder from ext and build PHP, I got an error.
    How to remove PHP extensions from PHP source before building it?
    Thanks.

  2. #2
    Join Date
    Sep 2010
    Beans
    2

    Re: Removing PHP extensions

    ... can't help you, but I'm a bit curious: What would the point be in doing something like that?

  3. #3
    Join Date
    Sep 2010
    Beans
    3

    Re: Removing PHP extensions

    @MortenA: Well first of all the more extensions you have, the slower things get.
    Second: Some extensions in PHP just useless like eregi, it is deprecated, but still comes with PHP, so I really would like to wipe out it completely.

  4. #4
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Removing PHP extensions

    Quote Originally Posted by ignas2526 View Post
    @MortenA: Well first of all the more extensions you have, the slower things get.
    As I recall back in the days when I built php and apache from source, you can specify which PHP modules to include in compilation while running ./configure.

    That said, I don't think you're going to see noticeable performance improvements if you build a more stripped-down version of PHP. In my experience, other factors like overall server load, amount of graphics content, availability of links to offsite resources, and server and client bandwidth limitations all play a much greater role in determining how fast a page loads in a browser. A couple of milliseconds savings at the level of PHP interpretation will never be noticed. Excluding something like ereg isn't going to have much effect on the size of the PHP binary, either.

    If you're concerned about performance, I suggest looking at some of the PHP "accelerators" that employ caching techniques.

    I still have scripts from years past that use ereg(). If you're the only one writing scripts that will be distributed from this server, removing things is fine. If you're hosting other peoples' content, or using PHP applications from the Internet, removing things from PHP, even deprecated modules, raises the possibility of breaking a script entirely.
    Last edited by SeijiSensei; September 23rd, 2010 at 03:54 PM.

  5. #5
    Join Date
    Sep 2010
    Beans
    3

    Re: Removing PHP extensions

    @SeijiSensei: Well I'm developer myself, and I'm right now developing highly optimized script, so I specially installed Ubuntu, because I need extension called VLD, I haven't managed to compile PHP on Windows, wasted over 6 hours. I'm aware about accelerators, they kinda mess performance results, so I have no plans using them.
    Regarding to what disabling extensions doesn't improve things much is true, but I don't like long phpinfo pages .
    I have no idea how eregi gets with PHP, because I never instructed in configure to enable it, so I'm confused. How to disable it?
    In windows it used to be easy, you just go to php.ini and comment line with extension, since all extensions are DLL's.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •