forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: ron4mac on March 31, 2017, 10:34:08 pm

Title: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: ron4mac on March 31, 2017, 10:34:08 pm
For currently running CPG 1.5.32+ installations, an assistive script to use for upgrading to the pre-release version of CPG 1.6 was made available here (http://forum.coppermine-gallery.net/index.php/topic,78505.msg381584.html#msg381584).

Attached to this post is a script that can be used to upgrade a CPG 1.5.32+ installation that has suddenly stopped working because of PHP changes (for example) at your site. Place the script file (as cpg_installer_stub.php) in the root of your CPG installation. Access the script as <your_coppermine_url>/cpg_installer_stub.php. Choose to upgrade your current installation.
Be very aware: you could be using a plugin or theme that is not compatible with CPG 1.6

This same script can also be used to create a new installation of CPG 1.6 (or update an existing one with the latest changes).   Make sure you have a database user and password already configured on your server.  Load the script to an appropriate place on your server (where you want the installation to be).  Access the script from a web browser and perform the installation.

Once installation is complete, it is advisable to remove this script.

Update: v2 - may allow more server configurations to use this method (accessing remote files)
Update: v3 - for security reasons, second execution is locked (unlockable)
Update: v3.1 - IE compatibility fix
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: netb on June 21, 2017, 10:44:23 pm
Hello,

I kind of missed that post and did a normal upgrade by downloading the 1.6.03 github source, then overwriting the 1.5 cpg and starting the update.php. Should I be concerned or look for something not quite right? At first glance the script seems to download the latest github files as well.
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: ron4mac on June 21, 2017, 11:57:30 pm
You're good either way. The script was just to make it easier for some people.
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: Dale M. on July 14, 2017, 11:23:39 pm
Tried to do "fix" by using "cpg_installer_stub.php" and all i got was a error:

Releases of CPG not found at Github

What do I do now?

Dale


Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: ron4mac on July 15, 2017, 03:32:13 am
It would seem that your server is not configured in a way that will allow the method to work for you.

Your options are:
Get your hosting provider to backoff PHP7 long enough for you use the "upgrader.php" method. (other thread)

Get your hosting provider to turn on "allow_url_fopen" for your currently running PHP7. Then use the "cpg_installer_stub.php" method.

Use "manual" method to perform the upgrade. http://documentation.coppermine-gallery.net/en/upgrading.htm
Title: Re: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: Dale M. on July 15, 2017, 03:27:50 pm
It would seem that your server is not configured in a way that will allow the method to work for you.

Your options are:
Get your hosting provider to backoff PHP7 long enough for you use the "upgrader.php" method. (other thread)

Get your hosting provider to turn on "allow_url_fopen" for your currently running PHP7. Then use the "cpg_installer_stub.php" method.

Use "manual" method to perform the upgrade. http://documentation.coppermine-gallery.net/en/upgrading.htm

IF I use "manual" method for up grade, it takes me to version 1.5.46, Correct?... Does that get me past the  mysql(i)  and php7 problem or is it just another layer of work and problem will still persist?

IF "manual" method as describes in link works for 1.6.X what is proper download file to do upgrade and do same instruction apply?

Dale
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: ron4mac on July 15, 2017, 03:50:20 pm
Use the 1.6.03 version here: https://github.com/coppermine-gallery/cpg1.6.x/releases

Follow the same method as for 1.5.  You MUST run <your-cpg-site>/update.php after uploading all the files.
Title: Re: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: Dale M. on July 15, 2017, 06:48:39 pm
Use the 1.6.03 version here: https://github.com/coppermine-gallery/cpg1.6.x/releases

Follow the same method as for 1.5.  You MUST run <your-cpg-site>/update.php after uploading all the files.

Thank you... The adventure continues... Keeping fingers crossed....

Dale M.
Title: Re: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: Dale M. on July 15, 2017, 09:45:09 pm
Thank you... The adventure continues... Keeping fingers crossed....

Dale M.

Ok.... I can see  Coppemine and navigate through all the images, BUT can not log in as "admin"... Get this error message:

This page isnít working

mariposamuseum.com is currently unable to handle this request.

HTTP ERROR 500


Going to search forum for possible answers... It's getting better, but not quite "there" yet...

Dale
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: ron4mac on July 15, 2017, 09:57:46 pm
Did you run "update.php"?
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: Dale M. on July 15, 2017, 10:05:49 pm
YES for second time, may have entered "update.php" incorrectly in URL first time around and did not any error message...

Everything seems good now.. Keeping fingers crossed!

Thank you the guidance and patience..

Cheers!

Dale M.
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: DKogan on November 17, 2017, 11:04:39 pm
Thanks for the suggestion....I'll wait for the "stable" release. I understand its a beta release but my users might not understand. :)
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: ron4mac on November 18, 2017, 05:58:24 am
Thanks for the suggestion....I'll wait for the "stable" release. I understand its a beta release but my users might not understand. :)
To think that CPG 1.6.03 is not stable would be wrong thinking. It has only not been fully released due to lacking updates for the documentation. Your users may also not understand your gallery being down because your hosting provider changed server software ... something that v1.6.x is ready for. Ultimately though ... your choice.
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: mikeandm on December 29, 2017, 05:56:31 pm
Hello - Apologies for what must be a truly dumb question but I can't get cpg_installer_stub.php to run beyond its start screen. With the Install location selected as "Upgrade..." and Available Install Packages selected as "CPG Developer Release 1.6.03", pressing "Install Selected Package" just produces a popup message "Please select the package to install". This happens (repeatedly) on Microsoft Edge and Internet Explorer. The radio button for the selection shows correctly. I'm not aware of any unusual settings in the browsers. Any ideas on what can be going wrong? Many thanks in advance...
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: mikeandm on December 29, 2017, 06:29:07 pm
Yes - seems it was a daft question and the answer appears to be "Use Firefox!" (or presumably other browsers). Still clueless as to why Edge and IE don't play... Anyway, script now run successfully - very many thanks!
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: ron4mac on December 29, 2017, 07:03:47 pm
Still clueless as to why Edge and IE don't play...
Added an updated script (above) for IE compatibility.
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: Dankriss on February 08, 2018, 12:11:30 pm
I just used this as SourceForge is down at the moment... or is for me... WOW so much easier to do a new install...


Only problem I had because I am thick is to not upload the .txt document but make a new one!  doh!


Thanks


Kriss :)
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: anglefire on March 11, 2018, 04:58:34 pm
I've run this script on  my 1.5.20 install - and it says everything is installed and the option to complete install is displayed.

