PHP not working with Apache virtual hosts

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

    PHP not working with Apache virtual hosts

    I'm using PHP 5.1.1 with Apache 2.0.54 and several virtual hosts. PHP
    is installed as a module.

    I've created a very simple test page containing <?php phpinfo(); ?> and
    placed it at the doc root of three of my hosts. The main site hosted
    by Apache executes the page perfectly and displays the expected output.
    None of my virtual hosts, however, will execute the page. The virtual
    hosts attempt to load the page for a long time, then timeout. No
    errors are placed into my log files.

    Does anyone have any suggestions as to what might be the problem?

    Thanks,
    Bob

  • Marian Heddesheimer

    #2
    Re: PHP not working with Apache virtual hosts

    On 13 Dec 2005 07:45:59 -0800, Bob wrote:
    [color=blue]
    > None of my virtual hosts, however, will execute the page. The virtual
    >hosts attempt to load the page for a long time, then timeout. No[/color]

    are the virtual hosts working with normal html files?

    One of my favorite errors is forgetting to put the virtual host
    domains in the local hosts table. This could be one reason why they
    time out.

    Marian

    --
    Kostenlose Tipps und Tricks zu PHP und MySQL
    Da ich mich seit einiger Zeit aus der Programmierung von Websites zurückgezogen habe, sind meine Tutorials und Schulungsinhalte nicht mehr länger verfügbar, da sie inzwischen veraltet sind.

    Comment

    • Java Boy

      #3
      Re: PHP not working with Apache virtual hosts

      make sure you are not putting some unresolvable host in virtual host?

      --
      Geeks Home





      "Bob" <bdushok@luzern e.edu> wrote in message
      news:1134488758 .960200.14160@g 14g2000cwa.goog legroups.com...[color=blue]
      > I'm using PHP 5.1.1 with Apache 2.0.54 and several virtual hosts. PHP
      > is installed as a module.
      >
      > I've created a very simple test page containing <?php phpinfo(); ?> and
      > placed it at the doc root of three of my hosts. The main site hosted
      > by Apache executes the page perfectly and displays the expected output.
      > None of my virtual hosts, however, will execute the page. The virtual
      > hosts attempt to load the page for a long time, then timeout. No
      > errors are placed into my log files.
      >
      > Does anyone have any suggestions as to what might be the problem?
      >
      > Thanks,
      > Bob
      >[/color]


      Comment

      • Bob

        #4
        Re: PHP not working with Apache virtual hosts

        Marian,

        Thanks for the reply.

        The virtual domains were not in the host file, but I've just added
        them. No change, PHP still doesn't work.

        The virtual hosts are serving normal HTML files fine.

        Bob

        Comment

        • Bob

          #5
          Re: PHP not working with Apache virtual hosts

          Thanks for the reply.

          I have a fifteen virtual hosts and have verified each resolves
          properly. I've just added each to the local host file as well.

          Still no luck, PHP only executes properly from my first host.

          Bob

          Comment

          • Marian Heddesheimer

            #6
            Re: PHP not working with Apache virtual hosts

            On 19 Dec 2005 08:32:57 -0800, Bob wrote:
            [color=blue]
            >The virtual hosts are serving normal HTML files fine.[/color]

            can you check what source code the PHP-Files give back?

            Is it just a blank text or is the php-code shown in the source like
            <?php phpinfo(); ?>

            Remark: The source code may not be shown in the browser, you have to
            go to "Show Source" from the browser menu to see it properly.

            Marian

            --
            http://www.lernpilot.de/blog/ (das Weblog)
            Alles zum Thema Lernen

            Comment

            • Bob

              #7
              Re: PHP not working with Apache virtual hosts

              Marian,
              Nothing is actually returned, the page just attempts to load
              forever. If you have a chance, try hitting
              http://depts.luzerne.edu/phptest.php. This is the simple page
              containing <?php phpinfo(); ?> which I had mentioned.

              Bob

              Comment

              • Marian Heddesheimer

                #8
                Re: PHP not working with Apache virtual hosts

                Hi Bob,

                On 20 Dec 2005 04:51:54 -0800, Bob wrote:
                [color=blue]
                >Marian,
                > Nothing is actually returned, the page just attempts to load
                >forever. If you have a chance, try hitting
                >http://depts.luzerne.edu/phptest.php. This is the simple page
                >containing <?php phpinfo(); ?> which I had mentioned.[/color]


                that's strange. How did you install PHP on Apache? As CGI or as
                Module?

                Marian

                --
                http://www.lernpilot.de/blog/ (das Weblog)
                Alles zum Thema Lernen

                Comment

                Working...