Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2   Go Down

Author Topic: Logins fail after updating to 1.6.03  (Read 22733 times)

0 Members and 2 Guests are viewing this topic.

aldrichtm

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Logins fail after updating to 1.6.03
« on: October 18, 2017, 08:28:54 pm »

I've reviewed all the 1.6x upgrading posts and done too many searches (not just in 1.6), and after trying a number of suggestions I'm still not able to login. I was running 1.5.32 before our PHP was updated to 7.0.22. [Side note, PHP7 is required for the current Wordpress, which is probably why providers have upgraded to 7.]

This is the gallery I'm trying to login to. http://www.strategicon.net/photo_galleries/index.php

From the admin side of things...
Once I followed the steps to get things to use mysqli, the update.php was saying everything up to date, but the check versions didn't work and when I tried to login I got a blank page.
Now, when I try to run update.php I get this error "Could not authenticate you". No Apache errors. The user record exists and is an admin.

From the album website...
Everything looks and works like it did when I last saw it working (a year ago), until I try to login. Then I get the blank page. No Apache errors.

Not that I believe I'm using any, but I renamed the plugins directory, as suggested.
I don't use any bridges.
The only configuration I can think of that was done outside the admin pages is a custom header and footer referenced in lang/english.php. And nothing changes when I remove it all.
Hope you can help.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Logins fail after updating to 1.6.03
« Reply #1 on: October 18, 2017, 09:10:04 pm »

Which method did you use to update your site files?
Logged

aldrichtm

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Logins fail after updating to 1.6.03
« Reply #2 on: October 18, 2017, 10:40:01 pm »

You might want to assume I did them all. Let's see what I can remember, I've been working on this on and off for over a week.
upgrader.php version 1 and 2, and cpg_installer_stub.php
When all those failed even after getting ZipArchive installed, I believe I found a reference to doing a standard manual update. Really wish that had been emphasized as the safest approach.
Did the manual update.
Ran update.php.
At some point, the mysqli problem got resolved, but I don't remember when.
At some point, I had to chown the files that cpg_installer_stub.php managed to copy over as www.
And, finally discovered the database user password had changed. Fixed that.
Ran the update.php at least twice. First time got a list with a few green check marks. Second time all green.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Logins fail after updating to 1.6.03
« Reply #3 on: October 18, 2017, 10:42:33 pm »

If you are able to modify the database, set debug mode:

In the _config table, find the entry for debug_mode. Change its value to 1.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Logins fail after updating to 1.6.03
« Reply #4 on: October 18, 2017, 11:04:25 pm »

Just as a point of order for others, the latest Wordpress will work with PHP 5.2.4 upwards. With PHP 5.6 still over a year from end of life it is frustrating many that the Wordpress team are not being quite as clear as they should be.

As for your site, did you check everything was working before the upgrade, and do you have backups?
Logged
It is a mistake to think you can solve any major problems just with potatoes.

aldrichtm

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Logins fail after updating to 1.6.03
« Reply #5 on: October 18, 2017, 11:20:16 pm »

debug_mode set to 1. Now what?

Can't change the PHP version.

The whole reason for the upgrade was because the site hasn't worked since we upgraded our PHP. Before that as far as I know it was working.

I have backups. What did you have in mind?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Logins fail after updating to 1.6.03
« Reply #6 on: October 19, 2017, 02:04:04 am »

I was hoping that setting debug mode would cause whatever error is occurring to be displayed.

My feeling is that there may be a corrupt file there somewhere.

