Hilfe ich kann eine pl nicht ausf�hren
Philipp Suek
p.suek at web.de
Sat Sep 16 19:49:02 CEST 2000
Hallo,
ich wollte jetzt eine Content Managment System auf meinem Apache Server
installieren, aber die generate.pl spuckt das hier aus
bash-2.03# ./generate.pl
Can't locate Image/Size.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i586-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i586-linux /usr/lib/perl5/site_perl/5.005 .) at ./generate.pl line 26.
BEGIN failed--compilation aborted at ./generate.pl line 26.
was ist Image/Size.pm
Als Anlage liegt die generate.pl bei
Danke#!/usr/bin/perl
#
# The contents of this file are subject to the license that came
# with the source; you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is eGrail Source code.
#
# The Initial Developer of the Original Code is eGrail, inc.
# Portions created by eGrail are Copyright (C) 1997 eGrail, inc. All
# Rights Reserved.
#
# Contributor(s):
#
package Egrail;
use DBI;
use Image::Size;
use Digest::MD5 qw(md5 md5_hex md5_base64);
use Math::BigFloat;
use File::NCopy;
$phpdir = shift;
$arg = shift;
die "usage: generate script-directory\n" unless ($phpdir);
$MngHeader = "WMS 2.0";
$ScriptDir = "eGrail-Source";
# Setup the defaults
if ($ENV{"COMSPEC"}) { $ScriptRoot = "D:/scriptroot"; }
else { $ScriptRoot = "/www/php3"; }
$OutputErrors = 1;
# See what the versions are
$NewHtmlTableVer = 190;
$NewConfigVer = 26;
# set up defaults
$subnav_intem = 0;
$ORPHAN_PARENT = 150;
$EditMode = 0;
$PreviewMode = 0;
if ($ENV{"EGRAIL_DIR"}) { $ScriptDir = $ENV{"EGRAIL_DIR"}; }
if ($ENV{"EGRAIL_SCRIPTROOT"}) { $ScriptRoot = $ENV{"EGRAIL_SCRIPTROOT"}; }
require "$ScriptRoot/$ScriptDir/egrail.ini";
require "$ScriptRoot/$phpdir/config.pl" unless ($arg =~ /makeconfig/); # ScriptDir is possibly redefined here
if ($ENV{"EGRAIL_SCRIPTROOT"}) { $ScriptRoot = $ENV{"EGRAIL_SCRIPTROOT"}; } # ALLOW ScriptRoot to be reset for dev'ers
# Load in the extra libs
require "$ScriptRoot/$ScriptDir/perl-lib/page.pl";
require "$ScriptRoot/$ScriptDir/perl-lib/xml.pl";
require "$ScriptRoot/$ScriptDir/perl-lib/objects.pl";
require "$ScriptRoot/$ScriptDir/perl-lib/assets.pl";
require "$ScriptRoot/$ScriptDir/perl-lib/config.pl";
require "$ScriptRoot/$ScriptDir/perl-lib/date.pl";
require "$ScriptRoot/$ScriptDir/perl-lib/objects.pl";
require "$ScriptRoot/$ScriptDir/perl-lib/strings.pl";
require "$ScriptRoot/$ScriptDir/perl-lib/users.pl";
require "$ScriptRoot/$ScriptDir/perl-lib/utils.pl";
require "$ScriptRoot/$ScriptDir/perl-lib/webutils.pl";
require "$ScriptRoot/$ScriptDir/perl-lib/db.pl";
# Paths
if ($NTOS) { require "$ScriptRoot/$ScriptDir/perl-lib/ntpaths.pl"; }
else { require "$ScriptRoot/$ScriptDir/perl-lib/unixpaths.pl"; }
$WMSDB = "gui" unless ($WMSDB);
$USERDB = $database unless ($USERDB);
# See if they exist -- DB Methods
$DBConnectFile = "mysql" unless ($DBConnectFile);
$DBConnectMethod = "mysql" unless ($DBConnectMethod);
# Database interface
require "$ScriptRoot/$ScriptDir/DB/$DBConnectMethod.pl";
# handle old egrail.ini files
$DB_PASS = $MYSQL_PASS unless ($DB_PASS);
$DB_USER = $MYSQL_USER unless ($DB_USER);
if ($DBConnectMethod eq 'oci') {
$wdbh = db_pconnect("dbi:Oracle:host=$DB_HOST;sid=$WMSDB", $DB_USER, $DB_PASS) || die $DBI::errstr;
} else {
$wdbh = db_pconnect("dbi:$DBConnectMethod:$WMSDB;host=$DB_HOST", $DB_USER, $DB_PASS) || die $DBI::errstr;
}
if ($arg =~ /makeconfig/) {
print "Making configfile...\n";
&make_config;
exit;
}
if ($DBConnectMethod eq 'oci') {
$dbh = db_pconnect("dbi:Oracle:host=$DB_HOST;sid=$WMSDB", $DB_USER, $DB_PASS) || die $DBI::errstr;
$hdbh = db_pconnect("dbi:Oracle:host=$DB_HOST;sid=$WMSDB", $DB_USER, $DB_PASS) || die $DBI::errstr;
$udbh = db_pconnect("dbi:Oracle:host=$DB_HOST;sid=$WMSDB", $DB_USER, $DB_PASS) || die $DBI::errstr;
} else {
$dbh = db_pconnect("dbi:$DBConnectMethod:$database;host=$DB_HOST", $DB_USER, $DB_PASS) || die $DBI::errstr;
$hdbh = db_pconnect("dbi:$DBConnectMethod:$HTMLDB;host=$DB_HOST", $DB_USER, $DB_PASS) || die $DBI::errstr;
$udbh = db_pconnect("dbi:$DBConnectMethod:$USERDB;host=$DB_HOST", $DB_USER, $DB_PASS) || die $DBI::errstr;
}
if (!$dbh) { die("Unable to connect to database: $database"); }
if (!$hdbh) { die("Unable to connect to database: $HTMLDB"); }
if (!$udbh) { die("Unable to connect to database: $USERDB"); }
if (!$wdbh) { die("Unable to connect to database: $WMSDB"); }
#$dbh->{LongTruncOk} = 0;
#$hdbh->{LongTruncOk} = 0;
#$udbh->{LongTruncOk} = 0;
#$dbh->{LongReadLen} = 100000;
#$udbh->{LongReadLen} = 100000;
#$wdbh->{LongReadLen} = 100000;
db_set($dbh, 'LongTruncOk', 0);
db_set($hdbh, 'LongTruncOk', 0);
db_set($udbh, 'LongTruncOk', 0);
db_set($dbh, 'LongReadLen', 100000);
db_set($udbh, 'LongReadLen', 100000);
db_set($wdbh, 'LongReadLen', 100000);
$OldDocRoot = $DocRoot; # save the old value for the move script
#$sth = $wdbh->prepare(&db_sql("select docroot, mvscript, mvhtdocs, do_regen, do_upgrade, do_nav, configver, htmltablever, authtype, wpid, protected from wms_projects where db = '$database'", 'wms_projects', 3));
@table_array = ("wms_projects");
@col_array = ("docroot", "mvscript", "mvhtdocs", "do_regen", "do_upgrade", "do_nav", "configver", "htmltablever", "authtype", "wpid", "protected");
@where_array = ("db|$database");
$sth = db_query($wdbh, \@table_array, \@col_array, \@where_array);
#$sth->execute();
#$sth->bind_col(1, \$DocRoot);
#$sth->bind_col(2, \$mvscript);
#$sth->bind_col(3, \$mvhtdocs);
#$sth->bind_col(4, \$do_regen);
#$sth->bind_col(5, \$do_upgrade);
#$sth->bind_col(6, \$do_nav);
#$sth->bind_col(7, \$configver);
#$sth->bind_col(8, \$htmltablever);
#$sth->bind_col(9, \$authtype);
#$sth->bind_col(10, \$wpid);
#$sth->bind_col(11, \$Protected);
@var_array = (\$DocRoot, \$mvscript, \$mvhtdocs, \$do_regen, \$do_upgrade, \$do_nav, \$configver, \$htmltablever, \$authtype, \$wpid, \$Protected);
db_bind($sth, \@var_array);
#if (!$sth->fetch) {
# die "Unable to find information about this site!";
#}
if (!db_fetch($sth)) {
die "Unable to find information about this site!";
}
if ($htmltablever < $NewHtmlTableVer) {
if ($DBConnectMethod eq 'Oracle') { # Should add a variable to config.pl to take on the update.lib/ora name
require "$ScriptRoot/$ScriptDir/perl-lib/upgrade.ora";
}else{
require "$ScriptRoot/$ScriptDir/perl-lib/upgrade.lib";
}
# Run the script
&UpgradeSite();
print "Loaded upgrade.lib\n";
# change the level to the new one
#$wdbh->do(&db_sql("UPDATE wms_projects SET htmltablever = '$NewHtmlTableVer' WHERE db = '$database'", 'wms_projects', 3));
$table = "wms_projects";
@cols_array = ("htmltablever|$NewHtmlTableVer|1");
@where_array = ("db|=|$database|1");
db_update($wdbh, $table, \@cols_array, \@where_array);
&make_config;
}
if ($arg =~ /upgrade/) {
exit(0);
}
# Make sure we are up to date
if ($configver < $NewConfigVer) {
# remake the config & reset
#$wdbh->do(&db_sql("UPDATE wms_projects SET configver = $NewConfigVer WHERE db = '$database'", 'wms_projects', 3));
$table = "wms_projects";
@cols_array = ("configver|$NewConfigVer|0");
@where_array = ("db|=|$database|1");
db_update($wdbh, $table, \@cols_array, \@where_array);
&make_config;
}
&MakeNav() if (!$arg || ($arg =~ /nav/) || $do_nav);
&MakeAllPages() if (!$arg || ($arg =~ /pages/) || $do_regen);
&Egrail::WebUtils::BuildPassword() if (!$arg || ($arg =~ /pass/));
if ($arg =~ /edit/) {
$arg = shift;
$EditMode = 1;
$OutputErrors = 0;
&Egrail::Page::MakePage($arg);
exit;
}
if ($arg =~ /preview/) {
$arg = shift;
$PreviewMode = 1;
$OutputErrors = 0;
&Egrail::Page::MakePage($arg);
exit;
}
if ($arg =~ /htaccess/) {
&BuildFileProtection();
exit;
}
if ($arg =~ /updateco/) {
&ParseCoAttrib;
exit;
}
if ($arg =~ /getimagesize/) {
$arg = shift;
&Egrail::Assets::ImageSize($arg);
exit;
}
if ($arg =~ /imagesize/) {
print "Making Image Sizes...\n";
&Egrail::Assets::GetImageSizes();
}
if ($mvscript) {
&MoveScripts;
&make_config;
exit;
}
if ($mvhtdocs) {
&MoveHtdocs;
&make_config;
exit;
}
if ($arg =~ /xmldump/) {
print "<?xml version='1.0' ?>\n";
print "<Egrail>\n";
&Egrail::XML::XmlPages;
&Egrail::XML::XmlCcode_table;
&Egrail::XML::XmlCategories;
&Egrail::XML::XmlClevels;
&Egrail::XML::XmlLinkedLists;
&Egrail::XML::XmlObjects;
&Egrail::XML::XmlTemplate;
&Egrail::XML::XmlForum;
&Egrail::XML::ForumMessages;
&Egrail::XML::XmlStrings;
&Egrail::XML::XmlSubnav;
&Egrail::XML::XmlUserEvents;
&Egrail::XML::XmlAssets;
&Egrail::XML::XmlWmsGroups;
&Egrail::XML::XmlProjects;
&Egrail::XML::XmlUserRate;
&Egrail::XML::XmlWmsUsers;
&Egrail::XML::XmlPageObject(0,0);
# &Egrail::XML::Xml
print "</Egrail>\n";
exit;
}
if ($arg =~ /archive/) {
$OldDocRoot = $DocRoot;
$all = 0;
$all = 1 if ($arg =~ /archiveall/);
# Save
$DocRoot = shift;
$make_tarball = 0; # Default case
$make_tarball = 1 unless $DocRoot;
$DocRoot = "$TEMP/$database.$$" unless $DocRoot;
# Change the directory
$build_directory = '';
$build_directory = shift unless ($make_tarball);
$Directory = $build_directory;
# make hid
$page = 0;
$page = shift unless ($make_tarball);
$build_directory = "/$build_directory" if ($build_directory && ($build_directory !=~ /^\//));
# Make sure we are here
&Verify("$DocRoot$build_directory/img/test");
my($file) = File::NCopy->new(recursive => 1, preserve => 1);
$file->copy("$OldDocRoot$directory/img", "$DocRoot$build_directory");
# Enforce staticity
$Egrail::MakeStatic = 1;
$Egrail::Archiving = 1;
$project = "$DocRoot$build_directory/$database.project";
# Build it
$directory = $build_directory;
if ($page) {
my($mycount) = 0;
while($page > 0) {
&Egrail::Page::MakePage($page) unless ($PageSeen[$page]);
$PageSeen[$page] = 1;
$page = shift;
$mycount++;
}
} else {
system("$ScriptRoot/$ScriptDir/generate.pl $PHPDirectory xmldump > $DocRoot$build_directory/$database.xml");
system("$MYSQLDUMP -t $WMSDB wms_projects > $project");
open FILE, "$project" or die "Can't open $project: $!";
$dir = $directory;
substr($dir, 0, 1) = "";
while (<FILE>) {
if (/\(\d+,'$dir',\d+,\d+,\d+,\d+,\d+,\d+,'$database'/) {
$data = $_;
$data =~ s/\(\d+,/\(0,/;
last;
}
}
close FILE;
open FILE, ">$project" or die "Can't open $project: $!";
print FILE $data;
close FILE;
&MakeNav();
&MakeAllPages(1000, $all);
&Egrail::WebUtils::BuildPassword();
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = localtime;
$year = $year + 1900;
$month = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$mon];
$mday = "0$mday" if ($mday < 10);
$Date = "$year$month$mday";
if (!$NTOS && $make_tarball) {
&Verify("$OldDocRoot$directory/archive/$Date");
`cd $DocRoot$directory; tar -czf $OldDocRoot$directory/archive/$database$Date.tgz *; cd ..; rm -rf $database.$$`;
print "Archive at <a href=$directory/archive/$database$Date.tgz>$directory/archive/$database$Date.tgz</A><BR>";
} elsif ($NTOS) {
print "Unable to make archives on NT.";
}
}
exit(0);
}
if ($arg > 0) {
$mycount = 0;
while($arg > 0) {
&Egrail::Page::MakePage($arg);
$arg = shift;
$mycount++;
}
&MakeNav() if ($mycount > 1);
}
exit 0;
# end of options
# All subs begin below here
-
Hinweise zur Benutzung dieser (und anderer Mailing-Listen) bitte beachten:
--> http://lug-owl.de/mailinglist_hints.html <--
More information about the Linux
mailing list