[MKDoc-users] SuSE Installation part II

Friedrich-Stade@gmx.de Friedrich-Stade@gmx.de
Sun, 15 Sep 2002 18:34:57 +0200 (MEST)


Next round.

Install.pl did its work and today I have started Apache. The result was
nothing! Could not even access the Apache welcome page through my browser. Yes, I
inserted the two expected lines to the Apache httpd.conf file:

NameVirtualHost 127.0.0.1
Include /usr/local/httpd/htdocs/mkdoc/mkdoc/conf/httpd.conf



BUT after I added the following lines into the Apache httpd.conf file I
could access localhost and there was no error message when starting apache (but
this does not mean anything):


#
<VirtualHost 127.0.0.1>
      DocumentRoot /usr/local/httpd/htdocs
      ServerName localhost
</VirtualHost>





Now i started Mozilla with

http://www.example.com 

and the result was:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.

Please contact the server administrator, webmaster@example.com and inform
them of the time the error occurred, and anything you might have done that may
have caused the error.

More information about this error may be available in the server error log.

Apache/1.3.20 Server at www.example.com Port 80





Next step:

http://admin.example.com

and after I typed in my login password this was the result:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.

Please contact the server administrator, webmaster@example.com and inform
them of the time the error occurred, and anything you might have done that may
have caused the error.

More information about this error may be available in the server error log.

Apache/1.3.20 Server at www.example.com Port 80






Now I typed:

http://editor.example.com

and after my login password I saw this error message:

$VAR1 = bless( {
                 'code' => 'RUNTIME_ERROR',
                 'info' => 'Cannot connect:
DBI->connect(database=mkdoc1:host=localhost) failed: Can\'t connect to local MySQL server through socket
\'/var/lib/mysql/mysql.sock\' (13) at ../../lib/sql/DBH.pm line 91
	lib::sql::DBH::get(\'lib::sql::DBH\') called at ../../lib/sql/MySQL.pm line
145
	lib::sql::MySQL::_select(\'lib::sql::Table=HASH(0x84cf8f0)\', undef,
\'lib::sql::Condition=HASH(0x8503bb8)\', undef, undef, undef, undef) called at
../../lib/sql/Table.pm line 977
	lib::sql::Table::select(\'lib::sql::Table=HASH(0x84cf8f0)\', \'where\',
\'HASH(0x84d0638)\') called at ../../lib/sql/Table.pm line 863
	lib::sql::Table::search(\'lib::sql::Table=HASH(0x84cf8f0)\') called at
/usr/local/httpd/htdocs/mkdoc/mkdoc/cgi/su/su.cgi line 132
	main::list_editor(\'main\') called at
/usr/local/httpd/htdocs/mkdoc/mkdoc/cgi/su/su.cgi line 121
	main::main() called at /usr/local/httpd/htdocs/mkdoc/mkdoc/cgi/su/su.cgi
line 54
	main::__ANON__ called at ../../lib/Exception.pm line 97
	eval {...} called at ../../lib/Exception.pm line 97
	lib::Exception::try(\'CODE(0x810170c)\', \'CODE(0x84451d4)\') called at
/usr/local/httpd/htdocs/mkdoc/mkdoc/cgi/su/su.cgi line 61
'
               }, 'lib::Exception' );




Now, I checked the files DBH.pm and MySQL.pm (there are two available on my
system, one in mkdoc and the second in my perl directory)

In /usr/local/httpd/htdocs/mkdoc/mkdoc/lib/sql/DBH.pm I found this:

# Returns a dbh to play with
sub get
{
    my $self = shift;
    if (not defined $self or not ref $self) { $self = _ETERNAL_ }
    defined $self or
	confess "Cannot return \$dbh because $self has not been spawned";
    
    defined _DBH_ and return _DBH_;
    
    my $driver   = $self->{driver}   || "mysql";
    my $database = $self->{database} || "test";
    my $host     = $self->{host};
    my $port     = $self->{port};
	
    my $user     = $self->{user}     || "root";
    my $password = $self->{password} || undef;
    $database or confess 
	"Cannot return \$dbh because no database name was specified";
    
    my $dsn = undef;
    if ($driver eq 'mysql') { $dsn = "DBI:$driver:database=$database" }
    elsif ($driver eq 'Pg') { $dsn = "DBI:$driver:dbname=$database"   }
    else
    {



Why is it database TEST and not mkdoc1? What about a password?




In /usr/lib/perl5/site_perl/5.6.1/MKDoc/Apache/Auth/MySQL.pm I found:


our $VERSION = '0.3';

use constant DEFAULT_HOSTNAME => 'localhost';
use constant DEFAULT_USERNAME => 'root';
use constant DEFAULT_PASSWORD => undef;

sub handler
{




Password undefined? 

Guess your coding might be right. Exept the TEST database. 

My Apache httpd.conf seems to be the problem  or do I have to edit the
DBH.pm and maybe other files?

Best regards
Friedrich 


 






-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net