Problem installing Apache with PHP 4

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

    Problem installing Apache with PHP 4

    I can't get it working together ,i've read all e-books and instructions and
    it's giving me a headache....

    I am using Apache 2.0.48 and PHP 4.3.11

    When I try
    <? phpinfo(); ?>

    it's all working but when i try simple php scripts with one input text box
    :
    text.html
    <HTML>
    <HEAD></HEAD>
    <BODY>
    <FORM METHOD=GET ACTION="text.ph p">
    Who is your favourite author?
    <INPUT NAME="Author" TYPE="TEXT">
    <BR>
    <BR>
    <INPUT TYPE=SUBMIT>
    </FORM>
    </BODY>
    </HTML>

    text.php
    <HTML>
    <HEAD></HEAD>
    <BODY>
    <FORM METHOD=GET ACTION="text.ph p">
    Who is your favourite author?
    <INPUT NAME="Author" TYPE="TEXT">
    <BR>
    <BR>
    <INPUT TYPE=SUBMIT>
    </FORM>
    </BODY>
    </HTML>


    it isn't working...

    I know you all had similar problems ,please could someone tell me how to
    get this working....


  • boclair

    #2
    Re: Problem installing Apache with PHP 4

    Davor wrote:[color=blue]
    > I can't get it working together ,i've read all e-books and instructions and
    > it's giving me a headache....
    >
    > I am using Apache 2.0.48 and PHP 4.3.11
    >
    > When I try
    > <? phpinfo(); ?>
    >
    > it's all working but when i try simple php scripts with one input text box
    > :
    > text.html
    > <HTML>
    > <HEAD></HEAD>
    > <BODY>
    > <FORM METHOD=GET ACTION="text.ph p">
    > Who is your favourite author?
    > <INPUT NAME="Author" TYPE="TEXT">
    > <BR>
    > <BR>
    > <INPUT TYPE=SUBMIT>
    > </FORM>
    > </BODY>
    > </HTML>
    >
    > text.php
    > <HTML>
    > <HEAD></HEAD>
    > <BODY>
    > <FORM METHOD=GET ACTION="text.ph p">
    > Who is your favourite author?
    > <INPUT NAME="Author" TYPE="TEXT">[/color]

    Google for a tutorial on html forms

    Louise

    Comment

    • Peter van Schie

      #3
      Re: Problem installing Apache with PHP 4

      Davor wrote:[color=blue]
      > I can't get it working together ,i've read all e-books and instructions and
      > it's giving me a headache....
      >
      > I am using Apache 2.0.48 and PHP 4.3.11[/color]
      [snip][color=blue]
      > it isn't working...
      >
      > I know you all had similar problems ,please could someone tell me how to
      > get this working....
      >
      >[/color]

      What exactly do you expect to happen?
      In other words: what are you trying to accomplish. This doesn't seem
      like a PHP/Apache problem.

      --

      Comment

      • Jimmy Reds

        #4
        Re: Problem installing Apache with PHP 4

        I agree. Your form/script combination is doing exactly what you are
        telling it to do i.e. nothing.

        To check if it's working I would suggest changing the form method in
        text.html to POST then change text.php to something like the following:

        <HTML>
        <HEAD>
        <TITLE>PHP Test</TITLE>
        </HEAD>
        <BODY>
        <?php echo 'Your favourite author is : ' . $_POST['Author']; ?>
        </BODY>
        </HTML>

        Jimmy.

        Comment

        • Davor

          #5
          Re: Problem installing Apache with PHP 4

          I'm aksing how to setup Apache to work with PHP4 (httpd.conf)
          ??????????????? ??????????????? ??????????????? ???????


          Comment

          • Peter van Schie

            #6
            Re: Problem installing Apache with PHP 4

            Davor wrote:[color=blue]
            > I'm aksing how to setup Apache to work with PHP4 (httpd.conf)
            > ??????????????? ??????????????? ??????????????? ???????
            >
            >[/color]

            You already got your answer: you say that phpinfo(); returns what you
            expect it to return, hence there's nothing wrong with your Apache/PHP
            configuration.

            --

            Comment

            • Andy Hassall

              #7
              Re: Problem installing Apache with PHP 4

              On Tue, 26 Jul 2005 16:03:03 +0200, "Davor" <dadinjar@foi.h r> wrote:
              [color=blue]
              >I'm aksing how to setup Apache to work with PHP4 (httpd.conf)
              >?[/color]


              [color=blue]
              >?????????????? ??????????????? ??????????????? ???????[/color]

              One is enough.

              --
              Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
              <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

              Comment

              • Michael Phipps

                #8
                Re: Problem installing Apache with PHP 4

                > text.html[color=blue]
                > <HTML>
                > <HEAD></HEAD>
                > <BODY>
                > <FORM METHOD=GET ACTION="text.ph p">
                > Who is your favourite author?
                > <INPUT NAME="Author" TYPE="TEXT">
                > <BR>
                > <BR>
                > <INPUT TYPE=SUBMIT>
                > </FORM>
                > </BODY>
                > </HTML>
                >
                > text.php
                > <HTML>
                > <HEAD></HEAD>
                > <BODY>
                > <FORM METHOD=GET ACTION="text.ph p">
                > Who is your favourite author?
                > <INPUT NAME="Author" TYPE="TEXT">
                > <BR>
                > <BR>
                > <INPUT TYPE=SUBMIT>
                > </FORM>
                > </BODY>
                > </HTML>[/color]

                Did you paste the wrong text for your text.php file?
                The file you have pasted is just a html file.

                Have you tried reading the online PHP Manual at http://www.php.net?


                Comment

                • JDS

                  #9
                  Re: Problem installing Apache with PHP 4

                  On Tue, 26 Jul 2005 13:01:00 +0200, Davor wrote:
                  [color=blue]
                  > it isn't working...[/color]

                  Did you post the wrong text.php file? It is identical to text.html.

                  Try this. Replace the contents of text.php with this one, single, line
                  only:

                  <?php print_r($REQUES T); ?>

                  Nothing else. Then click on the submit button in text.html

                  later...

                  --
                  JDS | jeffrey@example .invalid
                  | http://www.newtnotes.com
                  DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

                  Comment

                  Working...