[freeside] Error 'Variable "%num_active_cust_pkg" will not stay shared ' when adding first new package
ivan at 420.am
ivan at 420.am
Tue Aug 5 12:51:35 PDT 2003
I can't duplicate your problem. Try this patch and report your results.
diff -u /home/ivan/freeside1.4/httemplate/browse/part_pkg.cgi part_pkg.cgi
--- /home/ivan/freeside1.4/httemplate/browse/part_pkg.cgi 2003-07-12 04:08:43.000000000 -0700
+++ part_pkg.cgi 2003-08-05 12:49:03.000000000 -0700
@@ -24,7 +24,9 @@
$num_active_cust_pkg{$part_pkg->pkgpart} =
$active_sth->fetchrow_arrayref->[0];
}
- $sortby = \*active_cust_pkg_sort;
+ $sortby = sub {
+ $num_active_cust_pkg{$b->pkgpart} <=> $num_active_cust_pkg{$a->pkgpart};
+ };
} else {
$sortby = \*pkgpart_sort;
}
@@ -137,8 +139,4 @@
$a->pkgpart <=> $b->pkgpart;
}
-sub active_cust_pkg_sort {
- $num_active_cust_pkg{$b->pkgpart} <=> $num_active_cust_pkg{$a->pkgpart};
-}
-
%>
--
_ivan
On Tue, Aug 05, 2003 at 03:40:09PM -0400, Sven wrote:
> Good afternoon,
>
> My system/software specs are as follow:
>
> Solaris 9 (sparc 64)
> Apache 1.3.28 (DSO)
> ModPerl 1.28 (statically compiled)
> Perl 5.6.1
> HTML-Mason 1.22
> PostgreSQL 7.3.4
> freeside-1.4.1rc5 (because of the PostgreSQL version)
> DBD-Pg-1.22
> DBI-1.37
>
> All other modules per installation instructions are CPAN current (as of 01
> Aug 2003 or so)
>
> After getting this installed on a Solaris sparc machine (no small feat mind
> you) I was able to add a service successfully (per the instructions, this
> would be a domain service - svc_domain). After returning to the main menu
> and then from the sysadmin section choosing "View/Edit package definitions"
> I am presented with the following error(s):
>
> -------- begin error code ------------
> error: Error during compilation of
> /var/apache-freeside/htdocs/freeside-mason/browse/part_pkg.cgi:
> Variable "%num_active_cust_pkg" will not stay shared at
> /var/apache-freeside/htdocs/freeside-mason/browse/part_pkg.cgi line 148.
>
>
> context: ...
> 144: % $a->pkgpart <=> $b->pkgpart;
> 145: %}
> 146: %
> 147: %sub active_cust_pkg_sort {
> 148: % $num_active_cust_pkg{$b->pkgpart} <=>
> $num_active_cust_pkg{$a->pkgpart};
> 149: %}
> 150: %
> 151: %
> 152:
> ...
> ---------- end error code -----------
>
> I have searched the mail archives and found reference to this error as it
> pertains to the 1.50 pre-release (with the response being that there is no
> user support for that release yet). I am experiencing this on a 1.4 release
> however; my choosing 1.4.1rc5 was driven by the pg_atoi empty string error
> as I am using version 7.3.4 of Postgres. A cursory test of the admin
> functions reveals that they do appear to work. I am hoping there is a
> solution to this problem?
>
> Sven Willenberger
> Systems Administration
> Delmarva Online, Inc.
>
--
_ivan
More information about the freeside-users
mailing list