Search - No Image to Display Search - No Image to Display
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Search - No Image to Display

Started by railroadfan, March 16, 2005, 06:39:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

railroadfan

I'm having a problem when using the search function.   After typing in a search, such as "bnsf", when i click on any image on the page, along with any sub pages, i get
No image to display

File: /home/railroad/public_html/gallery/displayimage.php - Line: 590


I haven't changed any of the code on this end for that file.  Is it possibly a permissions error?  At the bottom is the debug information.  Please help.

I believe this not to be a cookie issue like others are having.  I've tried this on my home machine with IE and moziilla, clearing all temp files, but same error.  Even had others that hadn't visited before, and they can't click on a thumbnail to then show the picture.

Here is a link to the page:  http://www.railroadfan.com/gallery/search.php
search for "bnsf" or "no"

USER:
------------------
Array
(
    [ID] => a3685244264c269dbf5e0723adad2c06
    [am] => 1
)

==========================
USER DATA:
------------------
Array
(
    [0] => 2
    [user_id] => 2
    [1] => railroadfan
    [user_name] => railroadfan
    [2] => 1
    [user_level] => 1
    [groups] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 28
        )

    [group_quota] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [upload_form_config] => 3
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [custom_user_upload] => 0
    [disk_max] => 500000
    [disk_min] => 0
    [ufc_max] => 3
    [ufc_min] => 3
    [has_admin_access] => 1
    [group_name] => Admin
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content FROM cpg132_filetypes;
    [1] => SELECT user_id, username as user_name, user_level FROM `railroad_phpbb1`.phpbb_users WHERE user_id='2' AND user_password='b427ebd39c845eb5417b7f7aaf1f9724' AND user_active='1'
    [2] => SELECT (ug.group_id + 5) as group_id FROM `railroad_phpbb1`.phpbb_user_group as ug LEFT JOIN `railroad_phpbb1`.phpbb_groups as g ON ug.group_id = g.group_id WHERE user_id = 2 AND user_pending = 0 AND group_single_user = 0
    [3] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg132_usergroups WHERE group_id in (1,2,28)
    [4] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 1
    [5] => DELETE FROM cpg132_banned WHERE expiry < 1110994545
    [6] => SELECT * FROM cpg132_banned WHERE ip_addr='67.162.205.244' OR ip_addr='67.162.205.244' OR user_id=2
)

==========================
GET :
------------------
Array
(
    [album] => search
    [cat] => 0
    [pos] => 7
)

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.10 - OK
------------------
mySQL version: 4.0.23-standard-log
------------------
Coppermine version: 1.3.2
==========================
Module: gd
------------------
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 0
Active Links 1
Client API version 4.0.23
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.0.7
Linked Version 1.2.0.7
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | -1 | -1
upload_max_filesize | 2M | 2M
post_max_size | 55M | 55M
==========================
Page generated in 0.111 seconds - 7 queries in 0.001 seconds - Album set :



foulu

it just normal error messega when search result is zero, i search your site with keyword msy and found 6 pics  :o

railroadfan

Quote from: foulu on March 17, 2005, 01:37:45 AM
it just normal error messega when search result is zero, i search your site with keyword msy and found 6 pics  :o

unfortunately, that wasn't what i was getting at.  My problem occurs after you search for, lets say, "msy", hit enter, and then you see the 9 results.  When you click on any one of the 9 thumbnail pictures, you get "no image to display".   the search result is correct, but clicking on the thumbnail is where my problem is.  Please help.

kegobeer

Did you download Coppermine from this site?  Does the header of search.php look like this:

// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.3.2                                            //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002-2004 Gregory DEMAR                                     //
// http://www.chezgreg.net/coppermine/                                       //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team                                        //
// (http://coppermine.sf.net/team/)                                          //
// see /docs/credits.html for details                                        //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify      //
// it under the terms of the GNU General Public License as published by      //
// the Free Software Foundation; either version 2 of the License, or         //
// (at your option) any later version.                                       //
// ------------------------------------------------------------------------- //
// CVS version: $Id: search.php,v 1.5 2004/07/24 15:03:53 gaugau Exp $
// ------------------------------------------------------------------------- //
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

