Advanced search  

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]

Pages: [1]   Go Down

Author Topic: [Solved]: JPEG pics with missing url path (img src="") after upgrade  (Read 9988 times)

0 Members and 1 Guest are viewing this topic.

GGallery

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 61

hmm I just upgraded from 1.2 to 1.3 - it looks great but for one user I am getting "empty pics"
http://gallery.greatestjournal.com/thumbnails.php?album=7931

(see the little squares)

the record in the picture table for e.g. picture #4 on the top and the files in userpics/ look OK:
mysql> select * from cpg11d_pictures where owner_id=148959 and filename like '%mreow%';
+------+------+------------------+------------+----------+----------------+--------+---------+------+----------------+------------+----------+---------------+------------+-------+-------------------------------------------+---------+----------+----------+-------+-------+-------+-------+------------+---------+--------------+--------------+
| pid  | aid  | filepath         | filename   | filesize | total_filesize | pwidth | pheight | hits | mtime          | ctime      | owner_id | owner_name    | pic_rating | votes | title                                     | caption | keywords | approved | user1 | user2 | user3 | user4 | url_prefix | randpos | pic_raw_ip   | pic_hdr_ip   |
+------+------+------------------+------------+----------+----------------+--------+---------+------+----------------+------------+----------+---------------+------------+-------+-------------------------------------------+---------+----------+----------+-------+-------+-------+-------+------------+---------+--------------+--------------+
| 7840 | 7931 | userpics/158959/ | mreow.jpeg |    91338 |         134433 |    640 |     480 |   16 | 20040610092039 | 1086790119 |   148959 | stealingtears |          0 |     0 | and this is also john. dont you want him? |         |          | YES      |       |       |       |       |          0 |      14 | 66.233.1.147 | 66.233.1.147 |
+------+------+------------------+------------+----------+----------------+--------+---------+------+----------------+------------+----------+---------------+------------+-------+-------------------------------------------+---------+----------+----------+-------+-------+-------+-------+------------+---------+--------------+--------------+

devel]# ll albums/userpics/158959/*mreow*
-rw-r--r--    1 nobody   nobody      91338 Jun  9 07:08 albums/userpics/158959/mreow.jpeg
-rw-r--r--    1 nobody   nobody      29966 Jun  9 07:08 albums/userpics/158959/normal_mreow.jpeg
-rw-r--r--    1 nobody   nobody      13129 Jun  9 07:08 albums/userpics/158959/thumb_mreow.jpeg

CPG delivers these empty pic because it's not putting the path into the img src=:
img src="" class="image" width="0" height="0"

but why? I looked at many more pics on our gallery but they all seem to be OK (and the pics in question were uploaded yesterday)
« Last Edit: June 11, 2004, 02:53:37 am by hyperion »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: pics with missing url path (img src="") after upgrade
« Reply #1 on: June 10, 2004, 11:07:35 pm »

looks to me like you already heavily modified some files, especially the includes - I'm not sure what's wrong. I recommend setting up another cpg1.3.0 install that uses the same database table with unmodified files, just to be able to compare things and rule stuff out.

GauGau
Logged

GGallery

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 61
Re: pics with missing url path (img src="") after upgrade
« Reply #2 on: June 11, 2004, 12:35:17 am »

it breaks on pics with extrension '.jpeg'

function get_pic_url(&$pic_row, $mode) returns '' ... I am not sure where exactly and why, either because of:
$thumb_extensions = Array('.gif','.png','.jpg');

or in the very last line in that function:
return $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);


I actually upgraded to 1.3 without having any modifications done first and I got this effect right away on the .jpegs, then I added my (mostly theme/template related) patches

btw. love the: // Return the url for a picture, allows to have pictures spreaded over multiple servers
=> perfect to have the original pics somewhere on a slow IDE disk.
Logged

GGallery

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 61
Re: pics with missing url path (img src="") after upgrade
« Reply #3 on: June 11, 2004, 12:58:13 am »

it took me a while:

insert into cpg130_filetypes values ('jpeg', 'image/jpeg', 'image');
(or whatever your $CONFIG['TABLE_FILETYPES'] says) 'fixes' the problem.
« Last Edit: June 11, 2004, 03:13:24 am by hyperion »
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: [Solved]: pics with missing url path (img src="") after upgrade
« Reply #4 on: June 11, 2004, 02:17:14 am »

This MIME type seems to have been left out of the SQL files.

Users with tools like PHPMyAdmin may do this manually.

Otherwise, attached is a new update.sql file. Please note that it is currently named update.txt, so that it can be placed on this board.  You should change the file extension to .sql, which would make the file appear as update.sql on your webserver.

Users having this problem should replace the /sql/update.sql file with the one provided here.  Then the user should run the update.php file provided within CPG.  It is safe to run this file more than once.

[attachment deleted by admin]
« Last Edit: June 14, 2004, 09:17:53 pm by hyperion »
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=f0873409e7b0238c9b018100632837e3)

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: [Solved]: JPEG pics with missing url path (img src="") after upgrade
« Reply #5 on: June 11, 2004, 04:45:54 am »

@Hyerion - Have you committed this to the CVS? 
Logged
SANIsoft PHP applications for E Biz

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: [Solved]: JPEG pics with missing url path (img src="") after upgrade
« Reply #6 on: June 11, 2004, 05:42:42 am »

Not at the time of your posting, but the sql CVS files have been updated as of now.
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=f0873409e7b0238c9b018100632837e3)

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: [Solved]: JPEG pics with missing url path (img src="") after upgrade
« Reply #7 on: June 11, 2004, 06:41:50 am »

@Hyerion - thanks
Logged
SANIsoft PHP applications for E Biz
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 22 queries.