Problem building php 4.4.6 and apache 1.3.37 on RHEL 4

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Murtari

    Problem building php 4.4.6 and apache 1.3.37 on RHEL 4

    Folks,

    Trying to build php 4.4.6 and apache 1.3.37 on RHEL 4.
    Each of them builds and installs okay, but when we start
    apache we get:

    Syntax error on line 238 of /usr/local/etc/httpd/conf/httpd.conf:
    API module structure `php4_module' in file
    /usr/local/etc/httpd/libexec/libphp4.so is garbled -
    perhaps this is not an Apache module DSO?


    I've checked this out, got some hint that we need to use
    the apxs that came with RedHat, not the one built in the
    Apache distribution? RedHat does have an http-devel package
    which includes apxs but that is for Apache 2.x

    Last time we did this on RHEL 4 is was Apache 1.3.34
    and php 4.4.1 and it went fine, we are using the same
    procedures. Not sure if some RHEL 4 libraries changed?

    Has anyone been able to build that combination? Below
    are some excerpts on what we are using for configure.
    Thanks!


    For apache:

    ../configure --with-layout=Apache --prefix=/usr/local/etc/httpd
    --enable-suexec
    .... some deleted...
    --disable-module=asis --enable-shared=max
    --enable-rule=SHARED_COR E --enable-module=so

    For php:

    CPPFLAGS="-DLINUX=22 -DEAPI" \
    ../configure \
    --enable-static \
    --disable-shared \
    --with-config-file-path=/usr/local/etc/httpd/conf \
    --with-apxs=/usr/local/etc/httpd/bin/apxs \
    .... some deleted.
    --enable-mbstring=all \
    --with-mhash=/export/tools/apache/php/ext/mhash


    --
    John
    _______________ _______________ _______________ _______________ _______
    John Murtari Software Workshop Inc.
    jmurtari@follow ing domain 315.635-1968(x-211) "TheBook.Co m" (TM)

  • C.

    #2
    Re: Problem building php 4.4.6 and apache 1.3.37 on RHEL 4

    On 25 Apr, 22:10, John Murtari <jmurt...@thebo ok.comwrote:
    Folks,
    >
    Trying to build php 4.4.6 and apache 1.3.37 on RHEL 4.
    Each of them builds and installs okay, but when we start
    apache we get:
    >
    Syntax error on line 238 of /usr/local/etc/httpd/conf/httpd.conf:
    API module structure `php4_module' in file
    /usr/local/etc/httpd/libexec/libphp4.so is garbled -
    perhaps this is not an Apache module DSO?
    >
    I've checked this out, got some hint that we need to use
    the apxs that came with RedHat, not the one built in the
    Apache distribution? RedHat does have an http-devel package
    which includes apxs but that is for Apache 2.x
    >
    No - you either build or your Apache from source or use rpms never mix
    and match. If you build apache from source then you build PHP from
    source. Its probably OK to build PHP from source with a packaged
    apache.

    This error is commonly caused by using the wrong version of apxs or if
    your modules are much newer than your apache.

    Read these:

    PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.


    If your still having difficulties, what does ldd report for the
    module?

    C.

    Comment

    • lark

      #3
      Re: Problem building php 4.4.6 and apache 1.3.37 on RHEL 4

      C. wrote:
      On 25 Apr, 22:10, John Murtari <jmurt...@thebo ok.comwrote:
      >Folks,
      >>
      > Trying to build php 4.4.6 and apache 1.3.37 on RHEL 4.
      >Each of them builds and installs okay, but when we start
      >apache we get:
      >>
      >Syntax error on line 238 of /usr/local/etc/httpd/conf/httpd.conf:
      >API module structure `php4_module' in file
      >/usr/local/etc/httpd/libexec/libphp4.so is garbled -
      >perhaps this is not an Apache module DSO?
      >>
      >I've checked this out, got some hint that we need to use
      >the apxs that came with RedHat, not the one built in the
      >Apache distribution? RedHat does have an http-devel package
      >which includes apxs but that is for Apache 2.x
      >>
      >
      No - you either build or your Apache from source or use rpms never mix
      and match. If you build apache from source then you build PHP from
      source. Its probably OK to build PHP from source with a packaged
      apache.
      >
      This error is commonly caused by using the wrong version of apxs or if
      your modules are much newer than your apache.
      >
      Read these:
      >
      PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.

      >
      If your still having difficulties, what does ldd report for the
      module?
      >
      C.
      >
      i second that. what happened in my case was that the version of apache
      that i'd installed on my machine from source had installed to a
      different location. the default version was what known to the system. in
      my case, i had to replace the default version binaries with symbolic
      links to the compiled version.

      this can be happening to you as it sounds like you've compiled apache
      from source with php. if the old apache is still there (regardless of
      its running or not), it will interfere with your php compile. need to be
      specific when passing config arguments to the php configuration.

      hope this helps.

      --
      lark -- hamzee@sbcdeglo balspam.net
      To reply to me directly, delete "despam".

      Comment

      • John Murtari

        #4
        Re: Problem building php 4.4.6 and apache 1.3.37 on RHEL 4

        >>
        > Trying to build php 4.4.6 and apache 1.3.37 on RHEL 4.
        >Each of them builds and installs okay, but when we start
        >apache we get:
        >>
        >Syntax error on line 238 of /usr/local/etc/httpd/conf/httpd.conf:
        >API module structure `php4_module' in file
        >/usr/local/etc/httpd/libexec/libphp4.so is garbled -
        >perhaps this is not an Apache module DSO?
        >>
        >I've checked this out, got some hint that we need to use
        >the apxs that came with RedHat, not the one built in the
        >Apache distribution? RedHat does have an http-devel package
        >which includes apxs but that is for Apache 2.x
        >>
        >
        No - you either build or your Apache from source or use rpms never mix
        and match. If you build apache from source then you build PHP from
        source. Its probably OK to build PHP from source with a packaged
        apache.
        >
        This error is commonly caused by using the wrong version of apxs or if
        your modules are much newer than your apache.
        >
        Read these:
        >
        PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.

        >
        If your still having difficulties, what does ldd report for the
        module?
        Okay, thanks for the tip. We were just building from
        sources, but I took your suggestions and installed the newer
        apache before building php and that cleared it up!
        Thanks!

        --
        John
        _______________ _______________ _______________ _______________ _______
        John Murtari Software Workshop Inc.
        jmurtari@follow ing domain 315.635-1968(x-211) "TheBook.Co m" (TM)

        Comment

        Working...