PHP not working for virtual hosts

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PHP not working for virtual hosts

Postby zdotman64 » 03. December 2010 05:48

Hi everyone, hoping I can get some help. I've been trying to figure this out by myself all day :(

I installed XAMPP to E:\xampp, but I want to be able to create virtual hosts for projects in other locations on this drive, and possibly other drives. So I created a virtual host with the document root "E:\Projects\jQueryPHPTest"

It works fine, except the php doesn't work. It doesn't process it at all. In fact if you go to the source of a php document (from the browser) you can still see the <? tags

Here is my virtual host directive:

<VirtualHost adam.test.project1.com>
ServerName test
Options All ExecCGI
DocumentRoot "E:/Projects/jQueryPHPTest"
DirectoryIndex index.html index.php
<Directory "E:/Projects/jQueryPHPTest">
Options All
Order Allow,Deny
Allow from All
</Directory>
</VirtualHost>

I'm on Windows 7 x64. I have UAC turned off so everything runs as administrator.

Any help would really be appreciated. Thanks guys
zdotman64
 
Posts: 2
Joined: 03. December 2010 05:39

Re: PHP not working for virtual hosts

Postby Altrea » 03. December 2010 07:52

zdotman64 wrote:In fact if you go to the source of a php document (from the browser) you can still see the <? tags

<? Tags? Do you use short_open_tags? If yes, have you enabled the short:open_tags option in your php.ini?
Or even better use <?php Tags instead of <? Tags
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: PHP not working for virtual hosts

Postby zdotman64 » 03. December 2010 20:23

That was it. Well, I feel like an idiot.

Thanks a lot for the help! :)
zdotman64
 
Posts: 2
Joined: 03. December 2010 05:39


Return to XAMPP for Windows

Who is online

Users browsing this forum: xamchqh and 237 guests