Forum Moderators: coopster
-----ScriptAlias /php/ "c:/php/"
-----AddType application/x-httpd-php .php
-----AddType application/x-httpd-php .php3
----#AddType application/x-httpd-php .htm <---
----#AddType application/x-httpd-php .html <---
-----Action application/x-httpd-php "/php/php.exe"
When i remove the # in front of the htm and html lines it also happens with my HTML pages.
Example of httpd.conf:
<VirtualHost *:80>
ServerName "www.site1.nl"
DocumentRoot "C:/site1"
</virtualhost>
<virtualHost *:80>
ServerName "www.site2.nl
DocumentRoot "C:/www/site2"
</virtualhost>
In both sites i have a phpinfo.php in the root.
When I goto www.site2.nl/phpinfo.php it will somehow take the one thats located in site1.nl (I could even remove the phpinfo.php from the site2 directory and keep up getting phpinfo from site1.nl (I cleared the cache too)
I figure is has to be something the httpd.conf file or with the php.ini but i can't figure out what it is..
PHP seems to prefer to watch at the directory I set in php.ini. (which I think I can't change because of my main website)
Looks to me as if you are trying to run PHP as CGI on a Windows server and you are thinking that the incorrect site is being pulled when you request it in the address bar because you are seeing the same phpinfo(). Well, it is likely you are indeed seeing the same php configuration info from the same php.ini file.
First, if this is indeed a correct assumption, try a simpler test. Put an index file in each of your sites DocumentRoot directories, two different index files, that will let you know which <VirtualHost> container is being used. I bet you are going to see that your config is indeed hitting the two different host containers at this point.
By the way, you are missing a quotation mark in the ServerName of your second VirtualHost container there (actually, they are unnecessary unless you have spaces in your path).