Install new blocks and auto update

Post Reply
User avatar
magical46
Observer
Observer
Posts: 49
Joined: Mon Aug 21, 2017 2:19 pm
Location: Farnham, Surrey, UK
Contact:

Install new blocks and auto update

Post by magical46 » Mon Sep 25, 2017 11:14 am

Hi
I have done the update to v.16, all went well and all working ok. Just got an issue with the "install new blocks" on the block setup page, if I click it I get the following message
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

Apache/2.2.3 (CentOS) Server at www.philsweather.co.uk Port 80

I assume this is the old issue with my host servers unless you can see anything else. Also the "latest version" column shows 0.0 for all blocks and plugins. I do not have an auto update button on the blocks setup page.

www.philsweather.co.uk

Phil
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Install new blocks and auto update

Post by Jachym » Mon Sep 25, 2017 11:53 am

You would have to look in the error log, this is a general error and it is not possible to tell what is wrong - that was logged in the log.

User avatar
crayleb
Newbie
Newbie
Posts: 7
Joined: Wed Sep 20, 2017 8:35 am
Station model: BloomSky Sky2 with Storm
Software: BloomSky API
Contact:

Re: Install new blocks and auto update

Post by crayleb » Wed Sep 27, 2017 6:42 am

What error log? Do you mean this one in admin/error_log ? I'm getting the 500 Internal Server Error as well trying to install blocks the new way.

Cheers,
Caleb
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Install new blocks and auto update

Post by Jachym » Wed Sep 27, 2017 8:49 am

Error log of your server, the problem is that your server is configured not to show the errors, but only log them in this internal log file, so there is no way to diagnose the problem without seeing this log.

User avatar
crayleb
Newbie
Newbie
Posts: 7
Joined: Wed Sep 20, 2017 8:35 am
Station model: BloomSky Sky2 with Storm
Software: BloomSky API
Contact:

Re: Install new blocks and auto update

Post by crayleb » Thu Sep 28, 2017 9:50 am

Thanks for that Jachym. I looked in the server error logs that I have access to (shared hosting so don't have too much access) but it wasn't logging anything. I stepped through the blockInstallProcess.php file and followed along with what it was doing. I noticed that it had created the blockTemporary folder and had also downloaded the zip files from your server but it wasn't extracting the files. So I manually extracted the zip file and then commented out lines 37 - 44 of the blockInstallProcess.php file (the part that unzips the file it had just downloaded) and then tried the auto install process of the same block and this time it succeeded with the install of the block. So the 500 Error (in my case at least) is getting caused by calling the unzipping process but it isn't hitting the "else die" part. Is there some other unzipping method / checking if php can do the unzipping that could be added to the code? Let me know if there is anything I can help with here if you want to look into this.

Cheers,
Caleb
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Install new blocks and auto update

Post by Jachym » Thu Sep 28, 2017 10:42 am

Hi,
this is one of the potential problems.

Possible problems / reasons why auto updates dont work:

- your server is https and blocks communication with my http
- your memory/time limits are very small
- your server PHP does not have ZIP extension installed

In your case it is probably the third one, Im afraid it wont work if your server cant handle ZIP files.

User avatar
nikokara - BANNED
Advisor
Advisor
Posts: 70
Joined: Wed Sep 13, 2017 5:05 pm
Station model: ng265 (Fine Offset)
Software: Cumulus

Re: Install new blocks and auto update

Post by nikokara - BANNED » Fri Sep 29, 2017 12:22 pm

Hi Jachim

On my localhost (win, apache, php) i have the same problems, with others.

My server is not https
zip enabled by default in php (build in) if php >= 5.3.X (no extension needed)
memory & time ok, but i doubled all temporary

Autoupdate fails.
It downloads the zip file in /admin/blockTemporary,
creates an empty folder with the blockname in homepage/blocks,
shows a window with OK and exits
without extracting the zip to the temporary folder,
and without copying the files to the destination folder.

Then i chanced @line 38 in /admin/blockInstallProcess.php
from

Code: Select all

$zip->extractTo("blockTemporary"); 
to

Code: Select all

$zip->extractTo("blockTemporary/".$blockToUpdate); //<<<<<<<<<<<<<<<<<
and now all files are extracted in admin/blockTemporary/ ([blokname-version]) folder.
Hope this helps. 8-)

PS @line 22 at the end are two semicolons, remove the one
niko

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Install new blocks and auto update

Post by Jachym » Fri Sep 29, 2017 12:35 pm

Right ok, I sort of worried this would not work as expected, Im getting more and more emails from people it is not working and I suspect it is not something trivial that can be changed, not just a path issue. Some people simply cannot load any zip files from my server, I created some test scripts.

The way I see it now is that it is with regret, but I will remove this, I do not want to have large percentage of people for whom something does not work.

Many asked for it so I tried

User avatar
nikokara - BANNED
Advisor
Advisor
Posts: 70
Joined: Wed Sep 13, 2017 5:05 pm
Station model: ng265 (Fine Offset)
Software: Cumulus

Re: Install new blocks and auto update

Post by nikokara - BANNED » Fri Sep 29, 2017 12:41 pm

You are the Boss ;)
niko

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Install new blocks and auto update

Post by Jachym » Fri Sep 29, 2017 12:43 pm

Its not about that, but there is no point in keeping this if it is not working. It would be a cool feature, but it doesnt work obviously....

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Install new blocks and auto update

Post by Jachym » Fri Sep 29, 2017 12:44 pm

There cannot be some trivial bug, if that was the case it simply wont work. But it works for some, including me.

User avatar
Reinhard
Advisor
Advisor
Posts: 84
Joined: Fri Aug 25, 2017 9:42 am
Location: Prägraten am Großvenediger
Station model: Davis VP2 Pro wireless
Software: WeatherCat
Contact:

Re: Install new blocks and auto update

Post by Reinhard » Fri Sep 29, 2017 1:19 pm

It works also for me - although I am on https. :!:
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Install new blocks and auto update

Post by Jachym » Fri Sep 29, 2017 1:23 pm

As I said, there are people for whom it works, but unfortunately, it is not the case it doesnt work for one or two. It doesnt work for many.

User avatar
nikokara - BANNED
Advisor
Advisor
Posts: 70
Joined: Wed Sep 13, 2017 5:05 pm
Station model: ng265 (Fine Offset)
Software: Cumulus

Re: Install new blocks and auto update

Post by nikokara - BANNED » Fri Sep 29, 2017 1:40 pm

Jachim
Dont worry . I've learned only from my "failures", not from my "scouts"
you are still a great mind and a genius !!! ;)

Continue
niko

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Install new blocks and auto update

Post by Jachym » Fri Sep 29, 2017 1:48 pm

I suspect the major issue is with my current server provider, or rather the fact some servers will not load ZIP files from http. A few people might also have issues with the zip extentision or path separator, however the communication problem cannot be solved by changes in code so AFAI can see, there is no way of doing this.

User avatar
magical46
Observer
Observer
Posts: 49
Joined: Mon Aug 21, 2017 2:19 pm
Location: Farnham, Surrey, UK
Contact:

Re: Install new blocks and auto update

Post by magical46 » Mon Oct 02, 2017 10:20 pm

re my original post at the top of this thread, I contacted my host and got this reply
I have checked your website and there was a permission miss-configuration. I have amend the permission for you and you should be able to install a new block.
Could you please test it and let us know if you still have any issue/ If so, please do not hesitate to come back to us.
It seems to be working now.
Phil
Image

Post Reply