[4.4.1] Compile libphp4.so from src w/o apache src?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stan R.

    #1

    [4.4.1] Compile libphp4.so from src w/o apache src?

    Hello, I was running php 4.1.2 that came with my Linux distro a while
    back (RH7.3 RPM, Kernel 2.4.20-20.7) and I wanted a newer version so I
    download the src tarball from the web and compiled it and it looks like
    that well, as I have the new one in /usr/local/bin (the old binary is
    still in /usr/bin until I have the new one working with my apache) :

    $ php -v
    PHP 4.4.1 (cgi) (built: Dec 13 2005 20:32:47)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


    My question is, how can I compile a libphp4.so for use with my apache.
    My apache is of a special configuration, so recompiling is not an option
    (it was made available as an RPM when I obtained it some time ago, so I
    don't have the source.)

    Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6b
    PHP/4.1.2 mod_perl/1.26 FrontPage/5.0.2.2510 configured

    The INSTALL file that came with the tarball wasn't very helpful in this
    regard. It seems to make sense to me that one should be able to simply
    compile the libphp4.so separately and add it to the modules for apache.

    Thanks for any help


  • Sjoerd

    #2
    Re: Compile libphp4.so from src w/o apache src?

    I think this will work:
    ../configure --with-apxs=/usr/bin/apxs

    Comment

    • Stan R.

      #3
      Re: Compile libphp4.so from src w/o apache src?

      Sjoerd wrote:[color=blue]
      > I think this will work:
      > ./configure --with-apxs=/usr/bin/apxs[/color]

      Do you mean for php (from the root source dir?)



      Posted Via Usenet.com Premium Usenet Newsgroup Services
      ----------------------------------------------------------
      ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
      ----------------------------------------------------------
      Best Usenet Service Providers 2026 ranked by Newsgroup Access Newsservers, Usenet Search, Features & Free Trial. Add VPN for privacy.

      Comment

      • Stan R.

        #4
        Re: Compile libphp4.so from src w/o apache src?

        Sjoerd wrote:[color=blue]
        > I think this will work:
        > ./configure --with-apxs=/usr/bin/apxs[/color]

        Do you mean for php (from the root source dir?)



        Comment

        • Stan R.

          #5
          Re: Compile libphp4.so from src w/o apache src?

          Sjoerd wrote:[color=blue]
          > I think this will work:
          > ./configure --with-apxs=/usr/bin/apxs[/color]

          Thanks.

          I did:

          ../configure --with-mysql --with-apxs=/usr/sbin/apxs

          and `make` and `make install` and got nor errors. Now, after restarting
          apache, it segaults as soon as I try to do any sort of GET (any type,
          even noremal html pages.)

          (Apache works fine if I comment out the php entried in my httpd.conf)

          error_log:
          [Tue Feb 21 11:33:10 2006] [notice] Apache/1.3.27 (Unix)
          (Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6b PHP/4.4.1 mod_perl/1.26
          FrontPage/5.0.2.2510 configured -- resuming normal operations
          [Tue Feb 21 11:33:10 2006] [notice] suEXEC mechanism enabled (wrapper:
          /usr/sbin/suexec)
          [Tue Feb 21 11:33:10 2006] [notice] Accept mutex: sysvsem (Default:
          sysvsem)
          [Tue Feb 21 11:33:57 2006] [notice] child pid 26807 exit signal
          Segmentation fault (11)
          [Tue Feb 21 11:33:57 2006] [notice] child pid 26806 exit signal
          Segmentation fault (11)


          httpd.conf php4 lines:
          [...]
          <IfDefine HAVE_PHP4>
          #LoadModule php4_module modules/libphp4.so
          </IfDefine>
          [...]
          <IfDefine HAVE_PHP4>
          #AddModule mod_php4.c
          </IfDefine>
          [...]


          From the error log you can see that the new php "PHP/4.4.1" is
          recognized (where as before it said "PHP/4.1.2" in that same spot.)

          Did I miss something when compiling? I have GCC 3.

          Than kfor any help

          $ gcc --version
          gcc (GCC) 3.2.1 20020903 (prerelease)
          Copyright (C) 2002 Free Software Foundation, Inc.
          This is free software; see the source for copying conditions. There is
          NO
          warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
          PURPOSE.

          $ uname -mrs
          Linux 2.4.20-20.7 i686

          $ php -v
          PHP 4.4.1 (cli) (built: Feb 21 2006 11:24:53)
          Copyright (c) 1997-2004 The PHP Group
          Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies




          Posted Via Usenet.com Premium Usenet Newsgroup Services
          ----------------------------------------------------------
          ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
          ----------------------------------------------------------
          Best Usenet Service Providers 2026 ranked by Newsgroup Access Newsservers, Usenet Search, Features & Free Trial. Add VPN for privacy.

          Comment

          Working...