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: Encoding Issue - themes.inc.php (customisation of file)  (Read 7834 times)

0 Members and 1 Guest are viewing this topic.

gurdip

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Encoding Issue - themes.inc.php (customisation of file)
« on: June 06, 2009, 08:27:52 am »

Hi,

I have integrated Paypal for Coppermine for my English language gallery, something that I have done successfully in the past while testing. Yesterday, I did the same and when I clicked Add to Cart, the Paypal screen showed this error message:

"Data does not match input character set or default encoding. For more information, please contact the merchant."

I had a past version of the integrated file and uploading that solved the issue and I was able to see the paypal cart with the selected image. Problem is that this old file needs to have the image costs updated but I can't seem to open the file, make changes and resave without causing the encoding issue.

I believe the original file was encoded in utf-8, but loading and saving in that encoding does not work. I have tried others, including us-ascii (my cpanel was detecting this, as well as ISO 8859-1 - no success.

Anyone can give ame a clue on how I can make changes to my themes.inc.php file without running into this encoding problem? Been working on it like 2 days so help is very much appreciated.

Thanks in advance.




Logged

gurdip

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #1 on: June 06, 2009, 08:30:28 am »

Hi again,

I'd like to add the following:

- I'm using Filezilla for FTP
- Crimson Editor for making changes
- I have searched the forum but wasn't able to find a solution that worked.

thnx
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1504
  • aka 'i-imagine'
    • Home Page
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #2 on: June 06, 2009, 02:57:34 pm »

The first thing you should do is to follow the rules of the forum. Otherwise your postings will be ignored.
Maybe one of your days and one of your postings could have been saved had you read the help request guidelines.
  • Post a link to your gallery.
  • Do not double post with triival details

gurdip

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #3 on: June 06, 2009, 04:31:40 pm »

Hi,

The gallery was restricted by password; I've removed it and you can now see it here: http://gallery.singaporekhalsa.org.sg/displayimage.php?album=12&pos=1.

I realised posters were sometimes asked about software they were using so decided to add that info in the second post in case it was important.

Looking forward to anyone who can shed some light on the issue I'm having.

Thanks
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1504
  • aka 'i-imagine'
    • Home Page
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #4 on: June 06, 2009, 04:46:16 pm »

Wow!
You are very, very much behind using
Quote
<!--Coppermine Photo Gallery 1.4.16 (stable)-->

You should update as soon as possible.

Afterwards see if your site validates here:  http://validator.w3.org/

gurdip

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #5 on: June 06, 2009, 06:44:06 pm »

Yes it needs to be updated. The Paypal integration worked well on this version when I first tested it. Later upon approval to set up the gallery, I tried a later version but that failed - could not figure it out. So now I'm back to version 1.4.16 as a stop-gap measure until I can figure out what's the problem with the integration code.

Validated the site and it does show errors - will work on that soon. The encoding issue is not related to this is it?

Point to note: I have an earlier version of themes.inc.php but that works very well; only can't be edited.

Thanks
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Online Online
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #6 on: June 13, 2009, 08:41:32 pm »

The encoding issue may or may not be related to this but unless you upgrade supporters are unwilling to help. There is little point fixing something on this version if you are going to upgrade is there.

In your case, you need to upgrade straight away as you are at risk of having your work destroyed by the nasy hackers out there that are actively looking for sites such as yours to destroy or abuse.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #7 on: June 14, 2009, 10:37:23 am »

The approach to edit include/themes.inc.php is wrong in the first place and the reason why you're so picky about updating. That's why we say never to edit that file, under no circumstances. Everything that can be accomplished by editing that file can be accomplished as well by editing your custom theme. As suggested: upgrade! There's no alternative. You're a sitting duck if you don't.
Logged

gurdip

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #8 on: June 15, 2009, 07:04:39 pm »

Hi,

I setup a new gallery using the latest version: 1.4.24. You can see it here http://photogallery.singaporekhalsa.org.sg.

In most circumstances there is no need to edit themes.inc.php as recommended. Only reason I'm doing this is to apply the Paypal Modification for Coppermine by Walter Rowe.

Have tested it before and it worked fine; but even with the new version I'm getting the encoding error. File encoding on my Crimson Editor is set to utf-8 Encoding (with BOM). Is this correct? I tried editing & saving the file using cPanel's file manager and was prompted to specify the encoding - I selected utf. But got the same problem when I saved it.

Rowe's modified version, btw, works without changes. All I need to do is open and save the file and the error occurs.

Any ideas?

thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #9 on: June 15, 2009, 07:13:45 pm »

In most circumstances there is no need to edit themes.inc.php as recommended. Only reason I'm doing this is to apply the Paypal Modification for Coppermine by Walter Rowe.
Still not necessary.

First of all, you should "tell" your browser what encoding to use - edit http://photogallery.singaporekhalsa.org.sg/themes/skapix/template.html, find
Code: [Select]
<html dir="{LANG_DIR}">and replace with
Code: [Select]
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">,but that probably won't make a difference - it's mainly for standard compliance.

File encoding on my Crimson Editor is set to utf-8 Encoding (with BOM). Is this correct?
Use utf-8 without BOM if you can.

What FTP app do you use to upload?
Logged

gurdip

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #10 on: June 15, 2009, 07:20:40 pm »

Hi,

I'm using Filezilla.

thnx
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #11 on: June 15, 2009, 07:25:52 pm »

Filezilla should be fine.
Logged

gurdip

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #12 on: June 15, 2009, 07:37:36 pm »

I tried your suggestions:

1. changed info at start to: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">

2. Used utf-8 Encoding (w/o BOM).

I'm still getting the same error.

Not sure if this matters: 
When I open any Coppermine file in Crimson Editor, the document encoding appears as: ASCII Encoding. When I select utf-8 Encoding (w/o BOM), the editor prompts with "Do you want to reload the document?". I answer Yes to this before making the changes. As for Filezilla, the transfer mode is set to Auto.


Logged

gurdip

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #13 on: June 15, 2009, 08:30:12 pm »

Read somewhere that i can get around this by adding charset=utf-8 to the Paypal string.

So I changed this:
https://www.paypal.com/cgi-bin/webscr

to

https://www.paypal.com/cgi-bin/webscr?cmd=_cart&charset=utf-8

This works fine. I would nevertheless like to find out why I'm suddenly unable to edit the files; so will leave my thread as unsolved if that's ok.

Thanks for looking into this and taking the time to answer.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Encoding Issue - themes.inc.php (customisation of file)
« Reply #14 on: June 15, 2009, 08:43:38 pm »

We can hardly advice you how to use your editor...
Logged
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 19 queries.