PHP not compiling with defualt install and settings

Discussion in 'Install/Configuration' started by zep, Jul 18, 2008.

  1. zep

    zep New Member

    I am running my new litespeed enterprise 4-core set up on a fedora machine. I have had the free litespeed installed on another server, with was impressive enough to change servers and get the 4 core version.

    BUT, here is my problem -

    PHP cannot be compiled I keep erroring out. here is some info

    1)Linux Fedora
    2)Enterprise ed
    3)installed using mostly defaults, the last install I did I had the user group as root, now I want it to be Nobody:nobody, and it is installed that way.

    here is the error I am getting:

    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed

    0 24953 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
    100 24953 100 24953 0 0 220k 0 --:--:-- --:--:-- --:--:-- 399k
    Forcing buildconf
    using default Zend directory
    buildconf: checking installation...
    buildconf: autoconf version 2.61 (ok)
    buildconf: Your version of autoconf likely contains buggy cache code.
    Running cvsclean for you.
    To avoid this, install autoconf-2.13.
    rebuilding configure
    aclocal.m4:2090: PHP_PROG_LEX is expanded from...
    rebuilding main/php_config.h.in
    autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
    autoheader: WARNING: and `config.h.top', to define templates for `config.h.in'
    autoheader: WARNING: is deprecated and discouraged.
    autoheader:
    autoheader: WARNING: Using the third argument of `AC_DEFINE' and
    autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows one to define a template without
    autoheader: WARNING: `acconfig.h':
    autoheader:
    autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1,
    autoheader: [Define if a function `main' is needed.])
    autoheader:
    autoheader: WARNING: More sophisticated templates can also be produced, see the
    autoheader: WARNING: documentation.
    aclocal.m4:2090: PHP_PROG_LEX is expanded from...
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for a sed that does not truncate output... /bin/sed
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking target system type... x86_64-unknown-linux-gnu
    shtool:echo:Warning: unable to determine terminal sequence for bold mode
    shtool:echo:Warning: unable to determine terminal sequence for bold mode
    checking for gcc... no
    checking for cc... no
    checking for cl.exe... no
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details.

    Please help.

    Thanks

    Here is the output for the config.log file:

    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.

    It was created by configure, which was
    generated by GNU Autoconf 2.61. Invocation command line was

    $ ./configure --prefix=/opt/lsws/lsphp5 --with-litespeed --with-mysqli --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-iconv

    ## --------- ##
    ## Platform. ##
    ## --------- ##

    hostname = xxx.xxx.net
    uname -m = x86_64
    uname -r = 2.x.xx.xxx.xxx.x86_64
    uname -s = Linux
    uname -v = #1 SMP Fri Jun 27 15:58:30 EDT 2008

    /usr/bin/uname -p = unknown
    /bin/uname -X = unknown

    /bin/arch = x86_64
    /usr/bin/arch -k = unknown
    /usr/convex/getsysinfo = unknown
    /usr/bin/hostinfo = unknown
    /bin/machine = unknown
    /usr/bin/oslevel = unknown
    /bin/universe = unknown

    PATH: /bin
    PATH: /usr/bin
    PATH: /usr/local/bin


    ## ----------- ##
    ## Core tests. ##
    ## ----------- ##

    configure:2307: checking for grep that handles long lines and -e
    configure:2381: result: /bin/grep
    configure:2386: checking for egrep
    configure:2464: result: /bin/grep -E
    configure:2469: checking for a sed that does not truncate output
    configure:2523: result: /bin/sed
    configure:2632: checking build system type
    configure:2650: result: x86_64-unknown-linux-gnu
    configure:2672: checking host system type
    configure:2687: result: x86_64-unknown-linux-gnu
    configure:2709: checking target system type
    configure:2724: result: x86_64-unknown-linux-gnu
    configure:2901: checking for gcc
    configure:2931: result: no
    configure:2998: checking for cc
    configure:3045: result: no
    configure:3101: checking for cl.exe
    configure:3131: result: no
    configure:3160: error: no acceptable C compiler found in $PATH
    See `config.log' for more details.

    ## ---------------- ##
    ## Cache variables. ##
    ## ---------------- ##

    ac_cv_build=x86_64-unknown-linux-gnu
    ac_cv_env_CC_set=
    ac_cv_env_CC_value=
    ac_cv_env_CFLAGS_set=
    ac_cv_env_CFLAGS_value=
    ac_cv_env_CPPFLAGS_set=
    ac_cv_env_CPPFLAGS_value=
    ac_cv_env_CPP_set=
    ac_cv_env_CPP_value=
    ac_cv_env_CXXCPP_set=
    ac_cv_env_CXXCPP_value=
    ac_cv_env_LDFLAGS_set=
    ac_cv_env_LDFLAGS_value=
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_YACC_set=
    ac_cv_env_YACC_value=
    ac_cv_env_YFLAGS_set=
    ac_cv_env_YFLAGS_value=
    ac_cv_env_build_alias_set=
    ac_cv_env_build_alias_value=
    ac_cv_env_host_alias_set=
    ac_cv_env_host_alias_value=
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_host=x86_64-unknown-linux-gnu
    ac_cv_path_EGREP='/bin/grep -E'
    ac_cv_path_GREP=/bin/grep
    ac_cv_target=x86_64-unknown-linux-gnu
    lt_cv_path_SED=/bin/sed

    ## ----------------- ##
    ## Output variables. ##
    ## ----------------- ##

    ALLOCA=''
    AR=''
    AWK=''
    CC=''
    CFLAGS=''
    CONFIGURE_COMMAND=' '\''./configure'\'' '\''--prefix=/opt/lsws/lsphp5'\'' '\''--with-litespeed'\'' '\''--with-mysqli'\'' '\''--with-zlib'\'' '\''--with-gd'\'' '\''--enable-shmop'\'' '\''--enable-track-vars'\'' '\''--enable-sockets'\'' '\''--enable-sysvsem'\'' '\''--enable-sysvshm'\'' '\''--enable-magic-quotes'\'' '\''--enable-mbstring'\'' '\''--with-iconv'\'''
    CONFIGURE_OPTIONS=' '\''--prefix=/opt/lsws/lsphp5'\'' '\''--with-litespeed'\'' '\''--with-mysqli'\'' '\''--with-zlib'\'' '\''--with-gd'\'' '\''--enable-shmop'\'' '\''--enable-track-vars'\'' '\''--enable-sockets'\'' '\''--enable-sysvsem'\'' '\''--enable-sysvshm'\'' '\''--enable-magic-quotes'\'' '\''--enable-mbstring'\'' '\''--with-iconv'\'''
    CPP=''
    CPPFLAGS=''
    CXXCPP=''
    DEBUG_CFLAGS=''
    DEFS=''
    ECHO='echo'
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP='/bin/grep -E'
    EXEEXT=''
    EXPANDED_BINDIR=''
    EXPANDED_DATADIR=''
    EXPANDED_EXTENSION_DIR=''
    EXPANDED_LIBDIR=''
    EXPANDED_LOCALSTATEDIR=''
    EXPANDED_PEAR_INSTALLDIR=''
    EXPANDED_PHP_CONFIG_FILE_PATH=''
    EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=''
    EXPANDED_SYSCONFDIR=''
    EXTENSION_DIR=''
    EXTRA_INCLUDES=''
    EXTRA_LDFLAGS=''
    EXTRA_LDFLAGS_PROGRAM=''
    EXTRA_LIBS=''
    GREP='/bin/grep'
    INCLUDES=''
    INCLUDE_PATH=''
    INLINE_CFLAGS=''
    INSTALL_IT=''
    KRB5_CONFIG=''
    LDFLAGS=''
    LEMON=''
    LEX=''
    LEXLIB=''
    LEX_OUTPUT_ROOT=''
    LIBOBJS=''
    LIBS=''
    LIBTOOL=''
    LN_S=''
    LTLIBOBJS=''
    LTP=''
    LTP_GENHTML=''
    MYSQL_INCLUDE=''
    MYSQL_LIBS=''
    MYSQL_MODULE_TYPE=''
    NATIVE_RPATHS=''
    OBJEXT=''
    OCI8_DIR=''
    OCI8_SHARED_LIBADD=''
    OCI8_VERSION=''
    ODBC_INCLUDE=''
    ODBC_LFLAGS=''
    ODBC_LIBS=''
    ODBC_TYPE=''
    OPENSSL_INCDIR_OPT=''
    PACKAGE_BUGREPORT=''
    PACKAGE_NAME=''
    PACKAGE_STRING=''
    PACKAGE_TARNAME=''
    PACKAGE_VERSION=''
    PATH_SEPARATOR=':'
    PDO_MYSQL_MODULE_TYPE=''
    PDO_OCI_DIR=''
    PDO_OCI_SHARED_LIBADD=''
    PDO_OCI_VERSION=''
    PEAR_INSTALLDIR=''
    PHP_INSTALLED_SAPIS=''
    PHP_LDFLAGS=''
    PHP_LIBS=''
    PHP_VERSION='5.2.6'
    PHP_VERSION_ID='50206'
    PKG_CONFIG=''
    PROG_SENDMAIL=''
    RANLIB=''
    RE2C=''
    SED='/bin/sed'
    SHELL='/bin/sh'
    SHLIB_DL_SUFFIX_NAME=''
    SHLIB_SUFFIX_NAME=''
    SNMP_CONFIG=''
    STRIP=''
    YACC=''
    YFLAGS=''
    ZEND_EXTRA_LIBS=''
    abs_builddir='/opt/lsws/phpbuild/php-5.2.6'
    abs_srcdir='/opt/lsws/phpbuild/php-5.2.6'
    ac_ct_CC=''
    bindir='${exec_prefix}/bin'
    build='x86_64-unknown-linux-gnu'
    build_alias=''
    build_cpu='x86_64'
    build_os='linux-gnu'
    build_vendor='unknown'
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE}'
    dvidir='${docdir}'
    exec_prefix='NONE'
    host='x86_64-unknown-linux-gnu'
    host_alias='x86_64-unknown-linux-gnu'
    host_cpu='x86_64'
    host_os='linux-gnu'
    host_vendor='unknown'
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    oldincludedir='/usr/include'
    pdfdir='${docdir}'
    php_abs_top_builddir='/opt/lsws/phpbuild/php-5.2.6'
    php_abs_top_srcdir='/opt/lsws/phpbuild/php-5.2.6'
    prefix='/opt/lsws/lsphp5'
    program_prefix='NONE'
    program_suffix='NONE'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    sysconfdir='${prefix}/etc'
    target='x86_64-unknown-linux-gnu'
    target_alias=''
    target_cpu='x86_64'
    target_os='linux-gnu'
    target_vendor='unknown'

    ## ----------- ##
    ## confdefs.h. ##
    ## ----------- ##

    #define PACKAGE_NAME ""
    #define PACKAGE_TARNAME ""
    #define PACKAGE_VERSION ""
    #define PACKAGE_STRING ""
    #define PACKAGE_BUGREPORT ""

    configure: exit 1
    Last edited: Jul 18, 2008
  2. mistwang

    mistwang LiteSpeed Staff

    You need to change the permission mask of "gcc" "ld" to 755 temporarily.
  3. zep

    zep New Member

    Halfway There

    I have successfully got the PHP to compile. When I did a phpinfo.php check I was running the old 4.x version. So I changed the the external app to have Isphp5 in it, now I get the server 503 - service unavailable message.

    I am running enterprise with a 64 bit 4 core dedicated server, and made the changes in the server tab vs the VH tabs.

    I attached a screenshot of my settings, I had this working fine with the free version, but that was not on the 64-bit.

    Thanks for any help

    Attached Files:

  4. mistwang

    mistwang LiteSpeed Staff

    You should remove "-c ...php.ini" parameter from the "command" configuration. that php.ini is for PHP4, wont work with php5.
  5. mistwang

    mistwang LiteSpeed Staff

    Also, try "lsws/fcgi-bin/lsphp5 -i" from command line to make sure it works.
  6. zep

    zep New Member

    tried lsws/fcgi-bin/lsphp5 -i

    When I put this in I just get a new line. No Bash or error, no output.

    I changed the -c ..php.ini and I still get the 503 Service Unavailable message. THank you for hte quick reply, I am anxious to get this up and running

    I am also seeing

    execve() failed with errno=8, when try to start Fast CGI application: /opt/lsws/fcgi-bin/lsphp5!
    Last edited: Jul 21, 2008
  7. mistwang

    mistwang LiteSpeed Staff

    something wrong with your lsphp5 binary
    check /opt/lsws/fcgi-bin/lsphp5, it should be a symbolic link to lsphp-5.2.6

    ./lsphp5 -i

    should output the phpinfo.
  8. zep

    zep New Member

    /fcgi-bin/lsphp5 -i

    this gives no output, just a new line what should I do?

    I have recompiled php5, and it completes successfully.

    PHP 4.x worked but I deleted the external app,

    Do I need to reinstall LS to get this to work? Please help
    Last edited: Jul 21, 2008
  9. mistwang

    mistwang LiteSpeed Staff

  10. zep

    zep New Member

    New install

    OK, so I wiped everything out and started from scratch, now I load phpinfo and I see PHP Version 4.4.8, even after successfully compiling php5 and making changes to the external app section of the backend, I still get php 4.4.8

    I am attaching screenshots to help figure this out. I have to assume it is a configuration issue, but what I don't understand is why 4.x is loading after I save the changed file to use php5.

    Please see screenshots, and let me know, thanks.

    Attached Files:

  11. mistwang

    mistwang LiteSpeed Staff

    There is no "lsphp-5.2.6" binary under fcgi-bin directory in your screen shot, the compile must be failed.
    please check lsws/phpbuild/php-5.2.6/sapi/litespeed/ directory, make sure "php" is there.
    double check your PHP configuration used for build PHP 5.2.6, remove configuration options for other SAPI modules like --with-apxs or --enable-fastcgi etc.
  12. zep

    zep New Member

    I have attached the screenshot of lsws/phpbuild/php-5.2.6/sapi/litespeed/ directory, which does not contain 'PHP'.

    When I compile I get a success message, and have been using hte following to do the compile:

    --with-mysql --with-libdir=lib64 --with-mysqli --with-zlib --with-gd --with-png-dir=/usr/lib64 --with-jpeg-dir=/usr/lib64 --with-mhash --with-mcrypt --with-curl --with-php-curl --with-pdo --with-dom --with-cgi --with-pear --with-pdo-mysql --with-iconv --with-ttf --with-freetype --with-xpm --with-openssl --with-php-soap --enable-simplexml --enable-module=rewrite --enable-shmop --enable-mbstring --enable-gd-native-ttf --enable-memory-limit

    +Suhosin and +APC

    I shelled in and deleted both the lsws directory and the untarred files, upacked the tarball, and did an install from scratch.

    EDIT:

    I did compile php with no additional extensions and no suhosin and no apc and php works fine, where is the error in the compile statement?

    Attached Files:

    Last edited: Jul 22, 2008
  13. ts77

    ts77 New Member

    what does
    --enable-module=rewrite
    for php? looks like an apache directive to me.
  14. mistwang

    mistwang LiteSpeed Staff

    Yes, you should remove it along with "--with-cgi" option.
  15. zep

    zep New Member

    that seemed to fix things, but it looks like gd isnt working right, ill need to work on that a bit, thanks for your help!

Share This Page