Apache Alias or ScriptAlias in use with PHP doesn't work

siirderyasi

New Member
I'm trying to set an Alias in Apache to use for PHP files where all my PHP scripts reside. Usually, we write:\[code\]Alias /php-bin/ "/var/www/php-bin/"\[/code\]Unfortunately this doesn't work for PHP:\[code\]<?php require /php-bin/file.php; ?>\[/code\]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?SOLUTIONEither 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.
 
Back
Top