Author Topic: update and chartset errors after transferring website to another server  (Read 239 times)

0 Members and 1 Guest are viewing this topic.

Offline mark014

  • Member
  • *
  • Posts: 3
Hi all,

I need your help because I failed to fix some errors that emerged after transferring my website to another server.

Saratoga script is working but data updates are visible after some time from the page loading. I have following massages at the top:

Code: [Select]
Warning: PHP Startup: Cannot send session cache limiter - headers already sent (output started at /index.php:2) in /include-style-switcher.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /index.php:2) in /include-style-switcher.php on line 350

Warning: Cannot modify header information - headers already sent by (output started at /index.php:2) in /include-style-switcher.php on line 350

Warning: Cannot modify header information - headers already sent by (output started at /index.php:2) in /top.php on line 43

Another issue is wrong coding of local characters (letters occuring only in Polish language), something wrong with chartset? There were no problems on the former server.

I should probably have done more than just transfer all the files to the new server by the FTP client, but I have not transferred my site so far.

Can you help me? In what files do I need make some changes?

My website address:
http://serwer1823145.home.pl/wxindex.php
« Last Edit: July 07, 2018, 05:00:20 AM by mark014 »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1261
    • My PWS at Leuven Belgium Europe
To investigate what the problems are, one needs the links to the new website-pages and to the current pages without errors.

Your link points to a cumulus standard page, not to a Saratoga template page.

Wim
« Last Edit: July 07, 2018, 04:30:31 AM by wvdkuil »
Development and maintenance of Leuven-Template&Scripts  at: https://support.leuven-template.eu/
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1261
    • My PWS at Leuven Belgium Europe
You should carefully check the index.php file, the first lines should look like these:
Code: [Select]
<?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (Canada/World-ML template set)
############################################################################
So nothing should be before the < ? p h p

===
The PHP messages (it are not errors, but warnings) explained:
Code: [Select]
Warning: PHP Startup: Cannot send session cache limiter - headers already sent (output started at /index.php:2) in /include-style-switcher.php on line 31When you check that style-switcher.php script at lines 28-32 there is a warning from the author that you wil get this warning when some output is already sent. That warning tells you to check the index.php file as it contains "extra" characters, maybe "BOM (for UTF)" before the <php

The other three warnings are similar. The scripts want to send information which should be sent before anything else. But there is already some output from in or around line 2 in index.php.

===
Why all these funny characters:
The character set for your native language in Settings.php  is set to
Code: [Select]
$SITE['charset']        = 'utf-8';But somewhere in the scripts it is set to: charset=ISO-8859-2" which used to be the setting for the polish language.
The script top.php on line 43 tries to set your server character set to ISO-8859-2 also
Code: [Select]
header("Content-Type: text/html; charset=".strtoupper($SITE['charset']));But again the headers are already sent so the header is ignored and as your webserver defaults to UTF-8 all texts in ISO-8859-2 are put on the screen as UTF-8. And for sure these character sets are very different.

So let first remove the errors from index.php and then see if there are more errors.
Succes ,

Wim
« Last Edit: July 07, 2018, 05:04:35 AM by wvdkuil »
Development and maintenance of Leuven-Template&Scripts  at: https://support.leuven-template.eu/
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline mark014

  • Member
  • *
  • Posts: 3
Thank you for your answer and advice. I deleted the empty first row in index.php file and it worked.

This is a link to my web page: http://serwer1823145.home.pl/wxindex.php
This is the default adress because when I changed it with index.php in flyout-menu.xml I have it redirected to index.htm

My previous website worked on free hosting and was blocked because it generated to high network traffic and server load.


However, still I see the issue with updating. When the page is loaded I see the state of data from the time the files were transferred to the new server:
Quote
Updated: @ 06-07-2018 22:02 - next update at 22:07

Only 20 seconds later, after next update, current data are loaded and still the weather icon in the Summary section is typical of the night (the moon) while now it is a day. How to change it?
« Last Edit: July 07, 2018, 05:36:38 AM by mark014 »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1261
    • My PWS at Leuven Belgium Europe
The templates use two sets of data, "5 minute data" and realtime data (every minute or faster)

You can check the uploaded data at:
http://serwer1823145.home.pl/wxstatus.php
I will use the english words on that page:
Cumulus FTP   NOT Current   12:30:03     => that means it is 12 hours 30 minutes old
Cumulus weather data   NOT Current   13:34:19   => the data inside that file is even older.
Cumulus realtime   Current   0:00:09   => so one of the files is uploaded

Check your Cumulus settings if it is uploading both files, realtime.txt and CUtags.php
You can click on the links to check the contents and/or use your FTP program.
http://serwer1823145.home.pl/realtime.txt 
http://serwer1823145.home.pl/CUtags.php?sce=view

===
At the first load all items on your main page come from the 5 minute data. Then the realtime file is loaded and that file does not have all data so it can only replace values it has.
The icon and yesterday values and so on will remain old because of the stalled 5 minute upload,  others are continuously replaced with the realtime.txt data.

Succes, Wim
« Last Edit: July 07, 2018, 05:48:40 AM by wvdkuil »
Development and maintenance of Leuven-Template&Scripts  at: https://support.leuven-template.eu/
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/