Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Large descriptions problem

Quote Reply
Large descriptions problem
I need to store links with large descriptions.

Importing data from the old Links2 db some records could not been imported due the error:

'server has gone away'

so I came to the mysql manual and I found the solution:
start the mysql server...
Code:
mysqld -O max_allowed_packet=5M
tryed again and... wow! everything seems to be imported fine.
but... after few tries I wondered that in every search links returns:

Code:
Your search returned 577 matches.
Pages: [<<] ... 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ... [>>]

with no records visualized!!!

for some reason I cannot understand links refuses to show records.

Quote Reply
Re: Large descriptions problem In reply to
Did you re-index the database? It doens't sound like that's the problem, but it might be.

If that doesn't work, can you provide a link to your database?

When you look at the database, were the links actually imported?? (meaning are they in the database?)



Quote Reply
Re: Large descriptions problem In reply to
Did you re-index the database? It doens't sound like that's the problem, but it might be.

If that doesn't work, can you provide a link to your database?

When you look at the database, were the links actually imported?? (meaning are they in the database?)



Quote Reply
Re: Large descriptions problem In reply to
as I can understand links imports everything fine and doing a search it returns :

Your search returned 577 matches.

so it finds records.

very stange thing.

right now I've linksql onto my local win98 machine and I'm not able to show you my work.

If you want I can connect to the internet when you're on-line so you'll be able to see directly the problem.

my email is: lepo@comune.carpi.mo.it (ICQ 2201227) (I'm in Italy).

thanks for your quick help!


lepo
Quote Reply
Re: Large descriptions problem In reply to
playn' around with SQL monitor I got there the problem came!

doing simple select it return an important information:
Code:
SELECT Title FROM Links
Your query returned -1 rows.

This is the only one table that does not work. And also it's the table that contains large descriptions.

So I can bet the problem is into import.pl or, maybe into DBSQL.pm, it's not impossible also the problem comes with mySQL-win32.

if can help I enclose my links table:

Code:
ID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
Title CHAR(250) NOT NULL,
URL CHAR(250) NOT NULL DEFAULT 'http://',
Type ENUM ('Documento', 'Aggancio', 'Aggancio-Esterno') NOT NULL DEFAULT 'Documento',
Add_Date DATE NOT NULL,
Mod_Date DATE NOT NULL,
Expire INT UNSIGNED DEFAULT 365,
inCalendar ENUM ('Yes', 'No') DEFAULT 'No',
noinCalendar TEXT DEFAULT '',
CategoryID INT UNSIGNED NOT NULL,
Description TEXT,
Document MEDIUMBLOB,
Meta_Keywords CHAR(250),
Contact_Name CHAR(100),
Contact_Email CHAR(100),
Hits SMALLINT UNSIGNED DEFAULT 0,
isNew ENUM ('Yes', 'No') NOT NULL DEFAULT 'No',
isPopular ENUM ('Yes', 'No') NOT NULL DEFAULT 'No',
Rating DECIMAL (12, 2) NOT NULL DEFAULT 0,
Votes SMALLINT UNSIGNED NOT NULL DEFAULT 0,
ReceiveMail ENUM ('Yes', 'No') NOT NULL DEFAULT 'Yes',
inIndex ENUM ('Sempre', 'Nuovo', 'Nascosto', 'No') NOT NULL DEFAULT 'No',
Hidden ENUM ('Yes', 'No') NOT NULL DEFAULT 'No',


also on import.pl I did:
Code:
(importing links infos)...
open (DOC, "docs/$values{'ID'}.html");
$data = "";
while (<DOC> )
{ $data .= $_; }
close DOC;

$values{'Document'} = $data;

...


thanks again


lepo
Quote Reply
Re: Large descriptions problem In reply to
I had a lot of problems with import.pl, and resorted to doing a lot of trickery. I'm sure one of the things we'll see as more people use this program is workarounds and 'fixes' for situations during import. I don't know why it's so difficult, but for some reason it is. I got lots of errors, and had to turn field number checking off in one case (and the database imported perfectly...).

One thing that may be happening, is that certain characters have to be escaped. The " is properly escaped as \" but I had to go through and make sure that < and > were also escaped to \> and \<

That's the only thing I can think of at the moment.

For whatever reason, the import.pl seems to be the most buggy/flakey part of the whole program, and it logically shouldn't be.

I know I'll have to address these issues at some point, since I could not import my SQL 'backup' file either. The data is all in the backup, but for some reason it wouldn't import. I usually end up with errors that I have more fields in the record than I do in the header, and I don't... I've manually checked the bad records. It has to be something in the text not being properly escaped, or something even more obscure. I spent about 4 hours on it a couple of days ago, but couldn't figure it out.

Without seeing what is happening when you try to import those records, that's the best I can do Smile