View Single Post
  #3  
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
Default

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

realpath('../provate');

or

realpath('/var/www/domain.tld/private');
Thanks Till, but I am using Perl not PHP. Using the equivalent realpath command in Perl...

Code:
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.

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

/var/www/domain.tld/private/
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