Page 1 of 1

Install new blocks and auto update

Posted: Mon Sep 25, 2017 11:14 am
by magical46
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

Re: Install new blocks and auto update

Posted: Mon Sep 25, 2017 11:53 am
by Jachym
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.

Re: Install new blocks and auto update

Posted: Wed Sep 27, 2017 6:42 am
by crayleb
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

Re: Install new blocks and auto update

Posted: Wed Sep 27, 2017 8:49 am
by Jachym
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.

Re: Install new blocks and auto update

Posted: Thu Sep 28, 2017 9:50 am
by crayleb
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

Re: Install new blocks and auto update

Posted: Thu Sep 28, 2017 10:42 am
by Jachym
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.

Re: Install new blocks and auto update

Posted: Fri Sep 29, 2017 12:22 pm
by nikokara - BANNED
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

Re: Install new blocks and auto update

Posted: Fri Sep 29, 2017 12:35 pm
by Jachym
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

Re: Install new blocks and auto update

Posted: Fri Sep 29, 2017 12:41 pm
by nikokara - BANNED
You are the Boss ;)

Re: Install new blocks and auto update

Posted: Fri Sep 29, 2017 12:43 pm
by Jachym
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....

Re: Install new blocks and auto update

Posted: Fri Sep 29, 2017 12:44 pm
by Jachym
There cannot be some trivial bug, if that was the case it simply wont work. But it works for some, including me.

Re: Install new blocks and auto update

Posted: Fri Sep 29, 2017 1:19 pm
by Reinhard
It works also for me - although I am on https. :!:

Re: Install new blocks and auto update

Posted: Fri Sep 29, 2017 1:23 pm
by Jachym
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.

Re: Install new blocks and auto update

Posted: Fri Sep 29, 2017 1:40 pm
by nikokara - BANNED
Jachim
Dont worry . I've learned only from my "failures", not from my "scouts"
you are still a great mind and a genius !!! ;)

Continue

Re: Install new blocks and auto update

Posted: Fri Sep 29, 2017 1:48 pm
by Jachym
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.

Re: Install new blocks and auto update

Posted: Mon Oct 02, 2017 10:20 pm
by magical46
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