Frage

Quick question.

Why do I get the following error and how can I solve it?

require_once() [function.require-once]: open_basedir restriction in effect.
File(/lib/swift_required.php) is not within the allowed path(s):
(/home/thnk/:/tmp:/var/tmp:/usr/local/lib/php/)

Thanks!

War es hilfreich?

Lösung

Problem solved. The issue was happening because I was using a wrong path for the library.

I was trying to call the library from:

/lib/swift_required.php

And it should be located somewhere like here:

$basePath = '/home/mydomain/domains/mydomain.org/public_html/myapp/';
require_once($basePath . 'system/vendor/swift/Swift/lib/swift_required.php');
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top