You may have to agree to let us (me) have access to your cpanel (if that's what you have).

Another option is to make a change to include/debugger.inc.php.
At around line 55 in the file, make this change (comment out 1 line):
Code: [Select]
            if ($phpver < 43) {
                $this->old_handler = set_error_handler('cpg_error_handler');
            } else {
//                $this->old_handler = set_error_handler(array(&$this, 'handler'));   // <- comment out this line
            }
That may cause the error to be displayed.
Logged

aldrichtm

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Logins fail after updating to 1.6.03
« Reply #7 on: October 19, 2017, 04:16:38 am »

Ah-hah!

Notice: Undefined index: auth in photo_galleries/update.php on line 97
Line 97:
if (!defined('SKIP_AUTHENTICATION') && !$_SESSION['auth']) {

Notice: Undefined variable: CONFIG in photo_galleries/update.php on line 296
Could not authenticate you.
Line 296:
echo $lang_update_php['could_not_authenticate']. '. '.sprintf($lang_update_php['provide_admin_account_dbase'], $CONFIG['dbname']).'. <a href="update.php">' . $lang_update_php['try_again'] . '</a>.';

So, does my update.php need updating, or is it something else?

I'm running purely command line or via php for debugging.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Logins fail after updating to 1.6.03
« Reply #8 on: October 19, 2017, 04:43:24 am »

I'm quite sure your update.php is okay ... it's something else.

I advise you to not run things from the command line/php ... it may cause permission or ownership issues with files. You should only be accessing the scripts using a web browser.
Logged

aldrichtm

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Logins fail after updating to 1.6.03
« Reply #9 on: October 19, 2017, 06:36:14 pm »

I use a browser for scripts that run on a browser, like Coppermine's. But for the upgrader/cpg_installer_stub, that actually caused ownership issues. My Coppermine files are owned by the account, not www. So I had to switch all the files the upgrade added back to the account in order for Coppermine to access them.

There is no cpanel, editing and viewing files, and viewing the database is via command line.

I'm willing, within reason, to install tools in the account that might help, provided they don't require root or admin access.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Logins fail after updating to 1.6.03
« Reply #10 on: October 19, 2017, 08:48:27 pm »

If you'll install the attached file in your root or CPG directory it will allow me to browse your setup.
Don't place it there as filemanager.php ... name it something else. Then let me know its path and name so that I can access it.
If you can't PM me, email me at ...
« Last Edit: October 20, 2017, 12:41:06 am by ron4mac »
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Logins fail after updating to 1.6.03
« Reply #11 on: October 20, 2017, 12:57:26 am »

I really believe that, since you're running ubuntu with no cpanel, all the files and folders in /home/stratcon/Domains/strategicon.net/ should belong to www-data:www-data instead of stratcon:stratcon.

Without the files owned by the web server:
1) you can't upload files
2) you won't be getting any logging
3) you have to have files (such as include/config.inc.php) world writeable .. not a good idea.
4) CPG may not run properly  ;)
« Last Edit: October 20, 2017, 03:09:34 am by ron4mac »
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Logins fail after updating to 1.6.03
« Reply #12 on: October 20, 2017, 01:20:16 am »

Thinking about it more ... the login failure may be coming from CPG not being able to write the log file (in logs/) because of the ownership/permission issue.
Logged

aldrichtm

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Logins fail after updating to 1.6.03
« Reply #13 on: October 20, 2017, 03:39:56 am »

I'm willing to consider changing the ownership on the Coppermine files. Do the permissions change?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Logins fail after updating to 1.6.03
« Reply #14 on: October 20, 2017, 04:23:10 am »

Thinking about it more ... the login failure may be coming from CPG not being able to write the log file (in logs/) because of the ownership/permission issue.
Well ... you changed the ownership on logs/ and that didn't solve it.

Here is what has to be solved ... an error is occurring but not being displayed or logged. Your php has no log file name set, so it will not write the error to a log file. Perhaps if that could be changed we can see what the error is. Without knowing how it is failing, it's going to be near impossible to resolve.
Logged

aldrichtm

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Logins fail after updating to 1.6.03
« Reply #15 on: October 20, 2017, 05:15:18 am »

Trust me, I know about untraceable errors.
So, how do we set a file name for the log file?

I'm willing to change the Coppermine file ownership, but I have to wonder what changed between versions that would suddenly require www-data ownership to work. And it's only the management side of things. The site is very viewable.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Logins fail after updating to 1.6.03
« Reply #16 on: October 20, 2017, 06:02:56 am »

So, how do we set a file name for the log file?

Since PHP is running as an Apache module, you'll have to do it in a .htaccess file.
Create the file .htaccess in your CPG root directory.
Add these lines to it:
Code: [Select]
php_flag display_errors on
php_value error_log php_error.log
php_value error_reporting -1

You'll likely have to modify include/debugger.inc.php (more) at line 48:
Code: [Select]
                $this->old_error_logging = ini_set('log_errors', 1);
And, you'll have to let the web server own the CPG directory (www-data) so that it can write the error log.
« Last Edit: October 20, 2017, 03:24:43 pm by ron4mac »
Logged

aldrichtm

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Logins fail after updating to 1.6.03
« Reply #17 on: October 20, 2017, 07:01:23 pm »

Changes made. I'm still not seeing the error log, though I'm not entirely sure where is should be?

I don't suppose something needs to be done in Apache itself in order for the .htaccess to be read?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Logins fail after updating to 1.6.03
« Reply #18 on: October 20, 2017, 09:35:48 pm »

The .htaccess file has no effect.

And, because you changed ownership in there, I was able to add a php.ini in the CPG directory to try to coerce some more error reporting. That had no effect either. Your host has things tied up pretty tightly. You may have to request their help to get sufficient error reporting.

Also, at this point, with ownerships set, I personally would be tempted to try the cpg_installer_stub again.
Logged

aldrichtm

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Logins fail after updating to 1.6.03
« Reply #19 on: October 20, 2017, 10:41:03 pm »

Re-ran cpg_installer_stub, still can't log in.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.03 seconds with 19 queries.