SSEP SQL query and ssep_pgd_1 table not exist

Place for comments, problems, questions, or any issue related to the JavaScript / PHP scripts from this site.
magisthan
Posts: 7

SSEP SQL query and ssep_pgd_1 table not exist

Hi,

I am new to the SSEP. I installed the script but I got some problems with the index.

First there was an error like this:

Code: Select all

URL: https://***********/cgi-bin/yabb2/YaBB.pl Registered - Depth: 1 - Time: 0.291925 - Size: 101.61 KB; BUT Cannot save its Page Data.Unable to prepare the SQL query, check if SQL query data are correctly
and then there is an error by index the domain, like this:

Code: Select all

Table '4832106db9.ssep_pgd_1' doesn't exist
In my MYSQL there are the ssep_domain, ssep_sets and ssep_url_1.
ssep_domain cotains the my domain
ssep_sets is empty
ssep_url_1 contains the folder from the domain 3089 data sets which are registered but not indexed.

Can anyone help me?

Admin Posts: 805
Hello,
I do not know way the ssep_pgd_ table was not created.
Try create it manually, execute this sql query in PhpMyAdmin, in your database:

Code: Select all

CREATE TABLE IF NOT EXISTS ssep_pgd_1 (idurl INT UNSIGNED UNIQUE PRIMARY KEY, title VARCHAR(100), description VARCHAR(150), content TEXT NOT NULL DEFAULT '', size VARCHAR(15) NOT NULL DEFAULT '', FULLTEXT(title), FULLTEXT(description), FULLTEXT(content)) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci
- Then reindex the url.

magisthan Posts: 7
I think I did no get the point.

I dont use phpadmin I have a console from my webhoster (world4you). But where can I use code in MySQL?

Admin Posts: 805
PhpMyAdmin is an application for working with mysql database, and it should be in CPanel.
Anyway copy the following code in a php file (for example table.php), put your data for connecting to your database, copy the file on your server.
Run that php file in your browser, the table ssep_pgd_1 will be created.
Then you can delete that php file.

Code: Select all

<?php
// Here change with your data to connect to mysql database
$conn = new mysqli('localhost', 'username', 'password', 'db_name');

// check connection
if (mysqli_connect_errno()) {
  exit('Connect failed: '. mysqli_connect_error());
}

// sql query for CREATE TABLE
$sql ="CREATE TABLE IF NOT EXISTS ssep_pgd_1 (idurl INT UNSIGNED UNIQUE PRIMARY KEY, title VARCHAR(100), description VARCHAR(150), content TEXT NOT NULL DEFAULT '', size VARCHAR(15) NOT NULL DEFAULT '', FULLTEXT(title), FULLTEXT(description), FULLTEXT(content)) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci";

// Performs the $sql query on the server to create the table
if ($conn->query($sql) === TRUE) {
  echo 'Table successfully created';
}
else {
 echo 'Error: '. $conn->error;
}

magisthan Posts: 7
Hello,

I have done as you wrote but I got the following error:

Code: Select all

Error: BLOB, TEXT, GEOMETRY or JSON column 'content' can't have a default value

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''', size VARCHAR(15) NOT NULL DEFAULT '', FULLTEXT(title), FULLTEXT(description)' at line 1

Admin Posts: 805
That MySQL error was the cause way the ssep_pgd_ table it is not automatically created by the script.
Try delete the default value from the content column, use this sql query:

Code: Select all

$sql ="CREATE TABLE IF NOT EXISTS ssep_pgd_1 (idurl INT UNSIGNED UNIQUE PRIMARY KEY, title VARCHAR(100), description VARCHAR(150), content TEXT NOT NULL, size VARCHAR(15) NOT NULL DEFAULT '', FULLTEXT(title), FULLTEXT(description), FULLTEXT(content)) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci";

magisthan Posts: 7
Thanks.

That worked. I can see the table in the mySQL DB.

I now tried to re-index the page and now I get this error to all index pages:
2019-07-24_181606.jpg
2019-07-24_181606.jpg (144.67 KiB) Viewed 1338 times
Thanks.

Admin Posts: 805
I made some changes in the SSEP script.
Download it again from this site, delete the script and the ssep_ tables from your server, then reinstall it.
If you get those errors, try test the script on localhost on your computer (for example with XAMPP ).
On localhost you can index your website, after you add it in the "Add Domain" list.
I just tested again the script on localhost, I indexed a few URLs from your site, and it worked as you can see in the image below (the error is from a broken link in your pages).
Attachments
ssep_test_ragbag.jpg
ssep_test_ragbag.jpg (138.81 KiB) Viewed 1331 times

magisthan Posts: 7
Hi,

I was crawling the domain with re-index including all sud directories. After some crwaling the script suddenly stopped on some point. I repeated the process and again same error. Everytime crawaling stops after round about 1.000 index files.

Admin Posts: 805
Did you get any error message?
When you indexed the site for first time did it worked with all pages?

Maybe it exceeds the memory limit, I don't know.
I just tested the script, reindexed 1500 links and it worked.
There is another way to reindex the site, first deleting the indexed data.
Click on the buttons: "Clean content", and "Delete Indexed pages"; then you can index the site without checking the ReIndex button.

Also, You can use the SSEP script to index the site on localhost (on your computer), then Import the tables from mysql on the server of your site.