1

Topic: The age-old line 58 error!

Hi all

please could someone write an ULTIMATE complete solustion for this age-old trouble:

An error occured on line 58 in file C:\Program Files\xampp\htdocs\punbb-1.2.6\upload\include\dblayer\mysql.php.
PunBB reported: Unable to connect to MySQL server. MySQL reported: Access denied for user 'user'@'localhost' (using password: YES)

(please stick it)

Re: The age-old line 58 error!

Well, the first thing I noticed is that you're trying to use 1.2.6: you might want to update to the latest version tongue

Now then
http://punbb.org/forums/viewtopic.php?id=16801

3

Re: The age-old line 58 error!

u mean ver1.3?

and how can i create the database firs?

Re: The age-old line 58 error!

No, 1.2.17.
And you create the database via the command line or a tool like phpMyAdmin or your host's control panel, if they offer that functionality.

5 (edited by Anas 2008-04-01 10:58)

Re: The age-old line 58 error!

well:
- Atually I'm not familiar with command line. could u tell me what exactly i should write?
- and is there any problem if i replased iso encoding with utf8 in all php files?

Re: The age-old line 58 error!

If I were you, I would use phpMyAdmin, which I know comes with xampp.
And yes, just replacing iso references with utf-8 references is not enough. You will generate a mixed environment that will be difficult to convert from to 1.3, which has full UTF-8 support.

7

Re: The age-old line 58 error!

what charset sould i use from phpMyAdmin? there's no iso?

8

Re: The age-old line 58 error!

Giga thanxxx !! cool

It works now...
but i stil worry about the charset..

9

Re: The age-old line 58 error!

It's one of the latin character sets. Can't remember the specific name offhand, though.

10

Re: The age-old line 58 error!

latin1_swedish_ci

11

Re: The age-old line 58 error!

so what if i used utf8 in db then? with replacing iso references with utf-8 references in all php files?

12

Re: The age-old line 58 error!

As far as I know, this covers everything needed to convert the setup to UTF-8.

http://punbb.org/forums/viewtopic.php?id=16931

13 (edited by Anas 2008-04-01 19:54)

Re: The age-old line 58 error!

I've tried 1.3, the "error msg v1.3" was:

An error was encountered

Unable to select database. MySQL reported: Unknown database 'rdb'
The error occurred on line 55 in C:\Program Files\xampp\htdocs\punbb13\upload\include\dblayer\mysql.php

without even the installation step!

Re: The age-old line 58 error!

Don't write your own config.php file then wink

15

Re: The age-old line 58 error!

?

Re: The age-old line 58 error!

You said you're getting that error without running install.php. For that to happen, your forum must have a config.php file wink

17

Re: The age-old line 58 error!

I have the following config.php file:

<?php

$db_type = 'mysql';
$db_host = 'localhost';
$db_name = 'rDB';
$db_username = 'root';
$db_password = '';
$db_prefix = 'table_';
$p_connect = false;

$base_url = 'http://localhost/punbb13/upload';

$cookie_name = 'punbb_cookie_ee7f53';
$cookie_domain = '';
$cookie_path = '/';
$cookie_secure = 0;

define('PUN', 1);

So i created an empty db called rDB, and i've got this:

An error was encountered

The error occurred on line 242 in C:\Program Files\xampp\htdocs\punbb13\upload\include\functions.php
Database reported: Table 'rdb.table_users' doesn't exist (Errno: 1146).

How can i guess the db structure?!

Re: The age-old line 58 error!

Yes. Remove your config.php file and actually install PunBB tongue

19

Re: The age-old line 58 error!

Well, I did.
1- I removed config.php file.
2- created a db called 'fDB'
3- ran install.php and filled the form with fDB as the db name.
The result was:

An error was encountered

Unable to connect to MySQL server. MySQL reported: Access denied for user 'ODBC'@'localhost' (using password: NO)
The error occurred on line 58 in C:\Program Files\xampp\htdocs\punbb13\upload\include\dblayer\mysql.php

I mean: the step2 didn't work in ver1.3. what can I do then?

Re: The age-old line 58 error!

Fill in the correct username/password for the MySQL server then!

21 (edited by Anas 2008-04-02 19:04)

Re: The age-old line 58 error!

Thank you!
Now here's the comoplete line-58-error solution:
1- if you have a config.php file in /upload folder remove it.
2- Use phpMyAdmin to create an empty database (charset for ver1.2: latin1_swedish_ci, for ver1.3: utf8-unicode-ci). let's call it "myDB". also check the mySQL username from overthere (let's say it was root@localhost).
3- run install.php and give the database the same name "myDB". and the mySQL username as "root".

22

Re: The age-old line 58 error!

Anas wrote:

3- run install.php and give the database the same name "myDB". and the mySQL username as "root".

erm... you should not use the root account for that.

Re: The age-old line 58 error!

Anas: Err, sort of. tongue
That was what was necessary to solve the problem FOR YOU. The error simply means that the username/password given for the database were incorrect. Your problem was larger, in that you had neither a database nor a database username/password.
And as yemgi said, you shouldn't be using root. You should create an account just for the forum.

24

Re: The age-old line 58 error!

You know? I've been thinking.. if it was a permission problem as I guess, we may need some conditional PHP code, that could change the permissions for windows platform hmm !?

Just an idea for the next punbb version.

Re: The age-old line 58 error!

Windows has nothing to do with it
Seriously, I've explained what the problem was tongue