Configuring Virtual Host php directives
Posted by: msteudel (---.hsd1.or.comcast.net)
Date: March 24, 2008 08:14PM

I'm trying to add the following ot my virtual host:

<Directory C:\wamp\www\directory.com\>
php_value include_path .:C:\wamp\www\directory.com\inc\
php_value auto_prepend_file C:\wamp\www\directory.com\inc\site_prepend.php
php_value auto_append_file C:\wamp\www\directory.com\inc\site_append.php
</Directory>

Also the directive is using : to seperate paths, I'm assuming the c: breaks the include path, what alternatives can I use? Also the auto_prepend doesn't work in the virtual host but it does work when I add it to the php.ini file, am I setting this wrong?

I'm running wamp.1.7.2, does the apache version that's included take these types of directives

Thanks, Mark

Options: ReplyQuote
Re: Configuring Virtual Host php directives
Posted by: yfastud (Moderator)
Date: March 24, 2008 09:34PM

Please, check Setup Virtual Host guide on my personal website to get the idea

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Configuring Virtual Host php directives
Posted by: msteudel (---.hsd1.or.comcast.net)
Date: March 24, 2008 10:42PM

Thanks, I checked it out, but I didn't see any examples of setting up Directory specific options like I have above.

e.g.

<VirtualHost *:80>
ServerName domain.com
ServerAdmin webmaster@localhost
DocumentRoot C:\wamp\www\domain.com\domain.migration.zend.com\tuney\htdocs

<Directory c:/wamp/www/domain.com>
A bunch of directives here
</Directory>
</VirtualHost>



Edited 1 time(s). Last edit at 03/24/2008 10:42PM by msteudel.

Options: ReplyQuote
Re: Configuring Virtual Host php directives
Posted by: yfastud (Moderator)
Date: March 25, 2008 12:45AM

Oh, I'm sorry Mark. My guides are for new wamp users, not for you

Anyway, you're missing double quote in your directory as follows:

<Directory "c:/wamp/www/domain.com">

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Configuring Virtual Host php directives
Posted by: Zaphod (---.cmbg.cable.ntl.com)
Date: March 26, 2008 11:08PM

...I am not convinced that quotes are needed around the path Mark provided. Mark did not tell us which apache and PHP versions he has selected? That might help if we are to get an answer (I am trying to do something similar myself, but with no luck)... Any possibility that there are server log msgs during start-up that we can analyze to get virtual host setup debugged?

Options: ReplyQuote
Re: Configuring Virtual Host php directives
Posted by: yfastud (Moderator)
Date: March 27, 2008 04:24AM

Yep, I think you're right, and I just notice something:

php_value include_path ".:.." # Unix path
php_value include_path ".;.." # Windows path

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Configuring Virtual Host php directives
Posted by: msteudel (---.hsd1.wa.comcast.net)
Date: March 27, 2008 08:36PM

Hey guys,

php 5.2.3
apache 2.2.4

Mark

Options: ReplyQuote
Re: Configuring Virtual Host php directives
Posted by: msteudel (---.hsd1.wa.comcast.net)
Date: March 27, 2008 08:37PM

Oh and I tried both : and ;

MS

Options: ReplyQuote
Re: Configuring Virtual Host php directives
Posted by: msteudel (---.hsd1.wa.comcast.net)
Date: April 01, 2008 07:43PM

FYI I ended up getting this working by sticking these directives in a .htaccess file ...

Options: ReplyQuote
Re: Configuring Virtual Host php directives
Posted by: msteudel (---.hsd1.wa.comcast.net)
Date: April 01, 2008 07:44PM

Oh without the <Directory PATH> style, just

php_value auto_prepend_file C:\wamp\www\domain.com\prepend.php

Options: ReplyQuote


Sorry, only registered users may post in this forum.