-ding-dong-
08-24-2004, 08:49 AM
Hi,
first of all this is a cool software. I always have searched for it and have found now a good solution for my template generated site.
I installed everything and it works just fine out of the original directory.
But I need the search page in different directories and I like to have the whole phpdig dir outsite the apache htdocs path (for security).
Here is the setup:
DocRoot: c:/apache/htdocs
phpdig Home: c:/apache/search
Search page: c:/apache/htdocs/home/search.php
So I read the thread http://www.phpdig.net/forum/showthread.php?t=839 and configured the following.
$relative_script_path = '../../search';
I deleted the line in config.php and added it in c:/apache/htdocs/home/search.php
$template = "$relative_script_path/templates/searchbox.php";
Then I created the searchbox.php file like in the posting 839.
Now:
If I keep these lines in config.php I run into the exit().
define('ABSOLUTE_SCRIPT_PATH','C:/apache/search');
if ((!isset($relative_script_path)) || (($relative_script_path != ".") &&
($relative_script_path != "..") && ($relative_script_path != ABSOLUTE_SCRIPT_PATH))) {
// echo "\n\nPath not recognized!\n\n";
exit();
}
But if I comment out (just for testing) the block I get the error:
Unable to render template file.
Well I think I don't understand the meaning of the different config settings. What am I doing wrong?
Any help is highly appreciated.
first of all this is a cool software. I always have searched for it and have found now a good solution for my template generated site.
I installed everything and it works just fine out of the original directory.
But I need the search page in different directories and I like to have the whole phpdig dir outsite the apache htdocs path (for security).
Here is the setup:
DocRoot: c:/apache/htdocs
phpdig Home: c:/apache/search
Search page: c:/apache/htdocs/home/search.php
So I read the thread http://www.phpdig.net/forum/showthread.php?t=839 and configured the following.
$relative_script_path = '../../search';
I deleted the line in config.php and added it in c:/apache/htdocs/home/search.php
$template = "$relative_script_path/templates/searchbox.php";
Then I created the searchbox.php file like in the posting 839.
Now:
If I keep these lines in config.php I run into the exit().
define('ABSOLUTE_SCRIPT_PATH','C:/apache/search');
if ((!isset($relative_script_path)) || (($relative_script_path != ".") &&
($relative_script_path != "..") && ($relative_script_path != ABSOLUTE_SCRIPT_PATH))) {
// echo "\n\nPath not recognized!\n\n";
exit();
}
But if I comment out (just for testing) the block I get the error:
Unable to render template file.
Well I think I don't understand the meaning of the different config settings. What am I doing wrong?
Any help is highly appreciated.