donnoman

#4
How did you get the information into the database?

ie: http://forum.coppermine-gallery.net/index.php?topic=10841.0

Does this happen when logged in as the gallery admin? How about registered user? Or Anonymous user.

Turn on debug mode, write down the "album set" on each of these pages when you do your search:

write down the albums set, if you see any difference when logged in vs not; note these values for both scenarios and post your results.

search page:
results page:
displayimage page:

railroadfan

I downloaded Coppermine from this site, and it has all the same header of search.php


The way that I get information into the database is by using the batch add files area.  I FTP the images to a folder under the gallery/albums area.  I change the folder permissions to 777.  Then using the batch add files area, i put the images into their respective albums.  No manually configuring the database for me. 

---------
Logged in as Admin:
Search Page: Page generated in 0.056 seconds - 7 queries in 0.001 seconds - Album set :

Results Page: Page generated in 0.067 seconds - 10 queries in 0.001 seconds - Album set :

Displayimage Page: Page generated in 0.076 seconds - 7 queries in 0.001 seconds - Album set :
--------
Logged out as Anonymous:
Search Page: Page generated in 0.057 seconds - 6 queries in 0.001 seconds - Album set :

Results Page: Page generated in 0.067 seconds - 9 queries in 0.001 seconds - Album set :

Displayimage Page: Page generated in 0.078 seconds - 6 queries in 0.001 seconds - Album set :
---------
Logged in as registered user:
Search Page: Page generated in 0.055 seconds - 7 queries in 0.001 seconds - Album set :

Results Page: Page generated in 0.475 seconds - 10 queries in 0.409 seconds - Album set :

Displayimage Page: Page generated in 0.071 seconds - 7 queries in 0.001 seconds - Album set : 


-----------

on the "displayimage Page", i get the following error each time:

No image to display

File: /home/railroad/public_html/gallery/displayimage.php - Line: 590

------------
I hope this is the correct information you were looking for for the "albums set".  It was always display " - Album set :", and it would be blank afterwards.  Any ideas?

Nibbler

Have you tried clearing your cookies ? also a link to your site may be useful.

railroadfan

yes, i've tried clearing my cookies and temp internet files with both IE and mozilla.
Link to the site is http://www.railroadfan.com/gallery

both of these were mentioned on the first post on the thread.  I'll turn on debug mode if this would help.  Just let me know when, i'll keep checking this all day.  Not sure how many people are out there on easter :)

Nibbler

Sorry, I didn't notice that you were the original poster. Your site is not setting the _data cookie. What do you have set for the cookie name and path in coppermine ?

railroadfan

it's ok.  The cookie name is cpg132
The path for the cookie is /
The path for Coppermine is http://www.railroadfan.com/gallery

I do have a BBS as well, but they are listed as separare cookie names.  Using phpbb
http://www.railroadfan.com/phpbb

Thanks

railroadfan

Any word on what to do about not having the _data cookie being set?

railroadfan

Still needing some information on how to have my site set the _data cookie.  Thanks.

Nibbler

If you PM me an FTP account (soonish) I'll take a look. No promises though.

Nibbler

// Save the user profile in a cookie
function user_save_profile()
{
        global $CONFIG, $USER, $HTTP_SERVER_VARS;

        $data = base64_encode(serialize($USER));
        //setcookie($CONFIG['cookie_name'].'_data', $data, time()+86400*30, $CONFIG['cookie_path']);
}


Doesn't take a genious to figure out why the _data cookie isn't being set here.  ::)

Case closed.

railroadfan

thank you for helping me with this nibbler.  i really don't think that i commented it out..i didn't change any of that code...maybe my phpbb did that, don't know....anyway, glad you found this and corrected it. thanks!