4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: xico on May 20, 2005, 03:10:03 AM
-
Is there a bug with PHP5 and searches...? I just install a fresh 4images 1.7.1 and the search can not find any image on the public side but on the admi side it does.
Any clue?
Thanks
-
what are searching for?
-
How about a link to where this is happening so we can try it out?
-
Sure.. sorry.. http://200.78.201.39/ there is only one image and the search option does not find it
-
Interesting. I don't think 4images has been adequately tested against PHP 5. Try the [Plugin] Rebuild Search Index (http://www.4homepages.de/forum/index.php?topic=6718.0) and see if that helps. Otherwise I have no other ideas
-
I rebuild the index with the Rebuild Plugin with no successfull :(
-
look up in the database. make sure there are some keywords in 4images_keywords table.
-
also, a link to your phpinfo could help too ;)
-
http://200.78.201.39/info.php :P
And there is words in the word_list table
word_text
word_id
just
flower
test
image
glass
soccer
two
persons
and
ball
person
-
Fixed...i move the configuration files in search.php up to the top of the file
-
Fixed...i move the configuration files in search.php up to the top of the file
Hi
Could you explain what you did to fix your problem (for limited knowledge people).
I am encountering the same problem running OS 10.4 on a Mac. No search results although all keywords & descriptions are present.
If the original author is not around, can anyone else point me in the right direction.
By the way, excellent software. I have tried Coppermine, Snipegallery, phpwebgallery and others - and once search is sorted out, I think all will be good.
-
Okay. Me did it too!! :)
the following lines in search.php:
$main_template = 'search';
define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/search_utils.php');
$search_id = array();
cut and paste just below the licensing info. If I'm wrong, please post here.
-
Thats really amazing! 20% of all postet gallery links here have this problem with the search.php...how did you find it out?
It really works...I was really sick about this bug!
Thank you :)
-
If you would install all the fixes (especialy security fixes), then you would not have this issue ;)
-
Okay, but for Newbies its not easy to find out how getting started...Three days ago, I installed 4images at the first time and its hard to get started when youŽre not a php crack ;) Maybe in 2 weeks IŽll find it funny, but now Im glad having solved the search problem...
-
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
-
which security fix are you talking about?
All of them. Whatever bug fix is published for your 4images version you should install it.
-
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
-
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...
-
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
-
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:SELECT *
FROM 4images_wordlist
WHERE word_text LIKE 'carola'
-
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?
-
Hi V@no,
'carol*' also didn't return anything in SQL either :roll:
Kind Regards,
WeZ
-
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 ;)
-
@ WeZ
try this -> http://www.4homepages.de/forum/index.php?topic=13990.msg75500#msg75500
-
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
-
Hi V@no and Mawenzi,
after a self-inflicted crash course in mysql 8O i found that the running your code
SELECT *
FROM 4images_wordlist
WHERE word_text LIKE 'carola'
returns one result but running the code
SELECT *
FROM 4images_wordlist
WHERE word_text LIKE 'carol*'
returns no result
but running the code
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
-
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 $search_word_cache[$i] = array();
This: echo $sql;
Then search for carol* it should show you the mysql query it used for searching, see if its correct ;)