Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Problem importing data from links 2.0 to Links SQL

Quote Reply
Problem importing data from links 2.0 to Links SQL
Hello everyone,
I just want to migrate my links 2.0 data to my links sql.
So i went to database->import/export

Then i choose import from links 2.X
Then i select the directory which contains def file for links 2.0 ( /home/xxxxx/cgi-bin/admin )

and i got this error:

CRITICAL ERROR OCCURED: Cannot open /home/xxx/cgi-bin/admin/category.def: Bad file descriptor at /home/xxx/cgi-bin/sql/admin/Links/Import/L2S2.pm line 82

I tried some different things but i always come down to this error.

Can you please help me resolving this?

Thanks a lot.
Quote Reply
Re: [InsaneBrain] Problem importing data from links 2.0 to Links SQL In reply to
Is your Links 2.0 installation working properly? The error "Bad file descriptor" sometimes can mean that the file is corrupt. Try opening the file to see the contents of the category.def file.

Adrian
Quote Reply
Re: [brewt] Problem importing data from links 2.0 to Links SQL In reply to
First, thank your for your help.

I tried opening "category.def" without any probleme. The content just looks fine.
I even tried to set some different rights on it but it leads me to the same error "bad file descriptor"

I just copy paste you what i got from it :




# -------------
# Links
# -------------
# Links Manager
#
# File: category.def
# Description: Contains the database definition for categories.
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.0
#
# (c) 1998 Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================

# Database Definition: CATEGORIES
# --------------------------------------------------------
# Definition of your database file.
# ***************************************** nonenglish modification - begin ****************
# %db_def = (
# ID => [0, 'numer', 5, 8, 1, '', ''],
# Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],
# Description => [2, 'alpha', '40x3', 500, 0, '', ''],
# Related => [3, 'alpha', 0, 255, 0, '', ''],
# 'Meta Description' => [4, 'alpha', 40, 75, 0, '', ''],
# 'Meta Keywords' => [5, 'alpha', 40, 75, 0, '', ''],
# Header => [6, 'alpha', 40, 75, 0, '', ''],
# Footer => [7, 'alpha', 40, 75, 0, '', '']
# );
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],
Description => [2, 'alpha', '40x3', 500, 0, '', ''],
Related => [3, 'alpha', 0, 255, 0, '', ''],
'Meta Description' => [4, 'alpha', 40, 75, 0, '', ''],
'Meta Keywords' => [5, 'alpha', 40, 75, 0, '', ''],
Header => [6, 'alpha', 40, 75, 0, '', ''],
Footer => [7, 'alpha', 40, 75, 0, '', ''],
Nonenglish => [8, 'alpha', 40, 75, 0, '', ''],
category_title => [8, 'alpha', 40, 100, 0, '', '']
);
# ***************************************** nonenglish modification - end ******************

# Database file to use -- defined in links.cfg.
$db_file_name = $db_category_name;
# Counter file to use -- defined in links.cfg.
$db_id_file_name = $db_category_id_file_name;
# The column name for the database key. MUST be the first column in the database.
$db_key = 'ID';
# Database delimeter.
$db_delim = '|';
# Title.
$html_title = 'Category Database';
$html_object = 'Category';

# Hash of column names to possible options. If you want to use a select form
# field, you can use &build_select_field in your HTML page. This routine will
# make a <SELECT> input tag using the following values:
%db_select_fields = ( );

# Hash of column names to radio values. If you use &build_radio_field, it will
# make a <INPUT TYPE="RADIO"> tag for you using the options specified in the hash.
%db_radio_fields = ( );

# Maximum number of hits returned in a search. Can be overridden in the search
# options.
$db_max_hits = '25';

# Use the built in key tracker.
$db_key_track = 1;

# ===========================================================================
# Build up some variables from your definitions. Internal use only.
@db_cols = ();
foreach (sort { $db_def{$a}[0] <=> $db_def{$b}[0] } keys %db_def) {
push (@db_cols, $_);
$db_sort{$_} = $db_def{$_}[1];
$db_form_len{$_} = $db_def{$_}[2];
$db_lengths{$_} = $db_def{$_}[3];
$db_not_null{$_} = $db_def{$_}[4];
$db_defaults{$_} = $db_def{$_}[5];
$db_valid_types{$_} = $db_def{$_}[6];
($_ eq $db_key) and $db_key_pos = $db_def{$_}[0];
}
1;

Last edited by:

InsaneBrain: Sep 28, 2007, 1:46 AM