Announcement

#1 2024-05-13 11:17:14

digitography
Member
2016-10-27
49

Getting please update to 14.4 but then no option to do so when I login

Hello/Hi/Greetings,

Getting please update to 14.4 but then no option to do so when I login.
When I look at the updates page I see
------------
Updates
Piwigo core

Currently running version 14.1.0

You are running Piwigo latest version.
------------

Is there a way of forcing the update?

As always assistance appreciated.

Piwigo 14.1.0 Check for upgrade
Installed on 22 July 2023, 9 months 3 weeks 1 day ago
Operating system: Linux
PHP: 7.1.33 (Show info) [2024-05-13 10:14:00]
MySQL: 5.5.5-10.4.31-MariaDB-log [2024-05-13 10:14:00]
Graphics Library: ImageMagick 7.1.1-29
Cache size N/A   never calculated Refresh

Piwigo URL: https://www.brandontownbowlingclub.co.uk/BTBCpiwigo/

Offline

 

#2 2024-05-14 15:49:31

erAck
Only trying to help
2015-09-06
2091

Re: Getting please update to 14.4 but then no option to do so when I login

That's odd indeed.. to check what's actually evaluated there, temporarily place this PHP snippet somewhere in your web server's document root with any name, adjust the YourPiwigoInstallation root path and point your browser to it:

Code:

<?php
// Change root path to your Piwigo installation, note the trailing / slash is needed.
define('PHPWG_ROOT_PATH', '/YourPiwigoInstallation/');
include_once(PHPWG_ROOT_PATH.'include/config_default.inc.php');
include_once(PHPWG_ROOT_PATH.'local/config/config.inc.php');
include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
include_once(PHPWG_ROOT_PATH.'include/functions.inc.php');
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');

function lf()
{
  echo "<br>";
}

// Basically what's in admin/maintenance_env.php check_upgrade, with messages adjusted:

    if (!fetchRemote(PHPWG_URL.'/download/latest_version', $result))
    {
      echo "Can not fetch."; lf();
    }
    else
    {
      print_r($result); lf();

      $versions = array('current' => PHPWG_VERSION);
      $lines = @explode("\r\n", $result);

      // if the current version is a BSF (development branch) build, we check
      // the first line, for stable versions, we check the second line
      if (preg_match('/^BSF/', $versions['current']))
      {
        $versions['latest'] = trim($lines[0]);

        // because integer are limited to 4,294,967,296 we need to split BSF
        // versions in date.time
        foreach ($versions as $key => $value)
        {
          $versions[$key] =
            preg_replace('/BSF_(\d{8})(\d{4})/', '$1.$2', $value);
        }
      }
      else
      {
        $versions['latest'] = trim($lines[1]);
      }

      if ('' == $versions['latest'])
      {
        echo "No latest."; lf();
      }
      // concatenation needed to avoid automatic transformation by release
      // script generator
      else if ('%'.'PWGVERSION'.'%' == $versions['current'])
      {
        echo "Dev sources."; lf();
      }
      else if (version_compare($versions['current'], $versions['latest']) < 0)
      {
        echo "New version available."; lf();
      }
      else
      {
        echo "Running latest."; lf();
      }

      echo "Current: ".$versions['current']; lf();
      echo "Latest: ".$versions['latest']; lf();
    }

lf();
?>

Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2024-05-14 18:31:14

digitography
Member
2016-10-27
49

Re: Getting please update to 14.4 but then no option to do so when I login

Do I save the file as something.php or htm?

Offline

 

#4 2024-05-14 19:38:57

erAck
Only trying to help
2015-09-06
2091

Re: Getting please update to 14.4 but then no option to do so when I login

something.php


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2024-05-14 20:30:54

digitography
Member
2016-10-27
49

Re: Getting please update to 14.4 but then no option to do so when I login

And then point the browser at that file?

so I called it snippet.php uploaded it to the route of the piwigo  and pointed the browser at that file, and I get

www.brandontownbowlingclub.co.uk is currently unable to handle this request.
HTTP ERROR 500

Offline

 

#6 2024-05-14 20:41:01

erAck
Only trying to help
2015-09-06
2091

