Connecting Tech Pros Worldwide Help | Site Map

PHP not working with Apache virtual hosts

Bob
Guest
 
Posts: n/a
#1: Dec 13 '05
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
Guest
 
Posts: n/a
#2: Dec 13 '05

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
http://www.heddesheimer.de/coaching/
Java Boy
Guest
 
Posts: n/a
#3: Dec 14 '05

re: PHP not working with Apache virtual hosts


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

--
Geeks Home
www.fahimzahid.com




"Bob" <bdushok@luzerne.edu> wrote in message
news:1134488758.960200.14160@g14g2000cwa.googlegro ups.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]


Bob
Guest
 
Posts: n/a
#4: Dec 19 '05

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

Bob
Guest
 
Posts: n/a
#5: Dec 19 '05

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

Marian Heddesheimer
Guest
 
Posts: n/a
#6: Dec 19 '05

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
Bob
Guest
 
Posts: n/a
#7: Dec 20 '05

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

Marian Heddesheimer
Guest
 
Posts: n/a
#8: Dec 20 '05

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
Closed Thread