The main .cgi scripts, and a lot of the .pm files contain the variable to this at the top of the script. The way to get around it is to manually go through each of the files, and manually change it (or use my script to do it for you ).
use CGI::Carp qw(fatalsToBrowser);
use strict;
print "Content-type: text/html \n\n";
my $path = "/path/to/folder/you/have/lsql/in";
my $original = "/path/to/old/folder";
my $new = "/new/path/to/folder";
opendir (DIR, "$path");
my @files = readdir(DIR);
closedir(DIR);
undef($/);
for my $file (@files) {
if ($file =~ /(html|pm|cgi)$/) {
open(R, "$path/$file") || die "cant open file [$file] : $!";
my $data = (<R>);
close (R);
$data =~ s/$original/$new/ig;
open (W, ">$path/$file") || die "Error writing to file [$file]: $!";
print W "$data";
close (W);
}
}
print "done";
This script will go through the entire directory, and each file, and replace occurences of the old path, with the new one
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!
Code:
#!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser);
use strict;
print "Content-type: text/html \n\n";
my $path = "/path/to/folder/you/have/lsql/in";
my $original = "/path/to/old/folder";
my $new = "/new/path/to/folder";
opendir (DIR, "$path");
my @files = readdir(DIR);
closedir(DIR);
undef($/);
for my $file (@files) {
if ($file =~ /(html|pm|cgi)$/) {
open(R, "$path/$file") || die "cant open file [$file] : $!";
my $data = (<R>);
close (R);
$data =~ s/$original/$new/ig;
open (W, ">$path/$file") || die "Error writing to file [$file]: $!";
print W "$data";
close (W);
}
}
print "done";
This script will go through the entire directory, and each file, and replace occurences of the old path, with the new one
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!