PHP 5.0.1 and Apache2

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Thierry Vael

    #1

    PHP 5.0.1 and Apache2

    Hello,

    I followed all the steps described in the manual of PHP to install PHP 5.0.1
    with Apache (even went to recompile the apache server) but when I try a PHP
    script, I only see the code. Checked everything in the FAQ about this, but
    nothing seems to work :'(

    Does anyone has an idea how to solve this?


  • Tony Marston

    #2
    Re: PHP 5.0.1 and Apache2

    What OS? If this a new installation or an upgrade from a previous version?
    Have you had PHP + Apache working on that machine before?

    We cannot help you with your problem unless you supply proper details.

    --
    Tony Marston

    This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




    "Thierry Vael" <thierry.vael@i france.com> wrote in message
    news:1092650262 .612619@ecw.eur ocontrol.be...[color=blue]
    > Hello,
    >
    > I followed all the steps described in the manual of PHP to install PHP
    > 5.0.1
    > with Apache (even went to recompile the apache server) but when I try a
    > PHP
    > script, I only see the code. Checked everything in the FAQ about this, but
    > nothing seems to work :'(
    >
    > Does anyone has an idea how to solve this?
    >
    >[/color]


    Comment

    • Sebastian Lauwers

      #3
      Re: PHP 5.0.1 and Apache2

      Tony Marston wrote:
      [color=blue]
      > We cannot help you with your problem unless you supply proper details.[/color]

      Indeed, what have you done precisely? Have you added the proper lines to
      the httpd.conf file?

      S.

      --
      The most likely way for the world to be destroyed,
      most experts agree, is by accident.
      That's where we come in; we're computer professionals.
      We cause accidents.
      --Nathaniel Borenstein

      Comment

      • Thierry Vael

        #4
        Re: PHP 5.0.1 and Apache2

        Hello again

        Ok, here we go:

        OS => Mandrake Linux 10.0 Community Edition

        Yes, Apache 2 was installed on the computer, but removed it before
        reinstalling it from scratch. Installed it like said on php.net (manual)
        with the options: --enable-so

        After install and test of Apache, installed php with options like in manual
        (--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql)

        All went nice, copied the php.ini file to /usr/local/lib/ (used the
        recommended and the distri one) and added the AddType and LoadModule (though
        the PHP5 module was in /usr/local/apache2/modules/libphp5.so) so I put
        modules/libphp5 in the LoadModule part.

        Checked all the different options with httpd and all seems working (mod_so.c
        is loaded)

        If any more information is needed, please reply ;)



        "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message
        news:cfq501$bmc $1$8300dec7@new s.demon.co.uk.. .[color=blue]
        > What OS? If this a new installation or an upgrade from a previous version?
        > Have you had PHP + Apache working on that machine before?
        >
        > We cannot help you with your problem unless you supply proper details.
        >
        > --
        > Tony Marston
        >
        > http://www.tonymarston.net
        >
        >
        >
        > "Thierry Vael" <thierry.vael@i france.com> wrote in message
        > news:1092650262 .612619@ecw.eur ocontrol.be...[color=green]
        > > Hello,
        > >
        > > I followed all the steps described in the manual of PHP to install PHP
        > > 5.0.1
        > > with Apache (even went to recompile the apache server) but when I try a
        > > PHP
        > > script, I only see the code. Checked everything in the FAQ about this,[/color][/color]
        but[color=blue][color=green]
        > > nothing seems to work :'(
        > >
        > > Does anyone has an idea how to solve this?
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Justin Wyer

          #5
          Re: PHP 5.0.1 and Apache2

          Thierry Vael wrote:[color=blue]
          > Hello again
          >
          > Ok, here we go:
          >
          > OS => Mandrake Linux 10.0 Community Edition
          >
          > Yes, Apache 2 was installed on the computer, but removed it before
          > reinstalling it from scratch. Installed it like said on php.net (manual)
          > with the options: --enable-so
          >
          > After install and test of Apache, installed php with options like in manual
          > (--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql)
          >
          > All went nice, copied the php.ini file to /usr/local/lib/ (used the
          > recommended and the distri one) and added the AddType and LoadModule (though
          > the PHP5 module was in /usr/local/apache2/modules/libphp5.so) so I put
          > modules/libphp5 in the LoadModule part.
          >
          > Checked all the different options with httpd and all seems working (mod_so.c
          > is loaded)
          >
          > If any more information is needed, please reply ;)
          >
          >
          >
          > "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message
          > news:cfq501$bmc $1$8300dec7@new s.demon.co.uk.. .
          >[color=green]
          >>What OS? If this a new installation or an upgrade from a previous version?
          >>Have you had PHP + Apache working on that machine before?
          >>
          >>We cannot help you with your problem unless you supply proper details.
          >>
          >>--
          >>Tony Marston
          >>
          >>http://www.tonymarston.net
          >>
          >>
          >>
          >>"Thierry Vael" <thierry.vael@i france.com> wrote in message
          >>news:10926502 62.612619@ecw.e urocontrol.be.. .
          >>[color=darkred]
          >>>Hello,
          >>>
          >>>I followed all the steps described in the manual of PHP to install PHP
          >>>5.0.1
          >>>with Apache (even went to recompile the apache server) but when I try a
          >>>PHP
          >>>script, I only see the code. Checked everything in the FAQ about this,[/color][/color]
          >
          > but
          >[color=green][color=darkred]
          >>>nothing seems to work :'(
          >>>
          >>>Does anyone has an idea how to solve this?
          >>>
          >>>[/color]
          >>
          >>[/color]
          >
          >[/color]

          You need to tell apache what to do with .php files u need to add the line:

          AddType application/x-httpd-php .php

          to your httpd.conf, just stick it with the other Add Type commands

          Comment

          Working...