[Solved]: JPEG pics with missing url path (img src="") after upgrade [Solved]: JPEG pics with missing url path (img src="") after upgrade
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: JPEG pics with missing url path (img src="") after upgrade

Started by GGallery, June 10, 2004, 10:51:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GGallery

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)

Joachim Müller

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

GGallery

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.

GGallery

#3
it took me a while:

insert into cpg130_filetypes values ('jpeg', 'image/jpeg', 'image');
(or whatever your $CONFIG['TABLE_FILETYPES'] says) 'fixes' the problem.

hyperion

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]
"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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Tarique Sani

SANIsoft PHP applications for E Biz

hyperion

Not at the time of your posting, but the sql CVS files have been updated as of now.
"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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Tarique Sani

SANIsoft PHP applications for E Biz