Results 1 to 5 of 5
  1. #1
    Relic Shield
    Join Date
    Nov 2006
    Posts
    1,778
    BG Level
    6

    Compiling PHP best options

    I am compiling php myself to use on a unix server and I am still learning about it. I was wondering what the best options to compile it with are. The guide says to use apsx which I understand and mysql which is also something I need. I know there are a bunch of other good things to have I just don't know what they are. Anyone wanna help me out and point me in a good direction?

    Thanks.

  2. #2
    E. Body
    Join Date
    Sep 2007
    Posts
    2,019
    BG Level
    7
    FFXI Server
    Fenrir

    Quote Originally Posted by Ikith View Post
    I am compiling php myself to use on a unix server and I am still learning about it. I was wondering what the best options to compile it with are. The guide says to use apsx which I understand and mysql which is also something I need. I know there are a bunch of other good things to have I just don't know what they are. Anyone wanna help me out and point me in a good direction?

    Thanks.
    Compiling PHP? Or are you just trying to use PHP? Most people just use PHP as a server-side web language to interface with MySQL and provide a template system.

    if you're trying to do something more hardcore, like using PHP to write bash-shell-style scripting, just ignore me.

  3. #3
    Relic Weapons
    Join Date
    Oct 2006
    Posts
    335
    BG Level
    4

    He's compiling the actual shared module for use with Apache.

    The answer to the question depends on what you intend to do with PHP, Apache, and what you have installed or plan to install on your system. You don't really want to install more than you need, and if you have the flexibility to recompile the module later, you can always add in other features as you determine that you need them. Also, the configure script might fail if you are trying to use options that require libraries you don't already have installed.

    configure --help in the PHP source directory should give you a list of all available options for the version of the source you're using.

  4. #4
    Ive sucked 27 dicks, in a row.
    Join Date
    Apr 2006
    Posts
    1,569
    BG Level
    6

    If you're on a flavor of Linux (or any system with a package manager or ports system), I would strongly advise against manually compiling *anything* yourself unless you know precisely what you will be gaining by doing so, and it sounds like you don't. Distro packages are built with very sensible defaults, PHP in particular is something that's designed to work out of the box when you install it via packages due to its popularity. If packages are available, use them and don't worry about messing with configure flags, they're almost guaranteed to have everything enabled that you need for learning the language.

    If you absolutely have to build it yourself, you'll need to run "./configure --help" and examine all the options. Note down which libraries/features you want to enable, make sure you have the appropriate header files installed, then build up a "configure" command line that includes everything you want. If "configure" barfs and says that it can't find the headers, you'll have to manually specify where to find them - this is all explained in the help output. Again, though... if you don't understand what you're enabling with "configure", you should probably be using the package manager.

    Good luck!

  5. #5
    Relic Shield
    Join Date
    Nov 2006
    Posts
    1,778
    BG Level
    6

    Quote Originally Posted by Zosi View Post
    If you're on a flavor of Linux (or any system with a package manager or ports system), I would strongly advise against manually compiling *anything* yourself unless you know precisely what you will be gaining by doing so, and it sounds like you don't. Distro packages are built with very sensible defaults, PHP in particular is something that's designed to work out of the box when you install it via packages due to its popularity. If packages are available, use them and don't worry about messing with configure flags, they're almost guaranteed to have everything enabled that you need for learning the language.

    If you absolutely have to build it yourself, you'll need to run "./configure --help" and examine all the options. Note down which libraries/features you want to enable, make sure you have the appropriate header files installed, then build up a "configure" command line that includes everything you want. If "configure" barfs and says that it can't find the headers, you'll have to manually specify where to find them - this is all explained in the help output. Again, though... if you don't understand what you're enabling with "configure", you should probably be using the package manager.

    Good luck!
    Its more of a I want to learn type of thing. I know how to do apache and mysql now and they are working on boot from apachectl used as an init script and mysql's init script. Plus its nice to know since I'm going into server administration and one day may be asked to compile these components because they offer an option that isn't in the version in the repo. All in all this is just for learning purposes nothing more nothing less.

Similar Threads

  1. What are best security options for XP?
    By pirahna1 in forum Tech
    Replies: 7
    Last Post: 2007-12-23, 19:30