apache2 + PHP + RH

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sharif Islam

    apache2 + PHP + RH

    Sorry if this was discussed earlier. I couldn't find any relevant
    answers from the archive.

    I am currently testing RH Enterprise WS with the following:

    httpd-2.0.46-25.ent
    httpd-devel-2.0.46-25.ent
    freetds-0.61

    I uninstalled the php rpm, because I couldn't get freetds(databas e
    connection to mssql server) part working. Then, I got php-4.3.4 and
    installed it from scratch with following options:

    ../configure --with-apxs2=/usr/sbin/apxs --enable-trans-sid
    --with-sybase-ct=/usr/local/freetds --with-ldap --with-gd
    --with-freetype-dir --with-zlib-dir

    I think I made the necessary changes in php.ini(//usr/local/lib/php.ini)
    and httpd.conf. However, apache seems to not parsing the php pages. My
    test pages work fine in the command prompt, but it spits out the code
    as text when I access the pages from a browser.

    One other option I can look into is to remove the httpd rpms and build
    apache from scratch. However, I would like to avoid that, if I can make
    the above work. I would appreciate any pointers. Thanks.

    Happy Turkey day.

    -Sharif


    --
    )
    ((
    |""|-.
    | :|/'
    -`--'-


  • clvrmnky

    #2
    Re: apache2 + PHP + RH

    Sharif Islam wrote:
    [color=blue]
    > Sorry if this was discussed earlier. I couldn't find any relevant
    > answers from the archive.
    >
    > I am currently testing RH Enterprise WS with the following:
    >
    > httpd-2.0.46-25.ent
    > httpd-devel-2.0.46-25.ent
    > freetds-0.61
    >
    > I uninstalled the php rpm, because I couldn't get freetds(databas e
    > connection to mssql server) part working. Then, I got php-4.3.4 and
    > installed it from scratch with following options:
    >
    > ./configure --with-apxs2=/usr/sbin/apxs --enable-trans-sid
    > --with-sybase-ct=/usr/local/freetds --with-ldap --with-gd
    > --with-freetype-dir --with-zlib-dir
    >
    > I think I made the necessary changes in php.ini(//usr/local/lib/php.ini)
    > and httpd.conf. However, apache seems to not parsing the php pages. My
    > test pages work fine in the command prompt, but it spits out the code
    > as text when I access the pages from a browser.
    >
    > One other option I can look into is to remove the httpd rpms and build
    > apache from scratch. However, I would like to avoid that, if I can make
    > the above work. I would appreciate any pointers. Thanks.[/color]

    Make sure you have Apache configured to run the module, and serve up PHP
    pages. This is from memory, so you had better check Apache docs:

    This was _probably_ done by the apxs2 mod installer:
    LoadModule php4_module [path to mods]/libphp4.so
    AddModule mod_php4.c

    This was probably not done by any install script:
    DirectoryIndex index.html index.php
    AddType application/x-httpd-php .php .html

    You need to put these in the appropriate place in the http.conf, and/or
    an .htaccess file (if allowable). Removing the RPM probably removed
    these entries, as well.

    Comment

    • clvrmnky

      #3
      Re: apache2 + PHP + RH

      clvrmnky wrote:
      [color=blue]
      > Sharif Islam wrote:
      >[color=green]
      >> Sorry if this was discussed earlier. I couldn't find any relevant
      >> answers from the archive.
      >>
      >> I am currently testing RH Enterprise WS with the following:
      >>
      >> httpd-2.0.46-25.ent
      >> httpd-devel-2.0.46-25.ent
      >> freetds-0.61
      >>
      >> I uninstalled the php rpm, because I couldn't get freetds(databas e
      >> connection to mssql server) part working. Then, I got php-4.3.4 and
      >> installed it from scratch with following options:
      >>
      >> ./configure --with-apxs2=/usr/sbin/apxs --enable-trans-sid
      >> --with-sybase-ct=/usr/local/freetds --with-ldap --with-gd
      >> --with-freetype-dir --with-zlib-dir
      >>
      >> I think I made the necessary changes in php.ini(//usr/local/lib/php.ini)
      >> and httpd.conf. However, apache seems to not parsing the php pages. My
      >> test pages work fine in the command prompt, but it spits out the code
      >> as text when I access the pages from a browser.
      >>
      >> One other option I can look into is to remove the httpd rpms and build
      >> apache from scratch. However, I would like to avoid that, if I can make
      >> the above work. I would appreciate any pointers. Thanks.[/color]
      >
      >
      > Make sure you have Apache configured to run the module, and serve up PHP
      > pages. This is from memory, so you had better check Apache docs:
      >
      > This was _probably_ done by the apxs2 mod installer:
      > LoadModule php4_module [path to mods]/libphp4.so
      > AddModule mod_php4.c
      >
      > This was probably not done by any install script:
      > DirectoryIndex index.html index.php
      > AddType application/x-httpd-php .php .html
      >
      > You need to put these in the appropriate place in the http.conf, and/or
      > an .htaccess file (if allowable). Removing the RPM probably removed
      > these entries, as well.
      >[/color]


      Comment

      • Sharif Islam

        #4
        Re: apache2 + PHP + RH

        clvrmnky wrote:
        [color=blue]
        > Sharif Islam wrote:[/color]
        [....]
        [color=blue]
        >
        > Make sure you have Apache configured to run the module, and serve up PHP
        > pages. This is from memory, so you had better check Apache docs:
        >
        > This was _probably_ done by the apxs2 mod installer:
        > LoadModule php4_module [path to mods]/libphp4.so
        > AddModule mod_php4.c
        >
        > This was probably not done by any install script:
        > DirectoryIndex index.html index.php
        > AddType application/x-httpd-php .php .html[/color]
        Thanks.
        Ya, that was it. I had the AddType in a wrong place. Now I need to
        figure out the freetds part.

        --
        )
        ((
        |""|-.
        | :|/'
        -`--'-

        Comment

        Working...