Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Changing directory name inside cgi-bin

Quote Reply
Changing directory name inside cgi-bin
Hi There,

A quick question I hope. I would like to change the name of the directory in cgi-bin where linkssql is installed.

What is the best way to do this? I tried editing all references to the directory in admin/Links/Config/Data.pm but when I changed the directory name after that I got an error. So I assume there are some other settings that need updating as well.

Many Thanks again for your time!
Quote Reply
Re: [aquaman] Changing directory name inside cgi-bin In reply to
Hi Again, just wondered if anyone knows the best way of changing the name of the directory that linkssql is installed into within the cgi-bin.

Many Thanks...
Quote Reply
Re: [aquaman] Changing directory name inside cgi-bin In reply to
On a basic installation (ie. no plugins, custom file columns, etc), you should be able to just rename the directory and then update all the paths and url's in Config/Data.pm.

What error did you get when you tried doing that?

Adrian
Quote Reply
Re: [brewt] Changing directory name inside cgi-bin In reply to
Hi There, thanks for the reply...

OK, I tried that and after downloading the Data.pm file and changing all references in it to "linkssql", I am currently getting this error when trying to access the admin:

Links::Config (28221): Unable to compile '/home/scuba2/public_html/cgi-bin/scuba/admin/Links/Config/Data.pm': No such file or directory. at Links.pm line 100.

I have looked at line 100 of Links.pm but am at a loss. Line 100 is this:

# Display the category select box.
if ($opts->{mode} and $opts->{mode} =~ /$SHOW_CAT_FORM/o) {
my $name = $opts->{multiple} ? "$opts->{multiple}-CatLinks.CategoryID" : 'CatLinks.CategoryID'; (#### Line 100 ####)
my $id = $opts->{values}->{$name} || $self->{input}->{$name};
my $font = $self->{font};
my ($output, $h);

Any suggestions??

Many Thanks
Quote Reply
Re: [aquaman] Changing directory name inside cgi-bin In reply to
Hi,

Have you tried a "grep" to replace instances of the old folders?

First, change directory to the LSQL cgi-bin folder;

cd /path/to/folder/where/page.cgi/is
grep -r -l '/old/' .

..and if you are happy the list of files are ok, then you can try;

perl -p -i -e 's|/old/|/linkssql/|g' `grep -r -l '/old/' .`

Please BACKUP FIRST! (you can never be too careful, especially when grepp'ing a whole directory).

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [aquaman] Changing directory name inside cgi-bin In reply to
Oh yes, I forgot about the paths in all the .cgi files. You need to change the use lib and Links::init(...) lines in all the .cgi and .pm files.

Adrian
Quote Reply
Re: [brewt] Changing directory name inside cgi-bin In reply to
 
Looks like I got this all up and running!! no ssh acsess so had to do this manually...

ONE QUESTION:

I am getting an error in the admin when it checks for updates:

Error:
Server returned error code: 204 Admin path does not match path stored on update server

I assume that this is on the gossamerthreads servers and I just need to get them to fix on their end??

Many thanks for all your help!
Quote Reply
Re: [aquaman] Changing directory name inside cgi-bin In reply to
Hi,

Glad its working =)

You need to email support @ gossamer-threads.com to get them to reset your saved path (which should give you "update" access again).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [aquaman] Changing directory name inside cgi-bin In reply to
You can reset the path from the download area.

Adrian
Quote Reply
Re: [brewt] Changing directory name inside cgi-bin In reply to
Hmmm... download area is this in the admin OR on the Gossamer Threads website?

Also, Looks like i might have missed a few references to the old directory as I still get the same error when updating the paths and urls under setup options....

Thanks for the tips