I have an apache2 server running on my Linux machine. I edited the file /etc/php5/apache2/php.ini by setting include_path to
include_path = ".:/usr/share/php:/var/www/subdir"
To make sure I did not change the wrong file, I also edited all other php.ini files (there was one more) I found on my computer and checked the output of phpinfo() which printed the correct include_path from above. (I also restarted apache2.)
However, when I use lines like
use some\name\space;
require_once('./subsubdir/file.php');
in a file start.php (which lies in another directory /var/www/subdir/anothersubdir/), the require_once command does not work, as I get the following error in the apache log file
[error] [client 127.0.0.1] PHP Fatal error: require_once(): Failed opening required './subsubdir/file.php' (include_path='.:/usr/share/php:/var/www/subdir') in /var/www/subdir/anothersubdir/start.php on line x
I also tried
require_once('/subsubdir/file.php');
but it did not work. How do I have to inlcude file.php when I have set the include_path as shown above ?
Thanks a lot in advance !