Page 1 of 1

SSEP - Site Search Engine PHP-Ajax

Posted: 06 Nov 2014, 12:50
by Admin
Here add questions, or any issue related to the SSEP Search engine script from this page:
SSEP - Site Search Engine PHP-Ajax (current version: 1.5).

- A Free and Open Source Site Search engine script, build with PHP and Ajax, that uses MySQL to store your website's indexed pages, to create and add Search Functionality to Your Web Site.

SSEP - Site Search Engine PHP-Ajax

Posted: 11 Nov 2014, 14:30
by queengab
Hi,

i'd like to start using ssep. This script seems awasome!
I tried to install it on a third level domain search.mydomain.com, i follow readme instructions but when i try to launch the script i encounter this problem:

Code: Select all

Parse error: syntax error, unexpected '[', expecting ')' in /mypath/index.php on line 9.
I opened then index.php and in line 9 there is definition of the cash but where is the error...

I'm not sure i have on my server php 5.4 and mysql 5.2
Exist a previuos version of the script that requires small requirements? ie php 5.3 and mysql 5.1

Thanks very much!
Gabriele

SSEP - Site Search Engine PHP-Ajax

Posted: 11 Nov 2014, 15:34
by MarPlo
Hi
That error is because the PHP version is lower than 5.4.
The script uses: [ ] for array elements; sintax added in PHP 5.4+.
To can use this script with PHP 5.3 you have to replace all the: [elements] with old sintax: array(elements) (if you know php).

Another solution, if the hosting server supports to set the PHP version, add this code in ".htaccess" file.

Code: Select all

AddType application/x-httpd-php54 .php
Or try to talk with the administrator of the hosting server, if it has PHP with a newer version.

SSEP - Site Search Engine PHP-Ajax

Posted: 12 Nov 2014, 10:40
by queengab
Hi Marplo,

thanks very much for your fast response!
I used .htaccess method only to accelerate the process :). But with patience i can also try to modifiy array calls for php 5.3 and then distribuite.
Now perhpas i have another problems...
I read that ssep create automatically db tables with a method inside crawlindex.php, but if i try to launch an indexation of a domain i receive this error:

Code: Select all

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mytable.ssep_domain' doesn't exist 
The db user have all privilegies on the db i don't know why the script doesn't write correctly on db.
I can create manually the tables but i would like to know how to launch it automatically.

I think ssep is the best solution for search indexing... I have a little project to render static some websites and i think ssep is the best solution.

EDIT:
Resolved!
The issue was a problem with the browser session.
When initialiting the indexing the session remain to 0 and the script coudn't start the initialition of the first domain that i set to auto on the config!

Thanks very much!

PS: is there a way to index a domain and all subdomains?

SSEP - Site Search Engine PHP-Ajax

Posted: 12 Nov 2014, 14:38
by Admin
Hi
Thanks for your appreciations for this Search engine application.
Every time the admin sends the form to logg in "admin.php", the script calls the createMainTables() method that creates the main tables, if not exist.

Anyway, I upgraded the SSEP application, in this version (1.4) the script checks the PHP version, and displays error message if the version on server is lower than 5.4.
Also, I added the posibility to create the tables by accessing this address on your browser (after logg in as Admin):

Code: Select all

http://your_domain/ssep/admin.php?mod=create_tables
- I not made the SSEP to follows subdomains of current crawled domain because I cannot test properly this feature (not have website with subdomain).
But, if you want to test it, delete /comment this line of code in "crawlindex.php" (line 245, in the addUrls() method):

Code: Select all

$urls = array_map(function($url){ return '/'. ltrim(preg_replace('@(http|https)://(www\.){0,1}'. $this->domain .'@i', '', $url), '/');}, $urls);
And delete /comment this code in "sitesearch.php" (line 404, in the setHtmlSrc() method):

Code: Select all

$url = $rows[$i]['protocol'] .'://'. $rows[$i]['domain'] .'/'. ltrim(rawurldecode($rows[$i]['url']) , '/');
- If it works, I'll add this feature as an option in Admin Panel.

SSEP - Site Search Engine PHP-Ajax

Posted: 19 Nov 2014, 16:49
by gabtram
Hi to all,

The option for creating tables it's fantastic! i think it is the good way.
Thanks besides for the options for subodmains... i'll check it and soon i can report my impressions...

I'd like to ask you some kinds of thins.

I tried to indexing innocentievasioni.net/ and abuondiritto.it
If i index them with the options indexing, ssep find some links but a few...
So i create a sitemap and load with ssep but ssep don't recognize my sitemap..so i cut and paste all the links and finally it works! :)

Which is the right format for the sitemap? And in your opinion why don't index all site...
I think ssep is in continuing in developing and i really apprecciate your work!

Thanks
Gabriele

SSEP - Site Search Engine PHP-Ajax

Posted: 19 Nov 2014, 17:59
by Admin
The format for the sitemap used by SSEP is the XML Sitemap that can be added in Google Webmaster Tools. And it reads the URL address added in the <loc>...</loc> element. You can get /test it with the "Get Sitemap" button in the SSEP Admin Panel.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
 <loc>https://coursesweb.net/</loc>
 <changefreq>weekly</changefreq>
 <priority>1.00</priority>
</url>
<url>
 <loc>https://coursesweb.net/php-mysql/</loc>
 <changefreq>weekly</changefreq>
 <priority>1.00</priority>
</url>
</urlset>
If you know other general / standard XML sitemap format, add an example here to can implement it in SSEP.

The SSEP search engine follows the internal links which it founds in the pages that it crawls, starting from the first page you add to index, it follows the <a> links.
If some pages are not indexed it is because there is not links to those pages in the previous indexed pages.
It follows and indexes the links that can find in pages that were not already indexed, one by one.
I not know how to explain it bether than that.

SSEP - Site Search Engine PHP-Ajax

Posted: 21 Nov 2014, 13:27
by gabtram
Hi,
Yes my sitemap format was incorrect, thanks!

Code: Select all

	<url>
		<loc>mysite/</loc>
		<lastmod>2014-11-12</lastmod>
		<changefreq>monthly</changefreq>
		<priority>0.9</priority>
	</url>
I delete <lastmod> tag on all xml, then uploaded on ftp and it works! Thanks very much.
I understood also how indexing works. But i have to transfomr 3 sites from dynamic to static and indexing all, so i have to generate sitemap with a software (i use xenu: home.snafu.de/tilman/xenulink.html ) and then send sitemap to seep.

Do you know some other software for sitemap. In the nex few days i try also with subdomains and report what happen!

I tried to /comment the line you suggest me but when i try to reindex my site i found this error

Code: Select all

1) URL: http://www.mysite.com - Succesfully Indexed - Depth: 0 - Time: 1.249282 - Size: 26.84 KB
• Added 3 new links, with depth: 1
- Cannot get Page data from: http://www.mysite.comhttp://www.mysite.com/mypage1.html - Status: 0
I think the problem is: without that lines scirpt can write the url in the correct way.
I'll do some other tries.

Thanks
Gabriele