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

Problems with nph-build.cgi

Quote Reply
Problems with nph-build.cgi
Hi!

I do have a problem with nph-build.cgi via telnet (since today, never had it before!). When it comes to the "updating votes and hits", a lot of numbers run down the screen (similar to the re-index), and it seems not to come to an end. I am now at 40000, but I only have 11.000 links. An my site does not work to, I always get the error:

DBSQL (4272): Fatal Error: Unable to execute query: DELETE FROM Hits_Track WHERE TO_DAYS(NOW()) - TO_DAYS(created) > 2. Reason: Got error 127 from table handler at jump.cgi line 70

What is wrong? Can somebody help me?

Quote Reply
Re: Problems with nph-build.cgi In reply to
It would help us to know what modifications you have added. If you have not added any new MODS, then I would recommend EMPTYing the Hits_Track table and then try re-building.

Regards,

Eliot Lee
Quote Reply
Re: Problems with nph-build.cgi In reply to
Thanks Eliot!

I did no Mods, so I wondered why this happened. How do I empty the Hits_Track table?

Quote Reply
Re: Problems with nph-build.cgi In reply to
Uh...either use MySQLMan (which is a very helpful web emulerator program available via this site), editor.cgi, or use shell MySQL commands....

Code:

DELETE * FROM Hits_Track


Regards,

Eliot Lee
Quote Reply
Re: Problems with nph-build.cgi In reply to
For whatever reason, the HitsTrack table often gets corrupted.

You are actually better off to use MySQLMan to dump the structure, then drop the table, then recreate the table.

Usually everything fixes itself when you do that.

Hits_Track is a non-critical table -- it just keeps track of the hits between builds, but it gets a _lot_ of action on busy sites.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Problems with nph-build.cgi In reply to
Thanks pugdog and Eliot! I'll give it a try...

Quote Reply
Re: Problems with nph-build.cgi In reply to
Hi Eliot and pugdog!

But now I have another problem: I've imported all my links again and it worked (for one day). But today all my links in the links table were gone (Status -> 0 Links). How can this happen? Is it my internet-provider (quite slow) or may it be a problem quite many users are on my site at the same time? This is now really a problem, for my ISP is that slow that I can import links just in 25 links a row (with 11.000 Links). An import takes about 10 hours to do. What can I do?

Quote Reply
Re: Problems with nph-build.cgi In reply to
I don't know why you'd drop and try to re-import all the links again.

The hit_track table was the only problem. Everything else worked.

If there are no links in your database, it has to be something your ISP has done. It's not easy to delete links from within links itself.

Before going crazy, you might try to make sure all your links have Weights in the proper fields (check the Admin>Tables>Links and make sure at least some fields are not '0'.

Then, re-index.

See what happens at that point.

WHen you import, you must re-index. But if you don't have any weights, the index will just re-set to empty.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Problems with nph-build.cgi In reply to
Thanks pugdog!

I problem was, that I couldn't wait too long (so I had to import the links before your posting), since my visitors grew annoyed.

I did a re-import of all the links with editor.cgi (25 rows via text-import). When all was done (after 10 hours) I did a rebuild (the index of the links was all right). I did not do a re-index, I wanted to do this night (for it also takes about a few hours). But today all the links were gone.

Perhaps you could tell me how I do an import of my database via telnet or so. I am a beginner, so I don't really know to commands. I have the database on my computer, I think I do have to FTP it and then give some commands? Could you explain it to me how to do this, please?

Quote Reply
Re: Problems with nph-build.cgi In reply to
The best way would have been to _not_ delete the links!

There are various problems using import.pl to add in links.

Also, there are problems with the delimited files using MySQLMan.

It would have been _soooooo_ much easier if you had done a dump first.

What you can try, is using MySQLMan, (if you don't have that on your server, install it in the .../cgi-bin/links/admin/mysqlman subdirectory.

In the SQL Monitor area, there is an IMPORT. Upload the files to your server, and then give the path to the program to import the files.

Everyone has varying degrees of success.

If you have an SQLdump, meaning you have INSERT statements, it becomes very, very easy. Put the file on your server, then just import the file:

mysql -u USER -pPASS YOURDATABASE < backup.txt

If you were able to successfully cut/paste the file in,then either of the options should work for you.

You need to import the Links, Categories and Users.


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Problems with nph-build.cgi In reply to
Thanks pugdog!

I'll reply it to see if I have understood everything right:

1. Since my Links-Table is empty and I do not have a dump file, I reimport all my links with the editor.cgi.

2. When all links (and categories...) are imported, I do a dump with the MySQLman.

3. When my database crashes again, I copy the dump-file to my root directory and do an import with the SQL-monitor via the editor.cgi.

4. Then rebuild and reindex (after setting the weights correctly).

Is this ok? Thank you very much for your help!!!

Quote Reply
Re: Problems with nph-build.cgi In reply to
Hi pugdog!

I had a phone call with my ISP and wonder what, all the links are there again! But now the old problem with the hits_track table. Where do I put that command "DELETE * FROM Hits_Track" in? In the SQL monitor in editor.cgi I get a syntax error. MySQLMan ist not (yet) installed. I don't think that it is to delete the field hits, or is it? Thanks for your great help!!

Quote Reply
Re: Problems with nph-build.cgi In reply to
Ok.

You can't just delete-all and have it work. You need to drop the table, and recreate it. It's a problem with the index files. They are automatically recreated when the table is created.

If you have MySQLMany installed, it is easy. If not, INSTALL IT!!! :)

Go to your database.

In the SQL DUMP area, you want to dump to screen, ONLY the Hits_Track table, with NO data. When you click the form button, you should see a small amount of code at the top to create the table. Copy this to an editor.

Then drop the Hits_Track table. It will disappear.

Then, in the SQL Monitor, copy the code from the first step into the box, and run it.

You will now have a blank, new Hits_Track table.

Everything should be fine.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Problems with nph-build.cgi In reply to
Great!!! It works!

Thanks a lot, pugdog, you're a great help!! If I now want to save my whole database, I'll do the same? I go to SQLDump an dump the hole database to backup.txt. Then I do have a file with about 5 MB. And then? How do I do the import?

Quote Reply
Re: Problems with nph-build.cgi In reply to
You can import a dump on the SQM Monitor screen. You can give it a local or remote file name.

I _strongly_ suggest when dumping the database to dump the table structure only (no data) to one file, then the data to another file. This lets you rebuild the database as well as the data easily.

If you have a lot of links, I would dump the links separately, into it's own file, with "Create table" statements included. Then dump the rest of the files into their own file.

The _only_ files you really need are the Links, Categories and Users, as long as you have done a recent "build" of the site. All the other tables are either visitor tracking and updates or generated by the re-index and build.

The problem with large databases is that the HTML process will time out on large imports (dumps are much, much faster). You may have to do it via telnet.

In order to do it via telnet, you need to either write out the "insert statements with each field named" or you need to have a database set up _exactly_ like the data, with _all_ the fields of _all_ the tables in the same order. Then, you can just use the 'mysql' command directly and feed the file into the program using the '<' character.

The "dumpfile" is really just a lot of SQL commands, one after another, which is why it's portable from machine to machine.

The mysql database engine views the file as a user typing in commands very, very fast :) <G>

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