PDA

View Full Version : Submit Issue


sdawkins
06-13-2006, 01:23 PM
a site that was converted over from phpld --
when trying to submit (free) (these are pages not in the directory) get this error
Duplicate entry '4' for key 1
Duplicate entry '3' for key 1

Everytime I try to submit the number increases....

sdawkins
06-13-2006, 03:26 PM
I went into phpadmin and ran check tables
these errors arrive

Problems with indexes of table `dir_categories`
PRIMARY and INDEX keys should not both be set for column `id`
Problems with indexes of table `dir_config`
PRIMARY and INDEX keys should not both be set for column `id`
Problems with indexes of table `dir_editors`
PRIMARY and INDEX keys should not both be set for column `id`
Problems with indexes of table `dir_link_fields`
PRIMARY and INDEX keys should not both be set for column `name`
Problems with indexes of table `dir_pages`
PRIMARY and INDEX keys should not both be set for column `name`

Sergey Ten
06-13-2006, 04:48 PM
Hello sdawkins,

Please email your Cpanel credentials.

sten@esyndicat.com

sdawkins
06-13-2006, 05:00 PM
Thank you -- email sent.

Sergey Ten
06-13-2006, 05:57 PM
sdawkins,

I email to you the information. Please check your mail.

sdawkins
06-13-2006, 08:09 PM
All fixed, thank you.

Sergey Ten
06-13-2006, 08:24 PM
sdawkins,

You are wellcome.

neominds
06-13-2006, 08:59 PM
Hello sdawkins,

Please email your Cpanel credentials.

sten@esyndicat.com

Hi Sergey, I have the same problem... I will send you my credencials so you can maybe send me also the solution for that problem...

Thanks

Richard Meijs

Sergey Ten
06-13-2006, 09:26 PM
Hello neominds,

Ok, you know my mail.

neominds
06-14-2006, 12:05 AM
Ok, you know my mail.

Thanks a lot, I got it fixed it works now...


Richard

aaron_nimocks
08-14-2006, 02:12 AM
What was this information?

I need it too. :)

sdawkins
08-14-2006, 02:37 AM
See this thread
http://www.esyndicat.com/forum/about5908.html

Vincent Wright
08-14-2006, 10:24 AM
Aaron seems to have resolved the issue.

metz
09-19-2006, 06:50 PM
Have the same issue...

I don't have access to that forum thread you are pointing to ;/

sdawkins
09-19-2006, 07:35 PM
Have the same issue...
I don't have access to that forum thread you are pointing to ;/

This is Sergey Ten's Post

Seems it's error in the table "dir_sequences".

Ok, create php file with such code:

<?php

require_once('includes/config.inc.php');
require_once('classes/DirDb.php');

/** use database class **/
$gDb = new Database();

$gDb->mDbhost = $gDirConfig['dbhost'];
$gDb->mDbname = $gDirConfig['dbname'];
$gDb->mDbuser = $gDirConfig['dbuser'];
$gDb->mDbpwd = $gDirConfig['dbpwd'];
$gDb->connect();


/** get max id for links **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}links`;";
$id_links = $gDb->getOne($sql);

/** get max id for categories **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}categories`;";
$id_categories = $gDb->getOne($sql);

/** get max id for editors **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}editors`;";
$id_editors = $gDb->getOne($sql);

/** get max id for admins **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}admins`;";
$id_admins = $gDb->getOne($sql);


$id_links = (empty($id_links)) ? 0 : $id_links;
$id_categories = (empty($id_categories)) ? 0 : $id_categories;
$id_editors = (empty($id_editors)) ? 0 : $id_editors;
$id_admins = (empty($id_admins)) ? 0 : $id_admins;


/** update information for links **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `links`='{$id_links}';";
$gDb->query($sql);

/** update information for categories **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `categories`='{$id_categories}';";
$gDb->query($sql);

/** update information for editors **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `editors`='{$id_editors}';";
$gDb->query($sql);

/** update information for admins **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `admins`='{$id_admins}';";
$gDb->query($sql);
]
?>
And run it on your server.

Please post the result.

metz
09-19-2006, 09:32 PM
TanX...

Looks like it worked like a charm :wink:

Will test it out tomorrow putting out some links...

Tried some test ones now.. and they got submitted as they should..

I'll let you know if the problem accours again..

Tanx again...

-Tom-