SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2001
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Netscape under linux not presenting PHP pages

    Hi,

    I just installed RedHat Linux 7.1 on a laptop, hoping to make a complete web development environment. I've got MySQL and PHP loaded and running with Apache, but funny thing, the following little test script (called test.php) presents itself differently to different browsers.

    <HTML><BODY>Hello, world!
    <?php
    echo ("PHP says hi, too!");
    ?>
    </BODY></HTML>

    When I call up this file in the Netscape browser running on the Linux server itself, all I see is "Hello, world!" When I view the source from that browser, I see the PHP tags and echo line, but the PHP isn't being processed.

    However, when I call up test.php on a networked Win98 PC, either from IE or Netscape, the PHP lines work just fine (PHP's greeting is also presented), and the source view looks like plain HTML, which is what I want, of course.

    Question is, why won't the Linux Netscape version show me the PHP page as it should be? Or, alternatively, anybody know of a different browser running on linux that will present the PHP pages as intended? I'd really, really like to stop doing Windows entirely, which means I need a way to view my work in a Linux browser.

    Thanks a bunch,
    Susanna

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How are you trying to access on the laptop? through http://localhost or through File > Open you need to access it through http://localhost. It is almost all the time not a browser issue, since PHP happens on the server not in the client.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Member
    Join Date
    Jun 2001
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cat Freddy is well trained indeed! Thank him for me.

    http://localhost/etc. did it!

    Sweet relief. (I just couldn't figure why the server was apparently sending different source to different browsers. Guess that ol' http:// actually means something, huh?)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •