Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

New cgi/ssi problems...

Quote Reply
New cgi/ssi problems...
I have read, and tried to implement the subroutine calls for including an html file on the cgi pages. I have tried using the subroutines listed in Link2 discussions, and SQL Discussions (http://gossamer-threads.com/...=&vc=1#Post99091)

I have looked over all of the code, and it appears to be ok.

The error I get is: Can't find file: /usr/local/etc/httpd/vhosts/lessonplansearch.com/htdocs/cgi-bin/admin/templates/file

Problem is: I have set the root path as being: /usr/local/etc/httpd/vhosts/lessonplansearch.com/htdocs/ssi (not the one that it is looking in - I have no idea how it is getting that path)

I had it working when I was using Links2, but with SQL, I am having difficulty.

Thank for any help!!

Chad

Quote Reply
Re: New cgi/ssi problems... In reply to
Please provide all the codes you have added. The error message only indicates that you have probably not configured a variable somewhere or you have hacked the codes incorrectly.

Regards,

Eliot Lee

Quote Reply
Re: New cgi/ssi problems... In reply to
I added the codes EXACTLY as they are at the url I put above.

In Links.pm:
# Path where included files are located
# NO Trailing Slash
$LINKS{db_files_path} = "/usr/local/etc/httpd/vhosts/lessonplansearch.com/htdocs/ssi";

# Included file name
$LINKS{includefile} = "left.htm";


In HTML_Templates.pm:
sub include_file {
# -----------------------------------
# This is a list of patterns to the appropriate shtml page to load.
open (INC, "$LINKS{db_files_path}/$LINKS{includefile}") or return "Can't find include file: $LINKS{db_file_path}/$LINKS{includefile}";
return join ("", <INC> );
}



In the Globals:
includefile = > \&include_file,
(I used this as the second to last global and retained the comma)



In my add.html template:

<%includefile%>


I don't know what else you are looking for, but maybe you can see an error above.

Thanks,

Chad


Quote Reply
Re: New cgi/ssi problems... In reply to
If it matters, I have tried removing the / from the global (this is how it worked when I was using Links2)

ie.
includefile = > &include_file,


But it didn't work either....



Quote Reply
Re: New cgi/ssi problems... In reply to
Try removing the \ before include_file in the %GLOBALS section. I am not using the slash and it works just fine for me....

Regards,

Eliot Lee

Quote Reply
Re: New cgi/ssi problems... In reply to
I did, it didn't work.

Quote Reply
Re: New cgi/ssi problems... In reply to
I also just removed the whole thing, and tried replacing the code, and it still didn't work.

Any other Ideas?

Quote Reply
Re: New cgi/ssi problems... In reply to
Nope...because the codes I've provided DO work.

Good luck!

Regards,

Eliot Lee

Quote Reply
Re: New cgi/ssi problems... In reply to
Eliot,

Any chance of you posting the codes that you are using?

I just don't have any other Ideas.

Chad

Quote Reply
Re: New cgi/ssi problems... In reply to
It has something to do with the name 'includefile'. I changed it to insert_left, and it is now working.

Any ideas why?

Quote Reply
Re: New cgi/ssi problems... In reply to
Welp...I have already posted the codes I am using. Wink And I used includefile as an example. I guess I should've been more specific about changing the variables and sub names.

Most likely <%includefile%> was hiccuping with the codes in the Template.pm module, since you can use <%include file.txt%>. So, the problem was that it was searching for file as the include file.

Regards,

Eliot Lee