[PHP] NameVirtualHost breaks PHP

2002-04-28 Thread Greg Blakely

Hello.  

I'm new to this list, though not new to PHP.  I'm hoping that my
question hasn't been answered a thousand times before, and I did at
least search on NameVirtualHost and read all those archived messages
before getting to this point.

I have an Apache web server (1.0.38) that has been peacefully
co-existing with php4 for quite some time.  I've interfaced it to mySQL,
and life was great.

Then, I came up with the brilliant idea to used Named Virtual Hosts
rather than using up all my IP addresses.  I did all according to the
instructions I had, and the virtual part of things worked fine.
www.hostone.net showed its proper page, as did www.hosttwo.net. 

But  It broke php.  When I go to a php page now, it show's the code
rather than executing it.  I've verified that this behavior happens
across all the web pages, incuding the main one that isn't
virtualized.

Can anyone point me in the right direction?

Thanks in advance.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] NameVirtualHost breaks PHP

2002-04-28 Thread Greg Blakely

Jason Wong asked:

 Apache 1.0.38  How old is that? If you're really using such an old

 version you should first upgrade to something modern (1.3.X or the
2.0.X 
 series).

My bad.  I queried the wrong httpd (/bin/httpd rather than /sbin/httpd).

It's really 1.3.20

If I'd given it much thought, I'd have recognized the error.  

Oh, well.  Chalk it up to Sunday morning brain slips.

  -Greg-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] NameVirtualHost breaks PHP

2002-04-28 Thread Greg Blakely

Frenck advised:

 add this to your virutalhost tag:

 AddType application/x-httpd-php .php

I did, and now browsers ask me if I want to download index.php...

Do I need to activate the php module?  I wonder why it worked before the
NameVirtualHost, and now it doesn't...





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: NameVirtualHost breaks PHP

2002-04-28 Thread Greg Blakely

Yuri Petro asked:




 Can you indicate Apache settings regarding php and virtualhosts?

In the main server configuration area, I have:

# The following is for PHP4 (conficts with PHP/FI, below):
IfModule mod_php4.c
  AddType application/x-httpd-php .php4 .php3 .phtml .php
  AddType application/x-httpd-php-source .phps
/IfModule

# The following is for PHP3:
IfModule mod_php3.c
  AddType application/x-httpd-php3 .php3
  AddType application/x-httpd-php3-source .phps
/IfModule

# The following is for PHP/FI (PHP2):
IfModule mod_php.c
  AddType application/x-httpd-php .phtml
/IfModule

### and the, further on down, there is:

NameVirtualHost *

### and then, under the VirtualHost area, I have:

VirtualHost *
Port 80
AddType application/x-httpd-php .php4 .php3 .phtml .php
AddType application/x-httpd-php-source .phps
ServerAdmin [EMAIL PROTECTED]   
DocumentRoot /home/tcrc/www/forum
ServerName forum.tcrconline.com
ErrorLog /home/tcrc/logs/error_log
CustomLog /home/tcrc/logs/access_log combined
/VirtualHost

###

### By the way, I tried it with and without the AddType statements in
the VirtualHost area.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php