Loading ...
Sorry, an error occurred while loading the content.

Upgrading PHP on RedHat9

Expand Messages
  • The BATFAN
    Hi All, Here is a snip of what happens when i try to install php-4.3.7 from source on my RedHat9 box which already has Apache2 and ph-4.2.2 installed with
    Message 1 of 3 , Oct 1, 2004
    • 0 Attachment
      Hi All,

      Here is a snip of what happens when i try to install php-4.3.7 from
      source on my RedHat9 box which already has Apache2 and ph-4.2.2
      installed with MySQL.
      I first checked for DSO support and found that mod_so is built in as
      was told it should be in the INSTALL file.

      [root@localhost php-4.3.7]# httpd -l
      Compiled in modules:
      core.c
      prefork.c
      http_core.c
      mod_so.c

      I then gave the configure command with the configure options that i
      obtained as output in phpinfo();. I have removed the options except
      for apxs which is giving the prob.

      [root@localhost php-4.3.7]# './configure' '--with-apxs2=/usr/sbin/apxs'
      loading cache ../config.cache
      checking host system type... i386-redhat-linux-gnu
      checking for gcc... gcc
      checking whether the C compiler (gcc ) works... yes
      checking whether the C compiler (gcc ) is a cross-compiler... no
      checking whether we are using GNU C... yes
      checking whether gcc accepts -g... yes
      checking whether gcc and cc understand -c and -o together... yes
      checking how to run the C preprocessor... gcc -E
      checking for AIX... no
      checking if compiler supports -R... no
      checking if compiler supports -Wl,-rpath,... yes
      checking for re2c... exit 0;
      checking for ranlib... ranlib
      checking whether ln -s works... yes
      checking for mawk... no
      checking for gawk... gawk
      checking for bison... bison -y
      checking bison version... 1.35 (ok)
      checking for flex... flex
      checking for yywrap in -lfl... yes
      checking lex output file root... lex.yy
      checking whether yytext is a pointer... yes
      checking for working const... yes
      checking flex version... 2.5.4 (ok)
      checking for pthreads_cflags... -pthread
      checking for pthreads_lib...

      Configuring SAPI modules
      checking for AOLserver support... no
      checking for Apache 1.x module support via DSO through APXS... no
      checking for Apache 1.x module support... no
      checking for member fd in BUFF *... no
      checking for mod_charset compatibility option... no
      checking for Apache 2.0 filter-module support via DSO through APXS... no
      checking for Apache 2.0 handler-module support via DSO through APXS...

      Sorry, I cannot run apxs. Possible reasons follow:

      1. Perl is not installed
      2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
      3. Apache was not built using --enable-so (the apxs usage page is displayed)

      The output of /usr/sbin/apxs follows:
      ./configure: line 5080: /usr/sbin/apxs: No such file or directory
      configure: error: Aborting

      I even installed mod_perl on this warning though i do not need it and
      rebooted the system. Trying to locate apxs here is what i got.

      [root@localhost php-4.3.7]# locate apxs
      /var/www/manual/programs/apxs.html

      :-) The help file which was of no help.I tried being a bit more
      verbose with the configuration options and:

      [root@localhost php-4.3.7]# locate apxs2
      [root@localhost php-4.3.7]#


      My question is how did php get installed in the first go when i
      installed my system with these options.

      What should i do now to upgrade php. Where is apxs. As mod_so is
      getting listed in httpd -l that means it should be there on my system.
      Shouldnt it.

      --
      3 Cheers for OSS.

      Ankit Malhotra
      (The BATFAN)
      Registered Linux User # 349208 (http://counter.li.org)
      Final Year, B. Tech. CSE,
      (http://www.vit.ac.in)
      Mobile : 9894184718
    • Rakesh Kumar
      My question is how did php get installed in the first go when i installed my system with these options. Chances are that you are using the PHP that came with
      Message 2 of 3 , Oct 2, 2004
      • 0 Attachment
        My question is how did php get installed in the first go when i
        installed my system with these options.



        Chances are that you are using the PHP that came with default Linux
        installation (I guess this is the case, as you do not remember having
        installed PHP:-)).


        What should i do now to upgrade php. Where is apxs. As mod_so is
        getting listed in httpd -l that means it should be there on my system.
        Shouldnt it.



        apxs is by default located in "/usr/sbin". Till RedHat 7.3, default apache
        installation came with DSO support (so apxs file used to be present in
        /usr/sbin). This has been changed since 9.0 (that's what I think, as I did
        not find it myself in default installation...). So if you want to build PHP
        as DSO of apache, you will need to recompile Apache (with --enable-so
        configure time option). Then apxs file will be located in the bin folder of
        your apache install directory.



        Proceed to recompile your PHP with one of the configure time option being
        "-with-apxs2=<path to apache install directory>/bin/apxs".



        All the best!!



        Rakesh



        [Non-text portions of this message have been removed]
      • The BATFAN
        ... Yeah I am using php-4.2.2, the default with RH9. ... Do you mean I will actually have to recomplie Apache with all its modules again on my machine. Is
        Message 3 of 3 , Oct 2, 2004
        • 0 Attachment
          On Sat, 2 Oct 2004 17:05:58 +0530, Rakesh Kumar <rakesh@...> wrote:
          > Chances are that you are using the PHP that came with default Linux
          > installation.
          Yeah I am using php-4.2.2, the default with RH9.


          >This has been changed since 9.0 (that's what I think, as I did
          > not find it myself in default installation...). So if you want to build PHP
          > as DSO of apache, you will need to recompile Apache (with --enable-so
          > configure time option). Then apxs file will be located in the bin folder of
          > your apache install directory.
          >
          > Proceed to recompile your PHP with one of the configure time option being
          > "-with-apxs2=<path to apache install directory>/bin/apxs".

          Do you mean I will actually have to recomplie Apache with all its
          modules again on my machine. Is there no bypass to actually configure
          it with my already installed system.

          --
          3 Cheers for OSS.

          Ankit Malhotra
          (The BATFAN)
          Registered Linux User # 349208 (http://counter.li.org)
          Final Year, B. Tech. CSE,
          (http://www.vit.ac.in)
          Mobile : 9894184718
        Your message has been successfully submitted and would be delivered to recipients shortly.