View Single Post
Old 20th March 2013, 14:39
trigar trigar is offline
Junior Member
Join Date: Jun 2006
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts

Originally Posted by till View Post
There are sevarl options to get that path, e.g. in php:



Thanks Till, but I am using Perl not PHP. Using the equivalent realpath command in Perl...

use Cwd 'realpath';
my $dir = realpath("../private");
print $dir;
... returns "/private", which is not correct or usable, as it would require private to be a subdir off the web root. Whether this is a Perl issue, or something peculiar to ISPConfig, I have no idea.

Originally Posted by till View Post
Or if your scripts are working correctly with symlinks (which should be ok in most cases), then use:

Which works, but would need hardcoding into every script on every site. I need a way of programmatically calculating the path to the private directory.
Chris Roberts
Reply With Quote