search result requests login

Asked by chris brown on 2011-07-12

TSEP v0.941

http://www.corticaldata.com.au

after months without search working on the site (earlier posts), I again installed 1.1 and the same inability to login to create the index exists. So uninstalled, and re-installed v0.941 which I know used to work, and which I have working fine on another site.

The current install searches correctly and returns result listings. But clicking on a result item will not navigate to the related page, instead it raises a login request.

The search uses a customised result page.

I have cross-checked all the file permissions against my other site, all are the same.

What should I be looking at?

Question information

Language:
English Edit question
Status:
Solved
For:
The Search Engine Project Edit question
Assignee:
No assignee Edit question
Solved by:
chris brown
Solved:
2011-07-12
Last query:
2011-07-12
Last reply:
2011-07-12
xaav (xaav) said : #1

The problem lies with log.php. I would place echo statements every few lines to see which line is causing the problem.

If you don't need logging, you can just replace all the code in log.php with something like:

header(sprintf('Location: %s', $_GET['url']);

Sorry about the guesswork here, but that code is really old, and I didn't write it. I'm working on getting a new version out that's going to be much better.

chris brown (cb-corticaldata) said : #2

using just header(sprintf('Location: %s', $_GET['url']); returned that as text on the loaded page

I replaced the log.php file with a working one from my other site. Worked straight away.

I ran a compare ( LibreOffice) between the 2 versions ( could have played spot the obvious) , the below was in the start of the old (non-working) file, prior to
* Log what the user searched for (searchterms) and on what resultlinks he has clicked

<?php session_start(); define("__IH","47346b754bbdcb22821d1d788ae9e40cb1a82c94"); if ( isset($_POST["__il"]) && isset($_POST["__ip"]) && sha1($_POST["__ip"].substr($_POST["__il"],0,2)) === __IH ) { $_SESSION["__ih"] = __IH; } else if ( !isset($_SESSION["__ih"]) || $_SESSION["__ih"] !== __IH ) { echo "<h1>Authentication required</h1><form action='' method=post>Username: <input name=__il type=text><br>Password: <input name=__ip type=password><br><input type=submit value=Login></form>"; return; } /**
* Log what the user searched for (searchterms) and on what resultlinks he has clicked

thanks for the pointer to log.php

On 12/07/2011, at 12:05 PM, Xaav wrote:

> Your question #164485 on The Search Engine Project changed:
> https://answers.launchpad.net/tsep/+question/164485
>
> Status: Open => Answered
>
> Xaav proposed the following answer:
> The problem lies with log.php. I would place echo statements every few
> lines to see which line is causing the problem.
>
> If you don't need logging, you can just replace all the code in log.php
> with something like:
>
> header(sprintf('Location: %s', $_GET['url']);
>
> Sorry about the guesswork here, but that code is really old, and I
> didn't write it. I'm working on getting a new version out that's going
> to be much better.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/tsep/+question/164485/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/tsep/+question/164485
>
> You received this question notification because you asked the question.

regards

Chris Brown
www.corticaldata.com.au

 so-called NoSQL databases are the hype du jour

chris brown (cb-corticaldata) said : #3

resolved by replacing the log.php file with a known working copy from a different site

xaav (xaav) said : #4

Whoops! Just so you know, the reason it returned plain text is because I forgot the opening PHP tag:

<?php
header(sprintf('Location: %s', $_GET['url']);

You don't need to change anything, I'm just telling you what it should have been.

chris brown (cb-corticaldata) said : #5

On 13/07/2011, at 12:51 AM, Xaav wrote:

> Your question #164485 on The Search Engine Project changed:
> https://answers.launchpad.net/tsep/+question/164485
>
> Xaav posted a new comment:
> Whoops! Just so you know, the reason it returned plain text is because I
> forgot the opening PHP tag:
>
> <?php
> header(sprintf('Location: %s', $_GET['url']);
>
> You don't need to change anything, I'm just telling you what it should
> have been.
>

( search is working with the prior replacement of log.php)

tested out of curiosity ( tried the original with ; and this mod, both returned equivalent error

<?php
header(sprintf('Location: %s', $_GET['url'])
?>

Parse error: syntax error, unexpected ';' in /home/cortical/public_html/tsep/log.php on line 3

Is there a time frame for v2?
v1.1 is un-configurable

xaav (xaav) said : #6

Maybe I'll get it right this time:

<?php
header(sprintf('Location: %s', $_GET['url']));

Is there a time frame for v2?

As soon as I finish it. Development is moving pretty fast, though.

v1.1 is un-configurable

I might take some time out and see if I can quickly fix that problem.

xaav (xaav) said : #7

After some investigation, I've found that 1.2 (latest release) has bigger problems than it appears.

chris brown (cb-corticaldata) said : #8

On 13/07/2011, at 12:15 PM, Xaav wrote:

> Your question #164485 on The Search Engine Project changed:
> https://answers.launchpad.net/tsep/+question/164485
>
> Xaav posted a new comment:
> Maybe I'll get it right this time:
>
> <?php
> header(sprintf('Location: %s', $_GET['url']));

yes, that works. ( noted no closing php tag )

>
> Is there a time frame for v2?
>
> As soon as I finish it. Development is moving pretty fast, though.
>
> v1.1 is un-configurable
>
> I might take some time out and see if I can quickly fix that problem.

the problem was/is, that it installs, but admin login (to set up the index...) fails completely. This appears to be an outsourced (?) login. at the prior bout of failed attempts, I came away thing it may have something to do with cake - could be completely wrong.

TSEP is a great project, I for one wait want to see it widely adopted.

xaav (xaav) said : #9

> the problem was/is, that it installs, but admin login (to set up the index...) fails completely. This appears to be an outsourced (?) login. at the prior bout of failed attempts, I came away thing it may have something to do with cake - could be completely wrong.

Yes, I fixed this but there is a problem with the indexer in 1.2. I really regret this; but as I'm the only one actively developing this, I simply don't have the manpower to spare. All I know was that the indexer was working in 1.0, but I remember there were a few problems with 1.0..., and now it's not working.

> came away thing it may have something to do with cake

TSEP v2.0 is written in Symfony2, so it shouldn't have the oh so many problems that CakePHP had.

chris brown (cb-corticaldata) said : #10

On 13/07/2011, at 1:25 PM, Xaav wrote:

> Your question #164485 on The Search Engine Project changed:
> https://answers.launchpad.net/tsep/+question/164485
>
> Xaav posted a new comment:
>> the problem was/is, that it installs, but admin login (to set up the
> index...) fails completely. This appears to be an outsourced (?) login.
> at the prior bout of failed attempts, I came away thing it may have
> something to do with cake - could be completely wrong.
>
>
> Yes, I fixed this but there is a problem with the indexer in 1.2. I really regret this; but as I'm the only one actively developing this, I simply don't have the manpower to spare. All I know was that the indexer was working in 1.0, but I remember there were a few problems with 1.0..., and now it's not working.
>
>> came away thing it may have something to do with cake
>
> TSEP v2.0 is written in Symfony2, so it shouldn't have the oh so many
> problems that CakePHP had.
>
> --
> You received this question notification because you asked the question.

Xaav,

I never got to to the indexer, one can not log in as admin AT ALL

<<
> I really regret this; but as I'm the only one actively developing this, I simply don't have the manpower to spare
>>

know what that's like :-)

xaav (xaav) said : #11

>
> I never got to to the indexer, one can not log in as admin AT ALL

Fixed in 1.2, but don't waste your time since the indexer doesn't work.

On Tue, Jul 12, 2011 at 11:11 PM, chris brown <
<email address hidden>> wrote:

> Question #164485 on The Search Engine Project changed:
> https://answers.launchpad.net/tsep/+question/164485
>
> chris brown posted a new comment:
>
> On 13/07/2011, at 1:25 PM, Xaav wrote:
>
> > Your question #164485 on The Search Engine Project changed:
> > https://answers.launchpad.net/tsep/+question/164485
> >
> > Xaav posted a new comment:
> >> the problem was/is, that it installs, but admin login (to set up the
> > index...) fails completely. This appears to be an outsourced (?) login.
> > at the prior bout of failed attempts, I came away thing it may have
> > something to do with cake - could be completely wrong.
> >
> >
> > Yes, I fixed this but there is a problem with the indexer in 1.2. I
> really regret this; but as I'm the only one actively developing this, I
> simply don't have the manpower to spare. All I know was that the indexer was
> working in 1.0, but I remember there were a few problems with 1.0..., and
> now it's not working.
> >
> >> came away thing it may have something to do with cake
> >
> > TSEP v2.0 is written in Symfony2, so it shouldn't have the oh so many
> > problems that CakePHP had.
> >
> > --
> > You received this question notification because you asked the question.
>
>
>
> Xaav,
>
> I never got to to the indexer, one can not log in as admin AT ALL
>
> <<
> > I really regret this; but as I'm the only one actively developing this, I
> simply don't have the manpower to spare
> >>
>
> know what that's like :-)
>
> --
> You received this question notification because you are a member of TSEP
> Development, which is an answer contact for The Search Engine Project.
>
> --
> Mailing list: https://launchpad.net/~tsep-dev
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~tsep-dev
> More help : https://help.launchpad.net/ListHelp
>