[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] Webmin. Create new user. Error - Perl execution failed.



Jørgen Heesche wrote:
Hej.
Jeg kan ikke i webmin oprette en ny mysql-user.
Fejlmeddelelse fra 'Create new user':

HTTP/1.0 500 Perl execution failed Server: MiniServ/0.01 Date: Sat, 29 Apr 2006 13:07:15 GMT Content-type: text/html Connection: close
Error - Perl execution failed


Can't use an undefined value as a HASH reference at /usr/lib/perl5/vendor_perl/5.8.7/i386-linux/DBD/mysql.pm line 115.

Det er her i mysql.pm det går galt:
# create a 'blank' dbh
    my($this, $privateAttrHash) = (undef, $attrhash);
    $privateAttrHash = { %$privateAttrHash,
        'Name' => $dsn,
        'user' => $username,
        'password' => $password
    };


System: Mandriva 2006. Webmin-1.070. Perl5.8.7

Er der en løsning?

Jeg fandt løsningen her:
http://bugs.mysql.com/bug.php?id=17323

A previously flawless Nagmin installation (http://nagmin.sf.net) then crashed
with the error:


"Error - Perl execution failed

Can't use an undefined value as a HASH reference at /path/to/mysql.pm line 113".

Suggested fix:
At around line 109 of mysql.pm:

------------------------------------
    # Avoid warnings for undefined values
    $username ||= '';
    $password ||= '';

    # create a 'blank' dbh
    my($this, $privateAttrHash) = (undef, $attrhash);
    $privateAttrHash = { %$privateAttrHash,
	'Name' => $dsn,
	'user' => $username,
	'password' => $password
    };
-------------------------------------

Needs to be changed to

-------------------------------------
   # Avoid warnings for undefined values
    $username ||= '';
    $password ||= '';
    $attrhash ||= {};

    # create a 'blank' dbh
    my($this, $privateAttrHash) = (undef, $attrhash);
    $privateAttrHash = { %$privateAttrHash,
	'Name' => $dsn,
	'user' => $username,
	'password' => $password
    };
---------------------------------------

I mysql.pm skal der altså tilføjes linien:
    $attrhash ||= {};

Det virker :)

--
Med venlig hilsen

Jørgen Heesche
mailto:sslug@sslug
Registered Linux User #401007


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-05-01, 02:02 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *