Don't let textpattern use __FILE__ hint. Use /var/lib/textpattern
directly instead.

diff --git a/css.php b/css.php
index db2f493..8c62f76 100644
--- a/css.php
+++ b/css.php
@@ -12,7 +12,7 @@ header('Content-type: text/css');
 
 if (!defined("txpath"))
 {
-	define("txpath", dirname(__FILE__).'/textpattern');
+	define("txpath", '/var/lib/textpattern/textpattern');
 }
 
 if (!isset($txpcfg['table_prefix']))
diff --git a/index.php b/index.php
index e2067f3..f7b47de 100644
--- a/index.php
+++ b/index.php
@@ -15,13 +15,13 @@ $LastChangedRevision: 3189 $
 
 	if (!defined('txpath'))
 	{
-		define("txpath", dirname(__FILE__).'/textpattern');
+		define("txpath", '/var/lib/textpattern/textpattern');
 	}
 
 	// save server path to site root
 	if (!isset($here))
 	{
-		$here = dirname(__FILE__);
+		$here = '/var/lib/textpattern';
 	}
 
 	// pull in config unless configuration data has already been provided (multi-headed use).
diff --git a/rpc/index.php b/rpc/index.php
index e03333e..afc4b6f 100644
--- a/rpc/index.php
+++ b/rpc/index.php
@@ -17,7 +17,7 @@ if (@ini_get('register_globals'))
 	foreach ( $_REQUEST as $name => $value )
 		unset($$name);
 
-define('txpath', dirname(dirname(__FILE__)).'/textpattern');
+define('txpath', '/var/lib/textpattern/textpattern');
 define('txpinterface','xmlrpc');
 
 require_once txpath.'/config.php';
diff --git a/sites/site1/admin/setup/index.php b/sites/site1/admin/setup/index.php
index 454b5a7..366a3e9 100644
--- a/sites/site1/admin/setup/index.php
+++ b/sites/site1/admin/setup/index.php
@@ -10,7 +10,7 @@ ob_start(NULL, 2048);
 ob_end_clean();
 
 if (!defined('txpath')) {
-	define("txpath", realpath(dirname(__FILE__).'/../../../../textpattern'));
+	define("txpath", '/var/lib/textpattern/textpattern'));
 }
 
 include txpath.'/setup/index.php';
diff --git a/sites/site1/public/index.php b/sites/site1/public/index.php
index 1098be7..959fb67 100644
--- a/sites/site1/public/index.php
+++ b/sites/site1/public/index.php
@@ -15,7 +15,7 @@ $LastChangedRevision: 3238 $
 
 	if (!defined('txpath'))
 	{
-		define("txpath", realpath(dirname(__FILE__).'/../../../textpattern'));
+		define("txpath", '/var/lib/textpattern/textpattern');
 	}
 
 	// save server path to site root
diff --git a/textpattern/css.php b/textpattern/css.php
index 2936ddd..8a8dabd 100644
--- a/textpattern/css.php
+++ b/textpattern/css.php
@@ -9,7 +9,7 @@ $LastChangedRevision: 3189 $
 
 if (!defined("txpath"))
 {
-	define("txpath", dirname(__FILE__));
+	define("txpath", '/var/lib/textpattern/textpattern');
 }
 
 require_once txpath.'/../css.php';
diff --git a/textpattern/index.php b/textpattern/index.php
index c877a07..e87ca39 100644
--- a/textpattern/index.php
+++ b/textpattern/index.php
@@ -19,7 +19,7 @@ $LastChangedRevision: 3275 $
 
 	if (!defined('txpath'))
 	{
-		define("txpath", dirname(__FILE__));
+		define("txpath", '/var/lib/textpattern/textpattern');
 	}
 
 	define("txpinterface", "admin");
@@ -65,7 +65,7 @@ $LastChangedRevision: 3275 $
 		if (empty($siteurl))
 			$siteurl = $_SERVER['HTTP_HOST'] . rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/');
 		if (empty($path_to_site))
-			updateSitePath(dirname(dirname(__FILE__)));
+			updateSitePath('/var/lib/textpattern');
 
 		define("LANG",$language);
 		//i18n: define("LANG","en-gb");
diff --git a/textpattern/publish.php b/textpattern/publish.php
index 9f86cbb..b1fefa1 100644
--- a/textpattern/publish.php
+++ b/textpattern/publish.php
@@ -19,7 +19,7 @@ $LastChangedRevision: 3258 $
 */
 
 	if (!defined('txpath'))
-		define("txpath", dirname(__FILE__));
+		define("txpath", '/var/lib/textpattern/textpattern');
 	if (!defined("txpinterface"))
 		die('If you just updated and expect to see your site here, please also update the files in your main installation directory.'.
 			' (Otherwise note that publish.php cannot be called directly.)');
@@ -65,7 +65,7 @@ $LastChangedRevision: 3258 $
 		$prefs['siteurl'] = $siteurl = $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/');
 
 	if (empty($path_to_site))
-		updateSitePath(dirname(dirname(__FILE__)));
+		updateSitePath('/var/lib/textpattern');
 
 	if (!defined('PROTOCOL')) {
 		switch (serverSet('HTTPS')) {
diff --git a/textpattern/setup/index.php b/textpattern/setup/index.php
index efcb9aa..e8aa579 100644
--- a/textpattern/setup/index.php
+++ b/textpattern/setup/index.php
@@ -15,7 +15,7 @@ $LastChangedRevision: 3193 $
 
 if (!defined('txpath'))
 {
-	define("txpath", dirname(dirname(__FILE__)));
+	define("txpath", '/var/lib/textpattern/textpattern');
 }
 
 define("txpinterface", "admin");
