From f03a795de75b99332c6315ea36ff452f7b32ca6a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov <fox@madoka.volgo-balt.ru> Date: Thu, 15 Dec 2011 18:19:10 +0400 Subject: [PATCH] include path fix for lighttpd --- backend.php | 3 ++- db-updater.php | 3 ++- digest.php | 3 ++- errors.php | 3 ++- image.php | 3 ++- index.php | 3 ++- localized_js.php | 3 ++- opml.php | 3 ++- prefs.php | 3 ++- public.php | 3 ++- register.php | 3 ++- twitter.php | 3 ++- update.php | 3 ++- update_daemon2.php | 3 ++- 14 files changed, 28 insertions(+), 14 deletions(-) diff --git a/backend.php b/backend.php index 92a91ef91..1805ce360 100644 --- a/backend.php +++ b/backend.php @@ -1,5 +1,6 @@ <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); /* remove ill effects of magic quotes */ diff --git a/db-updater.php b/db-updater.php index 63c3c647a..e0900828c 100644 --- a/db-updater.php +++ b/db-updater.php @@ -1,5 +1,6 @@ <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); require_once "functions.php"; require_once "sessions.php"; diff --git a/digest.php b/digest.php index 74a0c566d..c5b3c34c6 100644 --- a/digest.php +++ b/digest.php @@ -1,5 +1,6 @@ <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); require_once "functions.php"; require_once "sessions.php"; diff --git a/errors.php b/errors.php index 802947d98..a18d540bd 100644 --- a/errors.php +++ b/errors.php @@ -1,5 +1,6 @@ <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); require_once "functions.php"; diff --git a/image.php b/image.php index 210bbc2f7..3a2a0d1c5 100644 --- a/image.php +++ b/image.php @@ -1,5 +1,6 @@ <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); require_once "config.php"; require_once "lib/simplepie/simplepie.inc"; diff --git a/index.php b/index.php index 3096cd2cd..d08afa6ef 100644 --- a/index.php +++ b/index.php @@ -5,7 +5,8 @@ exit; } - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) ."/include"); require_once "functions.php"; require_once "sessions.php"; diff --git a/localized_js.php b/localized_js.php index 1cf38e573..24846a320 100644 --- a/localized_js.php +++ b/localized_js.php @@ -1,5 +1,6 @@ <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); define('DISABLE_SESSIONS', true); diff --git a/opml.php b/opml.php index b6fd6eb2a..feccfaa35 100644 --- a/opml.php +++ b/opml.php @@ -1,5 +1,6 @@ <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); require_once "functions.php"; require_once "sessions.php"; diff --git a/prefs.php b/prefs.php index 52be2a7a6..21a72cfd1 100644 --- a/prefs.php +++ b/prefs.php @@ -1,5 +1,6 @@ <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); require_once "functions.php"; require_once "sessions.php"; diff --git a/public.php b/public.php index 598f78c78..8ffc83224 100644 --- a/public.php +++ b/public.php @@ -1,5 +1,6 @@ <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); /* remove ill effects of magic quotes */ diff --git a/register.php b/register.php index d63fc251a..4107a2eac 100644 --- a/register.php +++ b/register.php @@ -4,7 +4,8 @@ // 1) templates/register_notice.txt - displayed above the registration form // 2) register_expire_do.php - contains user expiration queries when necessary - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); require_once 'lib/phpmailer/class.phpmailer.php'; diff --git a/twitter.php b/twitter.php index ab9e57a45..c09d8fda4 100644 --- a/twitter.php +++ b/twitter.php @@ -1,5 +1,6 @@ <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); require_once "functions.php"; require_once "sessions.php"; diff --git a/update.php b/update.php index 8cca3daa0..28bcb3d1e 100755 --- a/update.php +++ b/update.php @@ -1,6 +1,7 @@ #!/usr/bin/php <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); define('DISABLE_SESSIONS', true); diff --git a/update_daemon2.php b/update_daemon2.php index 6b9d9246f..c55a8aaae 100755 --- a/update_daemon2.php +++ b/update_daemon2.php @@ -1,6 +1,7 @@ #!/usr/bin/php <?php - set_include_path(get_include_path() . PATH_SEPARATOR . "include"); + set_include_path(get_include_path() . PATH_SEPARATOR . + dirname(__FILE__) . "/include"); // This is an experimental multiprocess update daemon. // Some configurable variable may be found below. -- GitLab