Pg Error when trying to unsuspend a customer's package

scott at scott at
Thu May 8 15:46:30 PDT 2003

The Postgresql problem appears to have gone away with 1.4.1rc2. 

Of further note: 

The first time I run 'make aspdocs' it stops with the error: 

make: *** No rule to make target `httemplate/*/*/*/*', needed by `aspdocs'.  

Then, the second time I run 'make aspdocs' it completes successfully. 


When I follow the instructions on the Freeside Administration document to: 

"First, it is necessary to create a domain definition. Click on View/Edit 
service definitions and Add a new service definition with Table  svc_domain 
(and no modifiers)." 

This doesn't add a corresponding record to the Pg table svc_domain.  
Therefore, I cannot add a new service definition that requires a domsvc 
value.  (That is, the drop down list box for selecting a domain is empty). 

A workaround is to manually create a record for the domain definition in the 
database table svc_domain.  Thereafter, the drop down list box for selecting 
a domain when creating a new service definition does contain my domain 

And I'm not sure what goes in the 'catchall' field for that table. 


If I want to export to the latest freeradius server (version 0.8.1), which I 
do, I have to modify the code in FS/part_export/ to set the op 
fields to correct values because this version of freeradius REALLY doesn't 
like null op field values. 

Here's my less than pretty patch for that: 

diff -ur freeside-1.4.1rc2/FS/FS/part_export/ 
 --- freeside-1.4.1rc2/FS/FS/part_export/    2002-10-05 
04:15:18.000000000 -0700
+++ freeside-1.4.1rc2hacked/FS/FS/part_export/      2003-05-08 
15:15:08.000000000 -0700
@@ -187,10 +187,10 @@
    } else { 

      my $i_sth = $dbh->prepare(
 -        "INSERT INTO rad$table ( UserName, Attribute, Value ) ".
 -          "VALUES ( ?, ?, ? )"
+        "INSERT INTO rad$table ( UserName, Attribute, op, Value ) ".
+          "VALUES ( ?, ?, ?, ?)"
      ) or die $dbh->errstr;
 -      $i_sth->execute( $username, $attribute, $attributes{$attribute} )
+      $i_sth->execute( $username, $attribute, 
&sqlradius_appropo_op($attribute), $attributes{$attribute} )
        or die $i_sth->errstr; 

@@ -199,6 +199,16 @@

+sub sqlradius_appropo_op {
+       my ($attrib) = (shift);
+       if($attrib =~ m/Password/){
+               return '==';
+       }
+       else {
+               return ':=';
+       }
sub sqlradius_usergroup_insert { #subroutine, not method
  my $dbh = sqlradius_connect(shift, shift, shift);
  my( $username, @groups ) = @_; 


Under Mandrake, I'll often get these errors for ssh exports like: 

FS::part_export::shellcommands::ssh_cmd  	user root host command 
useradd -c '' -d / -s /bin/false... stdin_string  	Thu May 8 11:54:52 2003  
	failed: [Net:SSH::ssh_cmd] STDERR Warning: No xauth data; using fake 
authentication data for X11 forwarding. ( retry | remove ) 

The work-around I use is to modify the Mandrake defaults for X11 forwarding 
for the ssh daemons from yes to no. 

Before work-around: 

 ForwardX11 yes 

 X11Forwarding yes 

After work-around: 

 ForwardX11 no 

 X11Forwarding no 


ivan at writes: 

> Try 1.4.1rc2 and please report any additional problems you encounter    
> with PostgreSQL 7.3.x. 
> -- 
> _ivan 
> On Wed, May 07, 2003 at 11:41:10PM +0000, scott at wrote:
>> On a system Mandrake Linux 9.1 with it's prepacked versions of:  
>> postgresql-7.3.2-5mdk
>> perl-5.8.0-19mdk
>> apache-1.3.27-8mdk  
>> And from CPAN:  
>> DBI-1.35
>> DBD-Pg-1.22
>> Apache-ASP-2.53
>> Apache-DBI-0.91  
>> With a fresh install of freeside 1.4.1rc1 - without migrating an existing 
>> database,  
>> When I suspend a packge for a new customer I create, it works fine.  When I 
>> unsuspend the same package, I get this error on the returned web page:  
>> Error processing your request
>> Your request could not be processed because of the following error:  
>> ERROR: pg_atoi: zero-length string  
>> Or from my /var/log/httpd/ssl-error_log file:  
>> DBD::Pg::st execute failed: ERROR:  pg_atoi: zero-length string at 
>> /usr/lib/perl5/ site_perl/5.8.0//FS/ line 687.  
>> Any suggestions?  I should be searching for some field with a blank ASCII 
>> string right?  Perhaps a date field? 

Scott Langley
scott at
Systems Administrator
Rural Network Services 

More information about the freeside-users mailing list