Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Exclamation PHP configure order

    I was up late last night with a bunch of test servers last night originally playing around with testing Cpanel's current curlwrappers bug but noticed something different that I had not paid much attention to before:

    THE ORDER OF PARAMETERS PASSED TO CONFIGURE BY EASYAPACHE!

    EasyApache doesn't appear to care what order the options selected are passed to PHP's configure command but the order does indeed matter greatly and I suppose nobody thinks about it much since I have not really paid much attention to cpanel's building with EasyApache but then again I usually build PHP manually most of the time and have very little use for EasyApache so it does not matter much for me.

    Anyway, some items if passed in the wrong order won't function properly. For example, in a number of compile tests running EasyApache, every time PHP was built, EasyApache but the graphics library paths AFTER the command to build GD but in that order, GD will show up on phpinfo() but usually won't function correctly. Those need to actually be specified first!

    In the same manner, a number of library options given at the end of the configure parameters in most of the test EasyApache builds actually need to be specified earlier or a few other dependent options won't build correctly either and can amount to code bugs with some scripts.

    The following PHP was built manually last night and puts most of these options back into their correct compile order:
    I did some testing with the same options on servers put in EasyApache's default order and my own order based on both experience and research and found that a number of test scripts I threw against PHP triggering specific functions in various PHP compile option areas would work perfectly fine under my own manual builds but would have errors and fail under EasyApache builds where the only main differences between the builds were the order of configure options passed at compile time. To further confirm this, I also built a manual build using the same compile order as EasyApache as a control and it too also failed when passed certain test scripts even though the phpinfo screen would appear to have these functions setup correctly on the surface. This further confirmed the order of compile options relevance.

    It would not be difficult for Cpanel to throw in a couple lines of code to make sure certain compile options are passed before others but in the meantime, those who understand what I am talking about may want to build their PHP builds manually just to make sure everything builds correctly.

  2. #2
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Thanks. I opened an internal inquiry regarding this.
    Kenneth
    Product Manager
    cPanel, Inc.

  3. #3
    cPanel Staff
    Join Date
    Mar 2004
    Posts
    704

    Default

    From what I can tell you must be experiencing another issue since order does not appear to matter. (Nor is such order dependency documented or consistent with typical configure scripts)

    As proof of this concept I've attached a phpinfo() screenshot highlighting that --with-gd was the very last ./configure option. In that same script I have it printing out the gd_info() data structure which is:

    GD Version: bundled (2.0.34 compatible)
    FreeType Support: Disabled
    T1Lib Support: Disabled
    GIF Read Support: Enabled
    GIF Create Support: Enabled
    JPG Support: Enabled
    PNG Support: Enabled
    WBMP Support: Enabled
    XPM Support: Enabled
    XBM Support: Enabled
    JIS-mapped Japanese Font Support: Disabled
    Here is the script I used:

    PHP Code:
    <?
    $array
    =gd_info ();
    foreach (
    $array as $key=>$val) {
      
      if (
    $val===true) {
        
    $val="Enabled";
      }

      if (
    $val===false) {
        
    $val="Disabled";
      }

      echo 
    "$key$val <br />\n";

    }
    ?>

    <hr/>

    <? phpinfo(); ?>
    I'd guess the differences are elsewhere, since easyapache does much more than simply ./configure && make && make install (e.g. patches, environment, etc etc)

    If you can give a specific, reproducible, step-by-step directions && scripts that reproduce the problem you are seeing we'd be happy to investigate and see if there is a way to address the actual cause.
    Attached Thumbnails Attached Thumbnails PHP configure order-picture-857.png  

  4. #4
    cPanel Staff
    Join Date
    Mar 2004
    Posts
    704

    Default

    BTW, Same exact effect with --with-gd before the path specification.

    Will attach screen shot to that effect shortly

  5. #5
    cPanel Staff
    Join Date
    Mar 2004
    Posts
    704

    Default

    gd_info() output is exactly the same

    attached screen shot is the configure section of the script's phpinfo() demonstrating this time that --with-gd is before the various path specifying flags
    Attached Thumbnails Attached Thumbnails PHP configure order-picture-859.png  

Similar Threads & Tags
Similar threads

  1. Configure Suexec and PHP
    By don_will in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 01-11-2008, 09:52 AM
  2. Configure Suexec and PHP
    By manuk in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 12-08-2007, 12:46 PM
  3. Need help with configure.php
    By m82492 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-04-2007, 04:43 AM
  4. php configure
    By ntwaddel in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 12-31-2004, 06:39 PM
  5. php configure
    By generaltso in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-29-2004, 03:58 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube