2002-09-16 06:33:53 +00:00
|
|
|
# On some PHP servers it may help if this file is copied
|
2002-09-16 07:08:33 +00:00
|
|
|
# to the main moodle directory and renamed .htaccess
|
2002-09-16 06:33:53 +00:00
|
|
|
#
|
2009-11-01 16:48:45 +00:00
|
|
|
# As soon as you do this, check your web site. Is it
|
2002-09-25 12:33:21 +00:00
|
|
|
# still working OK? If you are getting a "configuration
|
|
|
|
# error" then you may need to enable overrides by editing
|
|
|
|
# the main httpd.conf for Apache and in the main server
|
|
|
|
# or virtual server area, adding something like:
|
|
|
|
#
|
|
|
|
# <Directory /web/moodle>
|
2009-11-01 16:48:45 +00:00
|
|
|
# AllowOverride All
|
2002-09-25 12:33:21 +00:00
|
|
|
# </Directory>
|
|
|
|
#
|
2003-03-10 13:39:56 +00:00
|
|
|
|
|
|
|
### Firstly, if you are using Apache 2, you need the following
|
2009-11-01 16:48:45 +00:00
|
|
|
### three lines to allow Apache to pass a PATH_INFO variable
|
2003-03-10 13:39:56 +00:00
|
|
|
### correctly for URLs like http://server/file.php/arg1/arg2
|
|
|
|
|
|
|
|
<IfDefine APACHE2>
|
|
|
|
AcceptPathInfo on
|
|
|
|
</IfDefine>
|
|
|
|
|
2003-03-10 14:02:12 +00:00
|
|
|
### Secondly, you can define the default files in the Moodle
|
|
|
|
### directories as follows:
|
2003-03-10 13:39:56 +00:00
|
|
|
|
2003-03-10 14:02:12 +00:00
|
|
|
DirectoryIndex index.php index.html index.htm
|
|
|
|
|
|
|
|
### Thirdly, set up some PHP variables that Moodle needs
|
2002-09-25 12:33:21 +00:00
|
|
|
|
2008-06-13 09:14:41 +00:00
|
|
|
php_flag magic_quotes_gpc 0
|
2005-11-14 22:58:02 +00:00
|
|
|
php_flag magic_quotes_runtime 0
|
|
|
|
php_flag register_globals 0
|
2003-05-19 02:25:11 +00:00
|
|
|
php_flag file_uploads 1
|
|
|
|
php_flag short_open_tag 1
|
|
|
|
php_flag session.auto_start 0
|
|
|
|
php_flag session.bug_compat_warn 0
|
2002-09-25 12:33:21 +00:00
|
|
|
|
2003-05-15 11:15:55 +00:00
|
|
|
### Fourthly, sometimes Apache limits the size of uploaded files
|
|
|
|
### (this is a separate limit to the one in PHP, see below).
|
|
|
|
### The setting here turns off this limitation
|
|
|
|
|
|
|
|
LimitRequestBody 0
|
|
|
|
|
2003-03-10 14:02:12 +00:00
|
|
|
|
2009-11-01 16:48:45 +00:00
|
|
|
### These are optional - you may not want to override php.ini
|
2003-01-28 02:28:17 +00:00
|
|
|
### To enable them, remove the leading hash (#)
|
2002-09-25 12:33:21 +00:00
|
|
|
|
2002-09-16 06:33:53 +00:00
|
|
|
#php_value upload_max_filesize 2M
|
|
|
|
#php_value post_max_size 2M
|
2003-01-28 02:28:17 +00:00
|
|
|
#php_value session.gc_maxlifetime 7200
|
2002-09-25 12:33:21 +00:00
|
|
|
|
2002-09-25 16:33:54 +00:00
|
|
|
|
2009-11-01 16:48:45 +00:00
|
|
|
### You can change the following line to point to the
|
|
|
|
### error/index.php file in your Moodle distribution.
|
|
|
|
### It provides a form which emails you (the admin)
|
2003-03-10 14:02:12 +00:00
|
|
|
### about 404 errors (URL not found).
|
2002-09-25 12:33:21 +00:00
|
|
|
|
|
|
|
#ErrorDocument 404 http://example.org/moodle/error/index.php
|
2004-05-08 14:02:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
### People have reported that these can help in some cases
|
|
|
|
### (unusual) when you see errors about undefined functions
|
|
|
|
|
|
|
|
#php_value auto_prepend_file none
|
|
|
|
#php_value include_path .
|
|
|
|
|
|
|
|
|