Meteotemplate - new free website template

the php file pages/station/live.php not work … i take a blank page . I search in my servers log files and this is the error ---->

[02-Apr-2016 16:52:30 Europe/Athens] PHP Fatal error: Call to undefined function number_formatround() in /home3/mobilgh7/public_html/priamoservice/pws/pages/station/live.php on line 47

Yes I know, there is a bug, I recommend you also read the blog, I post regular updates. Just recently I introduced a section for bug fixes where you can download fixed versions of scripts. This particular issue is due to stupid typo, which I quickly fixed and the bug fixes section has updated working version.

Right at the bottom of the page:
http://www.meteotemplate.com/web/download.php

Thanks a lot …

Hi Jachym

I finally found that the MySQL I created was not a user DBO and as was created a long time ago while still Streamline.net, since Fasthost took over things have changed.
so last night deleted the original database and created new one with DBO user
I then used this simple php to test
mysql_connect(“213.171.200.83”, “username”, “password”) or die(mysql_error());
echo "Connected to MySQL
";

once I got the right info it then said connected
I amended the config file
I then ran tableCreate.php and it worked
I then tried to import march data but this took 3 or 4 goes (lots of writing in the box that comes up) had to cut the file into sections for it to work
April worked ok (still lots of writing in the box)
but when I went to all I got was

Server Error

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.

I had a cron job running for a couple of hours but that stopped working about 11:15 pm last night according to the database and has failed to work since

today not even the tableCreate or WDimport work they give the error 500 as above

so I have given it another try to get it viewable to all but have failed sorry about that.

Harold

Hi Harold,
I must say Im a bit confused about what exactly has happened.

So you created the db, then ran the cron jobs and they stopped for no apparent reason? Was there any problem with the template? What exactly hapenned? Sorry, I read your post twice and still not sure what the problem was, if it was with the MySQL, the template, the CRON

Hi Jachym
Sorry as usual not explaining myself very well

yes created db ok yesterday and if I ran the tablecreate again it said table existed, but today if I run it all I get is error 500 as in last post

the cron job was set up on the site you mentioned earlier in thread and this worked yesterday but not today the detail of the failure refers to error 500

the template was a copy of my working local server one with the config file altered to suit http://www.hc-iom.co.uk/template/index.php and this has never show anything other than error 500 which is giving no clues as to the problem

since I did all this I tried updating php to 5.6 from 5.4 but that made no difference a little while ago

its as if the scripts have stopped seeing the MySQL

Harold

OK, so we have to take it step by step.

Unfortunately, the Error 500 is the worst possible thing you can see because it gives absolutely no clue as to what is wrong.

First see if you can change your server settings and make sure the display errors parameter is set to enabled - in that case you would see where the error is, which script and which line - which then makes it possible to try to fix it.

Or if that is not possible, try even hard-coding this in the actual file.
In your config, at the very top, right below <?php,

insert this:


error_reporting(E_ALL);
ini_set('display_errors', 'On');

Then send me a link to your homepage or have a look yourself, ideally it should show you where the problem is

Hi Jachym

I put that code at the top of the config below the <?php as instructed and uploaded but I still get the 500 error, homepage for template is http://www.hc-iom.co.uk/template/index.php

I have looked through the dashboard of my host and there is no options to change the error parameter.

Harold

Hi Jachym ,

In Greek language , I send emails from meteotemplate with the “contact plugin” but i recieve wrong encoding .
I write in comment this " Καλημέρα ! " and in recieved email i read this " Καλημέρα ! "
The same wrong i recieve then the name is in Greek .
I think is some UTF-8 enconding problem from SendFeedBack.php

Hi Harold,

ok, in that case I can only think of two other solutions:

  1. try contacting your provider and ask about this, tell them you want to display errors rather than just throw the error 500 message
  2. create a temporary FTP account for the meteotemplate folder and send me the login details and I will look at it by myself, what I would do is probably try one by one turning off various modules (menu, header etc.) to see which one makes it non-functional and then further try to see if I can fix it

Hi,
this is strange, I guess it is more to do with the configuration of either your mail server or your mail provider, because when I try sending Greek letters I receive email with correct symbols, I use an external wenhosting and Gmail.

I tried others mail programs … in “emclient” , “MS outlook” and “horde” not work … in “roundcube” works …

Hi Jachym
I have sent them a email about this and asked if the error display could be turned on will my emails tomorrow for an answer

would it be worth considering changing the server from windows to Linux.

Thanks

Harold

OK, well keep me updated how things go. The linux/win should not be an issue, the template works on both (in most cases obviously… :D)

Hi Jachym

this is the reply I got back

Dear Harold,

Thank you for getting back to us.

I have taken over this ticket as the previous advisor is not available, sorry for the belated response.

I am afraid, cron jobs are not supported in our shared server environment, that won’t completely work.

Can you provide us the exact database details you are trying to use?

Also, if you use a php script, you might need to switch the server of your website from Windows to Linux.\

login to the control panel
hover your mouse on the Website tab and select Manage Packages
click the domain name in question
on the Package Overview page, please look for Windows, beside it, click “switch to Linux”

Then wait within 3-4 hours.

In the meantime, if you experience any further issues, please reply to this email.

Best regards,

Fasthosts Customer Support

I forgot mention that the cron job is ran from an external site in my email to them

not sure what database info they require

they are suggesting I switch to a Linux server

no response to me asking for error display to be turned on, sorry

Harold

Hi Harold,

I tried the login details you sent me, but I get connection time out. It is however possible that this is due to our firewall, I tried from my work PC. I will try at home again.

However, even if I fix your site, we obviously need to get CRON jobs running somehow. Using cron-job.org should work even if there are no built-in CRON jobs by your provider, because the external cron job execution is just as if someone visited your site, the server cannot tell if it was a user viewing it or a cron bot.

Hi Jachym
let me know if you get access or not, worked ok when I tested it from filezilla

I am using cron-job.org already for my local synology unit and set up the one below for the main site (this did work for a time on Friday evening)

http://www.hc-iom.co.uk/template/update/wd.php?pass=admin password not the one I sent you

I have setup another as above with the admin password I sent you but made it inactive for now

thanks
Harold

Sounds like an excellent suggestion to me :smiley:

HI
I am just starting to try and use this template setup. I have gone through the WIKI and done the config file, uploaded everything, set up themysql database and set wd.php. I have gone to the index page but it is completely blank. If I view source all seems to be ok
here is the link to the index.php
http://www.philsweather.co.uk/meteotemplate/index.php

I am doing this as a complete novice so be gentle!!

Phil