PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 08-24-2004, 09:49 AM   #1
-ding-dong-
Green Mole
 
Join Date: Aug 2004
Posts: 6
Config Problem with Search on different pages.

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.
-ding-dong- is offline   Reply With Quote
Old 08-24-2004, 10:13 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
http://www.phpdig.net/forum/showthread.php?t=1106
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 08-24-2004, 11:18 AM   #3
-ding-dong-
Green Mole
 
Join Date: Aug 2004
Posts: 6
Thanks Charter,

found the problem.

My $template var was empty/null in config.php the reason was, that I assigned the value to late.

So, you have to place $template = "$relative_script_path/templates/searchbox.php";
not only before
phpdigSearch($id_connect, $query_string, $option, $refine,
$refine_url, $lim_start, $limite, $browse,
$site, $path, $relative_script_path, $template, $rssdf);


but before any include e.g.
include "$relative_script_path/includes/config.php";
include "$relative_script_path/libs/search_function.php";

So setting it at the beginning of my page solved the problem.

Cheers :-)
-ding-dong- is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with config.php with line 109 CDD Troubleshooting 0 11-21-2006 09:15 AM
config of search tool/blank results page jag7720 Troubleshooting 1 06-26-2006 10:22 AM
Spider problem, Search mb_ereg_replace problem. (Fixed?!) cpeter Troubleshooting 0 02-24-2006 02:56 PM
Too few pages indexed, Umlaut problem salzbermat Troubleshooting 4 12-16-2004 11:00 AM
Search all indexed pages in search.php nightrat How-to Forum 1 09-14-2004 04:52 AM


All times are GMT -8. The time now is 02:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.