Announcement

#1 2013-06-18 09:40:29

quaningeneva
Member
2013-06-18
2

Connection to server unavailable

I am running Piwigo 2.5.1 on a Netgear ReadyNAS.  I installed the application manually.  When I click on plugins, check for updates, I get "Connection to server unavailable".  Also, when I click "Check fro upgrade" from the Administration Home menu, I get the error message "Unable to check for upgrade".

Last edited by quaningeneva (2013-06-18 09:50:51)

Offline

 

#2 2013-06-18 11:53:34

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Connection to server unavailable

you need to activate curl extension, or allow_url_fopen

Offline

 

#3 2013-06-18 18:45:02

quaningeneva
Member
2013-06-18
2

Re: Connection to server unavailable

Hi.  Can you point me to a guide that explains how to do this?  I have Piwigo installed on a Netgear ReadyNAS RN102.  Thank you.

Offline

 

#4 2013-06-18 18:53:33

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Connection to server unavailable

it's in the php config file

I'm sure there are plenty of guides on the net

Offline

 

#5 2013-06-19 10:34:09

konetkar500
Member
2012-02-09
11

Re: Connection to server unavailable

So when you test the server and it says "unavailable", do any requests arrive at the server?  You should see them in the logs with the current time.

Last edited by konetkar500 (2013-06-19 10:36:34)

Offline

 

#6 2016-03-09 01:35:30

JAK
Member
2013-07-07
62

Re: Connection to server unavailable

Hi,
I'm getting this very same issue trying to upgrade to the new 2.8 from 2.7.4 version tonight.
A check for plug-in updates gives "Connection to server unavailable" and
"Check for upgrade" from the Administration Home menu gives the error message "Unable to check for upgrade"
The Piwigo updates in the Tools menu page shows "Check for update failed for unknown reasons."
The suggested solutions - allow_url_fopen  is on and cURL support is enabled.
Up to now automatic new version updates and plugin updates have been applied successfully.
The issue affects all the Piwigo database installations on my server, and each has been automatically updated previously.
Thanks for any suggested help.

http://jkpg.ddns.net/piwigo/

Edit: Noticed the following part error message on the Administration Home page under the banner line:-
unless register_globals is enabled. You can disable this functionality and this warning by setting session.bud compat 42 or session.bud compat to off. respectively in Unknown in line 0
(This doesn't always appear and it is possible some words are not showing correctly as partly obscured by the page's banner.)

A Google search suggests the full message might read:-
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0

This was assumed to mean there was a need to change one of the variable names so it doesn't conflict with the session variable.  It was suggested it was a problem with session_register("username");
apparently that is not recommended, and deprecated as of PHP 5.3. (My PHP version is 5.3.29)
Suggested solution was register_globals should always be off. (Mine is set to off.)
The most common way to register a session var is with the $_SESSION superglobal, i.e.
$_SESSION['username'] = $username;

This means little to me however looks to be either a Piwigo script issue or a PHP setting issue.  Hope that helps with a Piwigo solution. The issue only started after the notification for Piwigo 2.8.yesterday.
Thanks for looking.

Last edited by JAK (2016-03-09 11:49:58)

Offline

 

#7 2016-03-12 15:58:07

JAK
Member
2013-07-07
62

Re: Connection to server unavailable

Still the same, 'Unable to connect to server'
Is there a file I need to amend to point my Piwigio (v2.7.4) to the correct server so it will update please?

Offline

 

#8 2016-03-17 19:01:10

JAK
Member
2013-07-07
62

Re: Connection to server unavailable

Just tried running the Piwigo NetInstall php file.
It failed with the following message:
Due to restrictions in your PHP configuration, NetInstall cannot get its job done.
Please see Piwigo documentation to perform a normal installation.
Really sorry for the inconvenience.

What might need changing for it to run please.

Offline

 

#9 2016-03-20 20:26:20

JAK
Member
2013-07-07
62

Re: Connection to server unavailable

Think I've found the problem.

Have Piwigo moved their server recently?

When I set my server PHP Timezone location to Asia/Taipei (its default setting) it will access updates OK.
But when I set the PHP Timezone to where I live, Europe/London, it fails to connect to the Piwigo server.
However when my server thinks it is based in Asia it gets somewhat ahead of itself so, for instance, it tries to list tomorrow's history today! Not helpful.

This issue is repeatable.

I presume Piwigo needs a time zone offset setting to solve this.
In the meantime, I have found a suggestion which I'm trying using the plugin LocalFilesEditor to edit the config file to add:
date_default_timezone_set('Europe/London'); // change it with your Timezone
See what happens.

If this proves to be the solution, perhaps there should be an entry on the Configuration page to set the default timezone.  It would be more obvious to find it there should one have had an issue like I've experienced.  If it was set incorrectly it would be obvious there is a need to change it.  The config file edit method isn't immediately obvious.

Last edited by JAK (2016-03-20 20:51:44)

Offline

 

#10 2016-03-20 20:45:53

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Connection to server unavailable

All of these install/upload processes are only downloading file from piwigo.org server. I absolutely do not see any reason this may be affected by the time zone. Or your server has really really weird config. But for sure the problem is not from the script.

Offline

 

#11 2016-03-20 21:35:23

JAK
Member
2013-07-07
62

Re: Connection to server unavailable

Cheers!  Others have hinted at similar issues, and not just with 2.8, so it gives others a possible solution to try.  All seems well at the moment.  Could it have been something to do with register_globals being disabled?  Turning that on also seems to allow updates through but when set to off it doesn't, however the on setting is said to be a security risk and has been deprecated as of PHP 5.3.0.  I guess this is why updating my server software Pieigo updates failed (I refer to be message regarding register_globals appearing on the Piwigo admin page after my server update.)

Last edited by JAK (2016-03-21 12:05:24)

Offline

 

#12 2016-03-22 13:55:40

JAK
Member
2013-07-07
62

Re: Connection to server unavailable

To continue here as requested.
My server is defaulted to register_globals=off, for security reasons.  The only way I can update Piwigo versions and plugins is to have register_globals=on.  Yes I can turn it on and off periodically to check for updates, but this is a bit of a faff. Presently it seems every day at the moment!
There is a page here:
http://pageconfig.com/post/register_glo … ementation
showing the dangers of and how to overcome the use of register_globals in an application. Might this apply to Piwigo?
If for some reason this or something similar cannot be included in the Piwigo scripts, can a config file be created to overcome having to have register_globals=on?  One thing is clear, while for some this might not be an issue, it has been an issue for others for more than a decade as very old posts mention this.
Presumably up until recently, register_globals has been defaulted to on but with the ShellShock code injection scare we've become more aware of the security issue.
If, has been suggested, Piwigo runs fine with PHP5.4 where register_globals has been depracated and this isn't the cause of update failures (though it certainly has been for me!) what might be going on with my server? The only other issue I had to address was the timezone location setting in php.ini.
My server is running PHP5.3.
Thanks.

Last edited by JAK (2016-03-22 13:58:06)

Offline

 

#13 2016-03-22 14:57:25

JAK
Member
2013-07-07
62

Re: Connection to server unavailable

Just updated to PHP5.5. Piwigo still working and can contact the update server.  I'll see how it goes and report back later.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact