PHP does not work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rorybarrett
    New Member
    • Jan 2008
    • 5

    #1

    PHP does not work

    Hello PHP erxperts

    I expect this is a really stupid question to bother you with. I am a complete beginner with PHP. I have had a lot of experience with java and javascript and am a pretty good programmer although my database skills need attention.

    I installed a program called XAMPP which I downloaded from apache and in the first 'hello world' program I got from a tutorial was told to put the following program in the conf file which contains the file httpd.conf.
    [code=php]
    <html>
    <head>
    <title>PHP Test</title>
    </head>
    <body>
    <?php echo '<p>Hello World</p>'; ?>
    </body>
    </html>
    [/code]
    I was told then to type



    into the program open dialogue of my browser which is IE explorer.

    Sadly when I did this all I got was an error message.

    Any ideas ?

    Rory Barrett
    Last edited by Atli; Jan 18 '08, 10:53 PM. Reason: Added [code] tags.
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    You need to put it in the htdocs folder.

    Comment

    • rorybarrett
      New Member
      • Jan 2008
      • 5

      #3
      Originally posted by markusn00b
      You need to put it in the htdocs folder.
      Thanks. I'll try that tomorrow.

      Rory Barrett

      Comment

      • rorybarrett
        New Member
        • Jan 2008
        • 5

        #4
        Originally posted by rorybarrett
        Thanks. I'll try that tomorrow.

        Rory Barrett
        It certainly worked. Thanks for that. Why did the tutorial say to put in same folder as document_root, were they wrong ?

        Rory Barrett

        Comment

        • Atli
          Recognized Expert Expert
          • Nov 2006
          • 5062

          #5
          Hi Rory.

          The document_root should point to the htdocs folder (or any other folder you choose as your root), where all items you want accessible through the Apache server should be.

          What is the document_root for you server?

          Comment

          • rorybarrett
            New Member
            • Jan 2008
            • 5

            #6
            Originally posted by Atli
            Hi Rory.

            The document_root should point to the htdocs folder (or any other folder you choose as your root), where all items you want accessible through the Apache server should be.

            What is the document_root for you server?
            I'll have to get back to you on this.

            Rory

            Comment

            Working...