I'm trying to set an Alias in Apache to use for PHP files where all my PHP scripts reside. Usually, we write:
Alias /php-bin/ "/var/www/php-bin/"
Unfortunately this doesn't work for PHP:
<?php require /php-bin/file.php; ?>
Apache still understands the Alias (I made some tests), PHP however doesn't find the Alias the way it's supposed to.
I use PHP as an Apache module and not as a CGI. Anyone got a clue?
SOLUTION
Either use include_path setting in php.ini or symlink the directory so that the require function in PHP will find the files without using the Apache Alias. The last solution would in my case above include creating a new folder in my filesystem named /php-bin and then symlink it to /var/www/php-bin.