Author Topic: Searching not working with PHP5  (Read 19102 times)

0 Members and 1 Guest are viewing this topic.

Offline WeZ

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Searching not working with PHP5
« Reply #15 on: August 14, 2006, 11:27:14 PM »
V@no,

sorry mate, but which security fix are you talking about?

i only found a search.php fix but it was for 1.7.1 and my 1.7.2 is fine - but then why would i also be experiencing this?

Ciao

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Searching not working with PHP5
« Reply #16 on: August 15, 2006, 12:24:49 AM »
which security fix are you talking about?
All of them. Whatever bug fix is published for your 4images version you should install it.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline WeZ

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Searching not working with PHP5
« Reply #17 on: August 15, 2006, 01:58:27 AM »
and i will as soon as all my functionality is in order... so right now i need to get to my main prob and that is the search not working which was suggested that it was fixed by a security patch... so please, which one will help me with this php5 prob?

thanks

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Searching not working with PHP5
« Reply #18 on: August 15, 2006, 04:25:24 AM »
I didnt say it was fixed by a security patch, what I said was that if you would have applyed all the bug fixes this should not have happend...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline WeZ

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Searching not working with PHP5
« Reply #19 on: August 16, 2006, 12:22:28 AM »
Hi V@no,

coming from a software dev company i can understand where you are coming from.

so to move ahead with my problem, i have applied all the bugfixes applicable for 1.7.2
i then cleared out the index and completely rebuilt it.

still not working...

but i have narrowed the problem down, is that the partial match is not working.

if an image has the name "Carola del bianco copy" and i search for "carola" - it returns the image. if i search for "carol" or even "carol*" it returns nothing.

any ideas or do you need to see my php's

Kind Regards,
WeZ

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Searching not working with PHP5
« Reply #20 on: August 16, 2006, 12:53:55 AM »
Thats interesting...are there any non-latin letters in the name? (probably not, but want to make sure ;))
Can I test it?
if you search directly in the database in 4images_wordlist table, an you find word "carola"?
i.e. you can use this query:
Code: [Select]
SELECT *
FROM 4images_wordlist
WHERE word_text LIKE 'carola'
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline WeZ

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Searching not working with PHP5
« Reply #21 on: August 16, 2006, 01:13:55 AM »
Hi V@no,

thanks for the prompt help as usual...

No, no latin letters - this is with any image i try search on...

your SQL query came back with:
word_text   word_id 
carola          8354

and running it with 'carol' didn't return anything as well.

does this Help?

Offline WeZ

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Searching not working with PHP5
« Reply #22 on: August 16, 2006, 01:16:15 AM »
Hi V@no,

'carol*' also didn't return anything in SQL either  :roll:

Kind Regards,
WeZ

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Searching not working with PHP5
« Reply #23 on: August 16, 2006, 02:16:59 AM »
hmm...I think its a bug...well, at least even in v1.7.3 it seems you cant search for partial word...I'll try investigate it ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline WeZ

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Searching not working with PHP5
« Reply #25 on: August 16, 2006, 10:50:53 AM »
Hi Mawenzi,

That didn't help. Thanks for the attempt anyway - I will be interested on what V@no comes up with as it looks like a SQL thing

Kind Regards,
WeZ

Offline WeZ

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Searching not working with PHP5
« Reply #26 on: August 16, 2006, 01:51:52 PM »
Hi V@no and Mawenzi,

after a self-inflicted crash course in mysql  8O i found that the running your code
Code: [Select]
SELECT *
FROM 4images_wordlist
WHERE word_text LIKE 'carola'

returns one result but running the code
Code: [Select]
SELECT *
FROM 4images_wordlist
WHERE word_text LIKE 'carol*'

returns no result

but running the code
Code: [Select]
SELECT *
FROM 4images_wordlist
WHERE word_text LIKE 'carol%'

returns two results

further testing shows that if i use % as the partial operator, then the expected results occur.

Now that we have identified the problem How do i Proceed (seeing as 4images uses * as it's operator)?

Thanks

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Searching not working with PHP5
« Reply #27 on: August 16, 2006, 02:49:15 PM »
actualy 4images already converts * into %...the problem is somewhere else...(I didnt have chance to look into it yet :oops: )

[edit]
Just realized, in v1.7.3 this is a bug, and Jan is working on it...
As of v1.7.2 and below, this particular issue never came up, so its possible something on your end...try use fresh search.php and apply the bug fixes.

Meanwhile you can try add in search.php above
Code: [Select]
      $search_word_cache[$i] = array();
This:
Code: [Select]
      echo $sql;
Then search for carol* it should show you the mysql query it used for searching, see if its correct ;)
« Last Edit: August 16, 2006, 03:11:21 PM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)