But running that and I get this error:

Fatal error: Uncaught Error: Call to undefined function cpg_db__fetch_assoc() in /var/www/disco3club/public_html/gallery/bridge/phpbb3.inc.php:167 Stack trace: #0 /var/www/disco3club/public_html/gallery/bridge/udb_base.inc.php(168): cpg_udb->get_groups(Array) #1 /var/www/disco3club/public_html/gallery/bridge/udb_base.inc.php(89): core_udb->load_user_data(Array) #2 /var/www/disco3club/public_html/gallery/include/init.inc.php(257): core_udb->authenticate() #3 /var/www/disco3club/public_html/gallery/update.php(26): include_once('/var/www/disco3...') #4 {main} thrown in /var/www/disco3club/public_html/gallery/bridge/phpbb3.inc.php on line 167

Any ideas?

Mark
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: ron4mac on March 11, 2018, 05:14:21 pm
Run the installer script again but choose the bottom (red) version to install. You'll pick up a change that corrects this (along with some other bug fixes).

But also please note that the recommended version to upgrade from in this way was mentioned as 1.5.32+.
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: anglefire on March 11, 2018, 05:27:41 pm
Thanks - that has helped - the only issue I have now is that my coppermine admin account details are not what I thought they were!
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: ron4mac on March 11, 2018, 05:34:24 pm
You may not have run update.php (it should have run automatically)
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: anglefire on March 11, 2018, 06:25:19 pm
I'm at that point now - and the admin account I use on the old version (I've just checked on the old server) doesn't work - its asking for authentication but the user I have for admin (Not the one in the image here) isn't working.

Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: ron4mac on March 11, 2018, 06:34:37 pm
Part of the issue with trying this with a version < 1.5.32.

You'll have to mess with that database in this way:
http://forum.coppermine-gallery.net/index.php/topic,79099.msg383519.html#msg383519
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: anglefire on March 11, 2018, 07:09:54 pm
Thanks again,


Finally sorted it - though do i Have to unbridge it to be able to change the admin password?
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: ron4mac on March 11, 2018, 07:20:55 pm
Finally sorted it - though do i Have to unbridge it to be able to change the admin password?

Yes.
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: anglefire on March 11, 2018, 07:26:46 pm
Thanks - I actually read something after I posted this and it is sorted

Have a tipple of something on me :)
Title: Re: CPG 1.6 (PHP7) Upgrade/Install Aid
Post by: FrA1l3 on March 13, 2018, 04:48:55 pm
thank you for this script. It saves me a lot of time  ;) :)