.jpg changes to .jpeg when batch added to the database.
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexCoppermine
Author Message
mpyusko
Newbie


Joined: Mar 09, 2007
Posts: 35
Location: USA

PostPost subject: .jpg changes to .jpeg when batch added to the database.
Posted: Wed Jan 02, 2008 4:58 pm
Reply with quote

I have 2 sites I am working with. One is Dragonfly, and the other is just plain Coppermine. In one case I am using the same images on both sites. They are hosted on the same server so I symlinked a DF user gallery to the CPG location.

When I upload pictures, I FTP them to the CPG site's folder and they have are .jpg. I batch add them and everything goes fine. When I go to batch add them to DF's gallery, they are added and all the extensions change to .jpeg. WHY? Where is this set, and what can I do to fix it? I did a linux "rename" to switch them back, and then ran a mysql "update" to fix the database. I would like to prevent it from happening in the future though.

CPG does not touch file extensions, but DF does, therefore I assume this is a DF issue.

_________________
-mpyusko

mpyusko's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev


Joined: Apr 06, 2005
Posts: 1406
Location: Estonia

PostPost subject: Re: .jpg changes to .jpeg when batch added to the database.
Posted: Wed Jan 02, 2008 5:09 pm
Reply with quote

I had same problem with Downloads_Pro on my site lately :S

Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.8/9.2.1
Back to top
View user's profile Send e-mail Visit poster's website
mpyusko
Newbie


Joined: Mar 09, 2007
Posts: 35
Location: USA

PostPost subject: Re: .jpg changes to .jpeg when batch added to the database.
Posted: Wed Jan 02, 2008 5:14 pm
Reply with quote

I suppose I should add the specs for the site I am using...


_________________
-mpyusko

mpyusko's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3677
Location: Melbourne, AU

PostPost subject: Re: .jpg changes to .jpeg when batch added to the database.
Posted: Wed Jan 02, 2008 5:35 pm
Reply with quote

php.net/image_type_to_extension
_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
mpyusko
Newbie


Joined: Mar 09, 2007
Posts: 35
Location: USA

PostPost subject: Re: .jpg changes to .jpeg when batch added to the database.
Posted: Wed Jan 02, 2008 5:56 pm
Reply with quote

found in the imaging.inc file:
Code:
// http://php.net/image_type_to_extension
if(!function_exists('image_type_to_extension')) {
function image_type_to_extension($imagetype, $include_dot=true) {
    $dot = $include_dot ? '.' : '';
    switch($imagetype) {
        case IMAGETYPE_GIF  : return $dot.'gif';
        case IMAGETYPE_JPEG : return $dot.'jpg';
        case IMAGETYPE_PNG  : return $dot.'png';
        default             : return false;

this does not explain why I'm having this problem

_________________
-mpyusko

mpyusko's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
rlgura
1000+ Posts Club


Joined: Mar 27, 2006
Posts: 1148
Location: Cleveland, OH USA

PostPost subject: Re: .jpg changes to .jpeg when batch added to the database.
Posted: Wed Jan 02, 2008 6:06 pm
Reply with quote

this problem with Downloads Pro was resolved with an updated imaging.inc file: dragonflycms.org/Forum...tml#131978
Might fix it here also?

_________________
Admin - Great Lakes Web Designs
Theme Designer - WebSite Guru Designs
Site Admin - Families with Food Allergies

rlgura's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.27-grsec/Apache 2.2.11/MySQL 5.0.67-community-log/PHP 5.2.8/DF 9.2.1
Back to top
View user's profile Visit poster's website
mpyusko
Newbie


Joined: Mar 09, 2007
Posts: 35
Location: USA

PostPost subject: Re: .jpg changes to .jpeg when batch added to the database.
Posted: Wed Jan 02, 2008 6:35 pm
Reply with quote

Code:
/*********************************************
  CPG Dragonflyâ„¢ CMS
  ********************************************
  Copyright © 2004 - 2005 by CPG-Nuke Dev Team
  http://dragonflycms.org

  Dragonfly is released under the terms and conditions
  of the GNU GPL version 2 or any later version

  $Source: /cvs/html/includes/imaging/imaging.inc,v $
  $Revision: 9.5 $
  $Author: djmaze $
  $Date: 2005/12/17 04:05:50 $
**********************************************/

_________________
-mpyusko

mpyusko's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
rlgura
1000+ Posts Club


Joined: Mar 27, 2006
Posts: 1148
Location: Cleveland, OH USA

PostPost subject: Re: .jpg changes to .jpeg when batch added to the database.
Posted: Wed Jan 02, 2008 10:18 pm
Reply with quote

9.7 - 8/20/2007 = workaround for dragonflycms.org/Proje...d=965.html by forcing the return of .jpg.
_________________
Admin - Great Lakes Web Designs
Theme Designer - WebSite Guru Designs
Site Admin - Families with Food Allergies

rlgura's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.27-grsec/Apache 2.2.11/MySQL 5.0.67-community-log/PHP 5.2.8/DF 9.2.1
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexCoppermine All times are GMT
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

stopsoftwarepatents.eu petition banner
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.3852 seconds with 16 DB Queries in 0.0627 seconds
Memory Usage: 2.92 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy