diff --git a/include/items.php b/include/items.php
index 88eec1dc4..a28e19a05 100644
--- a/include/items.php
+++ b/include/items.php
@@ -24,7 +24,8 @@ use Friendica\Util\ParseUrl;
use Friendica\Util\Strings;
use Friendica\Util\Temporal;
-require_once 'mod/share.php';
+require_once __DIR__ . '/../mod/share.php';
+
function add_page_info_data(array $data, $no_photos = false)
{
Hook::callAll('page_info_data', $data);
diff --git a/src/BaseObject.php b/src/BaseObject.php
index 4a6fa12d2..7e90478a9 100644
--- a/src/BaseObject.php
+++ b/src/BaseObject.php
@@ -4,7 +4,7 @@
*/
namespace Friendica;
-require_once 'boot.php';
+require_once __DIR__ . '/../boot.php';
use Friendica\Network\HTTPException\InternalServerErrorException;
diff --git a/src/Render/FriendicaSmartyEngine.php b/src/Render/FriendicaSmartyEngine.php
index 69a34ae56..36e46435f 100644
--- a/src/Render/FriendicaSmartyEngine.php
+++ b/src/Render/FriendicaSmartyEngine.php
@@ -17,7 +17,7 @@ class FriendicaSmartyEngine implements ITemplateEngine
public function __construct()
{
- if (!is_writable('view/smarty3/')) {
+ if (!is_writable(__DIR__ . '/../../view/smarty3/')) {
echo "ERROR: folder view/smarty3/ must be writable by webserver.";
exit();
}