From: Mikael Nordfeldth Date: Thu, 28 Jan 2016 19:31:46 +0000 (+0100) Subject: Don't use system include path X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5b11238010619be50b40a1f681d98ac611db98f2;p=quix0rs-gnu-social.git Don't use system include path Sometimes systems have _old_ DB_DataObject classes lying around that get included by default, so we just try to avoid anything that we don't ship ourselves. BeS: I'll commit a patch that will make this issue go away MMN-o: that would be awesome! but it might upset bashrc who's working on a Debian package (where you're _supposed_ to include from /usr/php etc. :P) but I'll leave a comment along with it --- diff --git a/index.php b/index.php index a4beec9e5e..de57f1078d 100644 --- a/index.php +++ b/index.php @@ -40,6 +40,12 @@ $_startTime = microtime(true); $_perfCounters = array(); +// We provide all our dependencies through our own autoload. +// This will probably be configurable for distributing with +// system packages (like with Debian apt etc. where included +// libraries are maintained through repositories) +set_include_path('.'); // mainly fixes an issue where /usr/share/{pear,php*}/DB/DataObject.php is _old_ on various systems... + define('INSTALLDIR', dirname(__FILE__)); define('GNUSOCIAL', true); define('STATUSNET', true); // compatibility