Author Topic: Problems with PHP 5.6 and 4images 1.7.11  (Read 10671 times)

0 Members and 1 Guest are viewing this topic.

Offline musicalcat

  • Newbie
  • *
  • Posts: 13
    • View Profile
Problems with PHP 5.6 and 4images 1.7.11
« on: February 05, 2015, 10:09:23 PM »
I have tried to search the forum for anything about this.
I have the version 4images 1.7.11 installed.
In two weeks my webhost will change the PHP to version 5.6. But already now you can change to version 5.6 to check for problems.
It seems that 4images 1.7.11 is not compatible with PHP 5.6.
The descriptions to the images show up correct in the database but in the actual gallery all Swedish letters , and turns in to an "?" in Chrome and a square in IE.
On the control panel to my 4images 1.7.11, under Edit Templates, I can't access some of the templates to edit either. One of them is footer.html. For that I could download the php files and do the edit there.
I have 16765 images in my gallery, so I can't edit them one by one. If I change to php 5.6 and then start to change the descriptions in the gallery, then those show up wrong in the database, with other characters/letters than I have written.
Is there anything I can do? I still need to fix the problems in the description with the Swedish letters/characters.
« Last Edit: February 06, 2015, 12:11:57 AM by musicalcat »

Offline musicalcat

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Problems with PHP 5.6 and 4images 1.7.11
« Reply #1 on: February 24, 2015, 09:50:14 AM »
Am I the only one with this problem or is my problem difficult to understand?
Is some information missing in my post?
Have the developers stopped developing 4images?
Is there something else that I'm missing?
I would appreciate it if someone let me know if something is being tried.
The image with this post is how the letters/characters in the Swedish alphabet shows up in the latest php version with the latest 4images version.

Offline Tino23

  • Full Member
  • ***
  • Posts: 190
    • View Profile
    • LMJ - Motorsport
Re: Problems with PHP 5.6 and 4images 1.7.11
« Reply #2 on: February 26, 2015, 10:48:39 AM »
Das Problem habe ich auch bemerkt http://www.4homepages.de/forum/index.php?topic=29791.msg165827#msg165827

Quote
Seit PHP 5.6 setzt PHP einen Standard-Zeichensatz (default charset), selbst wenn keiner konfiguriert ist.
Dieser Zeichensatz ist vorbelegt mit UTF-8 und erzwingt auf Apache einen Respronse Header der diesen Zeichensatz beinhaltet.
Es liegt also am Zeichensatz. ndere ihn in
Code: [Select]
<meta charset="ISO-8859-1">
http://webbausteine.de/blog/tipps/schriftzeichen_richtig_darstellen.php

Offline musicalcat

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Problems with PHP 5.6 and 4images 1.7.11
« Reply #3 on: February 27, 2015, 03:30:41 PM »
Sorry. I don't understand German and I'm not very good with PHP. I have tried a few things, from what I could understand from translating the page. But nothing worked.

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.871
    • View Profile
Re: Problems with PHP 5.6 and 4images 1.7.11
« Reply #4 on: February 27, 2015, 03:38:17 PM »
Hi,

he thinks that the font is changed to <meta charset="ISO-8859-1">.

nobby

Offline musicalcat

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Problems with PHP 5.6 and 4images 1.7.11
« Reply #5 on: February 27, 2015, 11:22:32 PM »
Anyway, I was helped on a Swedish php forum. I'll try to explain.
I asked there today and I was helped today.
Add this code to line 42 in 4images/includes/db_mysql.php

mysql_set_charset("utf8"$this->connection);

That is what worked for me.
After that I also had to do a "Rebuild Search Index" in the admin. To pick up all the descriptions with , and in the search.
Please don't ask me to explain better, since I hardly know what I'm doing :)

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.871
    • View Profile
Re: Problems with PHP 5.6 and 4images 1.7.11
« Reply #6 on: February 28, 2015, 08:25:14 AM »
one can only learn to  :wink:

nobby

Offline wflorian

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Problems with PHP 5.6 and 4images 1.7.11
« Reply #7 on: October 29, 2015, 10:19:42 AM »
Anyway, I was helped on a Swedish php forum. I'll try to explain.
I asked there today and I was helped today.
Add this code to line 42 in 4images/includes/db_mysql.php

mysql_set_charset("utf8"$this->connection);

That is what worked for me.
After that I also had to do a "Rebuild Search Index" in the admin. To pick up all the descriptions with , and in the search.
Please don't ask me to explain better, since I hardly know what I'm doing :)


Thanks for the great info here!
What I also did, I changed the character set in MYSQL:

ALTER TABLE table_name CONVERT TO CHARACTER SET utf8 (for each table)

At the end:
SET NAMES UTF8