Re: Getting please update to 14.4 but then no option to do so when I login

Well, did you replace YourPiwigoInstallation with the full path to your Piwigo installation, as indicated?


Running Piwigo at https://erack.net/gallery/

Offline

 

#7 2024-05-14 21:09:11

digitography
Member
2016-10-27
49

Re: Getting please update to 14.4 but then no option to do so when I login

I have now replaced YourPiwigoInstallation with

BTBCpiwigo which is where it lives, still get the same error

Offline

 

#8 2024-05-15 11:02:35

erAck
Only trying to help
2015-09-06
2091

Re: Getting please update to 14.4 but then no option to do so when I login

BTBCpiwigo certainly is not the complete absolute file path of your installation. It might be /var/www/html/BTBCpiwigo/ or whatever, but only you can know, if you don't then your hosting provider should.


Running Piwigo at https://erack.net/gallery/

Offline

 

#9 2024-05-15 11:19:04

digitography
Member
2016-10-27
49

Re: Getting please update to 14.4 but then no option to do so when I login

Is there anywhere within Piwigo admin I can find YourPiwigoInstallation, because I am at a bit of a loss.

Offline

 

#10 2024-05-15 13:14:43

OHappyDay
Member
2023-02-08
73

Re: Getting please update to 14.4 but then no option to do so when I login

This is not a question of piwigo but of the type of installation you have:

- If you host your piwigo using a subdomain, e.g. h**ps://myp*****graphy.com, then this would be the correct setting: define('PHPWG_ROOT_PATH', './'); (at least this is how it works for me)
- If you have installed it in some folder of your main domain (e.g. h**ps://www.digitogra*****hotos) then this foldername behind the domain should be used: define('PHPWG_ROOT_PATH', '/myphotos/'); .

You can also have a look into any of the .php files in the piwigo installation. They contain this definition of  PHPWG_ROOT_PATH at the very beginning. Copy & paste it into that something.php file.

Last edited by ddtddt (2024-05-18 06:54:26)

Offline

 

#11 2024-05-15 15:22:18

digitography
Member
2016-10-27
49

Re: Getting please update to 14.4 but then no option to do so when I login

OK got it.

The output from the file is

BSF_200511080019 14.4.0
New version available.
Current: 14.1.0
Latest: 14.4.0

So it needs to be updated, but don't get the option?

Thanks again for all your help with this.

Offline

 

#12 2024-05-16 00:49:48

erAck
Only trying to help
2015-09-06
2091

Re: Getting please update to 14.4 but then no option to do so when I login

Yeah right, I should had noticed you placed the file in your Piwigo directory and for that ./ is sufficient, sorry, my bad. My intention was to not fiddle with any existing installation path.

Anyway, the result confirms some discrepancy. Where you got "New version available." from the snippet, your installation says "You are running Piwigo latest version." instead. Does the same happen when clicking "Check for upgrade" in the Tools -> Maintenance -> Environment tab?

However, dumb question, are you sure you are logged in with a Piwigo account that has the Webmaster role, not just Admin? Only the webmaster role has permission to upgrade.


Running Piwigo at https://erack.net/gallery/

Offline

 

#13 2024-05-16 10:36:40

digitography
Member
2016-10-27
49

Re: Getting please update to 14.4 but then no option to do so when I login

When I open

Tools -> Maintenance -> Environment tab?

I see

"A new version of Piwigo is available.
Update to Piwigo 14.4.0"

When I click on update, nothing actually happens.

And I get

"Currently running version 14.1.0

You are running Piwigo latest version."

As to the account, it is the same account I have used since installation, and all upgrades have been successful. I have 3 other piwigo installations on different URLs, but using the same web server and they have all upgraded fine.

Offline

 

#14 2024-05-17 11:13:26

digitography
Member
2016-10-27
49

Re: Getting please update to 14.4 but then no option to do so when I login

No idea why this would not upgrade.

However logged in this morning, went to Tools > Maintenance

Environment tab

Clicked on check for upgrade, and it gave the option to upgrade.

No Idea, nothing has changed, no new files uploaded, yet now it works!!!

Thanks to all who offered help.

Offline

 

Board footer

Powered by FluxBB

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