Can't make php to work with apache in xp

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

    Can't make php to work with apache in xp

    I have recently installed php, mysql and apache on xp. Apache worked
    fine right from the start - so did mysql also. php on the other hand
    does not work at all. doing the phpinfo thing or just an echo only
    returns a blank page. Something tells me that configuring php is quite
    a pain in the a**. I've done everything from editing the httpd file
    and the php.ini file, to copying it and the php5ts.dll file to the
    systems folder. I've even tried both methods for installing: module
    and cgi based. Any help is appreciated. BTW I've also searched the net
    rigorously and done all of the recommended things - none worked for me
    though.
    Sincerely Kasper
  • Andy Hassall

    #2
    Re: Can't make php to work with apache in xp

    On Mon, 19 Dec 2005 00:15:24 +0100, Kasper Lindvig <kasperpenge@te le2adsl.dk>
    wrote:
    [color=blue]
    >I have recently installed php, mysql and apache on xp. Apache worked
    >fine right from the start - so did mysql also. php on the other hand
    >does not work at all. doing the phpinfo thing or just an echo only
    >returns a blank page. Something tells me that configuring php is quite
    >a pain in the a**. I've done everything from editing the httpd file
    >and the php.ini file, to copying it and the php5ts.dll file to the
    >systems folder. I've even tried both methods for installing: module
    >and cgi based. Any help is appreciated. BTW I've also searched the net
    >rigorously and done all of the recommended things - none worked for me
    >though.[/color]

    The instructions on:



    ... do work. You've only given vague indications as to what you've done, so
    all that can be said is abandon what you've done and start again, following all
    the instructions step by step.

    You said you copied files to the Windows system folder; find them, and remove
    them before you start again. It is bad practice to do this, and it'll only
    confuse things when you find old DLLs get put first in the library path.

    --
    Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
    http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

    Comment

    • Kasper Lindvig

      #3
      Re: Can't make php to work with apache in xp

      Hello
      I have finally made it work!
      I followed the instructions in the document linked to below and
      miraculously it worked. Apparently it was php.ini and httpd.conf
      settings that was totally wrong in the manual, which the page below
      did not have. I sure hope they fix that install.txt file to that one
      below, as it sure causes one a lot of headache.



      Sicerely Kasper

      On Sun, 18 Dec 2005 23:45:47 +0000, Andy Hassall <andy@andyh.co. uk>
      wrote:
      [color=blue]
      >On Mon, 19 Dec 2005 00:15:24 +0100, Kasper Lindvig <kasperpenge@te le2adsl.dk>
      >wrote:
      >[color=green]
      >>I have recently installed php, mysql and apache on xp. Apache worked
      >>fine right from the start - so did mysql also. php on the other hand
      >>does not work at all. doing the phpinfo thing or just an echo only
      >>returns a blank page. Something tells me that configuring php is quite
      >>a pain in the a**. I've done everything from editing the httpd file
      >>and the php.ini file, to copying it and the php5ts.dll file to the
      >>systems folder. I've even tried both methods for installing: module
      >>and cgi based. Any help is appreciated. BTW I've also searched the net
      >>rigorously and done all of the recommended things - none worked for me
      >>though.[/color]
      >
      > The instructions on:
      >
      > http://www.php.net/manual/en/install...ws.apache2.php
      >
      > ... do work. You've only given vague indications as to what you've done, so
      >all that can be said is abandon what you've done and start again, following all
      >the instructions step by step.
      >
      > You said you copied files to the Windows system folder; find them, and remove
      >them before you start again. It is bad practice to do this, and it'll only
      >confuse things when you find old DLLs get put first in the library path.[/color]

      Comment

      • Andy Hassall

        #4
        Re: Can't make php to work with apache in xp

        On Mon, 19 Dec 2005 18:28:11 +0100, Kasper Lindvig <kasperpenge@te le2adsl.dk>
        wrote:
        [color=blue]
        >I followed the instructions in the document linked to below and
        >miraculously it worked. Apparently it was php.ini and httpd.conf
        >settings that was totally wrong in the manual, which the page below
        >did not have. I sure hope they fix that install.txt file to that one
        >below, as it sure causes one a lot of headache.[/color]

        Which settings are "totally wrong"? They look fine to me, both in the manual
        and in install.txt.

        Have you submitted a bug report on bugs.php.net? If you think you've found a
        problem, it won't fix itself, it needs reporting.

        --
        Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
        http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

        Comment

        • Kasper Lindvig

          #5
          Re: Can't make php to work with apache in xp

          Well first of all the install.txt file doesn't state that one has to:
          1) Uncomment and Edit session.save_pa th
          2) How to: Add C:\www\php to the System PATH
          3) Add index.php after DirectoryIndex
          4) Add AddType application/x-httpd-php-source .phps

          And secondly it doesn't say that just one php.ini file is necessary. I
          had two (on in php dir and one in windows dir). And thirdly it didn't
          say that it was windows directory and not system32 directory to put
          php5ts.dll. I had them in both. The point is that this manual works
          the other DOESN'T!!!
          And if I do some testing later and conclude my findings to be true,
          then of course I will report a bug. But that will have to be later.
          Kasper

          On Mon, 19 Dec 2005 17:36:40 +0000, Andy Hassall <andy@andyh.co. uk>
          wrote:
          [color=blue]
          >On Mon, 19 Dec 2005 18:28:11 +0100, Kasper Lindvig <kasperpenge@te le2adsl.dk>
          >wrote:
          >[color=green]
          >>I followed the instructions in the document linked to below and
          >>miraculousl y it worked. Apparently it was php.ini and httpd.conf
          >>settings that was totally wrong in the manual, which the page below
          >>did not have. I sure hope they fix that install.txt file to that one
          >>below, as it sure causes one a lot of headache.[/color]
          >
          > Which settings are "totally wrong"? They look fine to me, both in the manual
          >and in install.txt.
          >
          > Have you submitted a bug report on bugs.php.net? If you think you've found a
          >problem, it won't fix itself, it needs reporting.[/color]

          Comment

          • Jerry Stuckle

            #6
            Re: Can't make php to work with apache in xp

            Kasper Lindvig wrote:[color=blue]
            > Well first of all the install.txt file doesn't state that one has to:
            > 1) Uncomment and Edit session.save_pa th
            > 2) How to: Add C:\www\php to the System PATH
            > 3) Add index.php after DirectoryIndex
            > 4) Add AddType application/x-httpd-php-source .phps
            >
            > And secondly it doesn't say that just one php.ini file is necessary. I
            > had two (on in php dir and one in windows dir). And thirdly it didn't
            > say that it was windows directory and not system32 directory to put
            > php5ts.dll. I had them in both. The point is that this manual works
            > the other DOESN'T!!!
            > And if I do some testing later and conclude my findings to be true,
            > then of course I will report a bug. But that will have to be later.
            > Kasper
            >
            > On Mon, 19 Dec 2005 17:36:40 +0000, Andy Hassall <andy@andyh.co. uk>
            > wrote:
            >
            >[/color]

            Let's see...
            [color=blue]
            > 1) Uncomment and Edit session.save_pa th[/color]

            Only required if you're using sessions and the default save path (I
            forgot what it is - /tmp maybe?) doesn't exist.
            [color=blue]
            > 2) How to: Add C:\www\php to the System PATH[/color]
            Not required. I don't have it in my system path. But you do need to
            ensure you've set the directories properly in your php.ini file.
            [color=blue]
            > 3) Add index.php after DirectoryIndex[/color]
            Only required if you want this to be one of the default page selections.
            It's not required to make PHP work.
            [color=blue]
            > 4) Add AddType application/x-httpd-php-source .phps[/color]
            Well, yes, if you're using a non-standard extension (.php is the
            standard), you do need to add this. It's true for any non-standard
            extension.
            [color=blue]
            > And secondly it doesn't say that just one php.ini file is necessary. I
            > had two (on in php dir and one in windows dir). And thirdly it didn't
            > say that it was windows directory and not system32 directory to put
            > php5ts.dll. I had them in both. The point is that this manual works
            > the other DOESN'T!!![/color]

            Hmmm, I don't know why you'd have two copies of any file. Not true for
            just PHP - but anything.

            So far I don't see any errors in the doc. But you do need to understand
            a little of what's going on. It's not "load and go"!

            P.S. And please don't top post.

            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            • Michael Winter

              #7
              Re: Can't make php to work with apache in xp

              On 19/12/2005 21:50, Jerry Stuckle wrote:
              [color=blue]
              > Kasper Lindvig wrote:[/color]

              [snip]
              [color=blue][color=green]
              >> 4) Add AddType application/x-httpd-php-source .phps[/color]
              >
              > Well, yes, if you're using a non-standard extension (.php is the
              > standard), you do need to add this. [...][/color]

              Look a little closer. A .phps extension is 'standard' for viewing
              syntax-highlighted source code.

              As for this being omitted, it isn't. It's included in the Apache 1.3.x
              instructions, along with steps for syntax highlighting using the CGI
              binary. If the OP had searched for 'syntax' or 'highlight' in
              install.txt (a little patience would be required for the latter), he
              would have found this. Besides, since when was syntax highlighting
              (except in an editor) such an important feature?

              [snip]
              [color=blue]
              > So far I don't see any errors in the doc. But you do need to
              > understand a little of what's going on. It's not "load and go"![/color]

              Any implication otherwise is ridiculous. This is a server we're dealing
              with, not some simple desktop application.

              Mike

              --
              Michael Winter
              Prefix subject with [News] before replying by e-mail.

              Comment

              Working...