login community faq

To set properly the document root when multiple webapps resides under the same websites, according to http://docs.webfaction.com/software/php.html#setting-php-s-document-root we need to:

1
2
1- Create a file that will set properly $_SERVER['DOCUMENT_ROOT'] (set_document_root.php)
2- Add the auto_prepend_file directive in php.ini

Question: Do we need also to modify $_ENV['DOCUMENT_ROOT'] ?

asked Jul 29 '12 at 13:15

Boozezela's gravatar image

Boozezela
11

edited Jul 30 '12 at 02:13


The settings are independent. If you also need $_ENV['DOCUMENT_ROOT'], add to the set_document_root.php file like this:

1
2
3
4
<?php
  $_SERVER['DOCUMENT_ROOT'] = '/home/username/webapps/example_application';
  $_ENV['DOCUMENT_ROOT'] = '/home/username/webapps/example_application';
?>

answered Jul 29 '12 at 14:37

timg's gravatar image

timg ♦♦
4714

Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×147
×5

Asked: Jul 29 '12 at 13:15

Seen: 787 times

Last updated: Jul 30 '12 at 02:13

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited