Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Easy fresh install of (or upgrade to) CPG 1.6.x  (Read 21979 times)

0 Members and 1 Guest are viewing this topic.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1986
Easy fresh install of (or upgrade to) CPG 1.6.x
« on: August 26, 2017, 07:40:18 pm »

The script attached here can be used to create a new installation of CPG 1.6 (or update an existing gallery).   Make sure you have a database user and password already configured on your server.  Load the script (as cpg_installer_stub.php) 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.

Update: v3.3 better notification of file placement errors
Update: v3.4 added robustness for more restricted systems
Update: v3.5 option to show all available CPG 1.6.x versions
« Last Edit: February 26, 2023, 04:58:05 pm by ron4mac »
Logged

UweB

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Easy fresh install of CPG 1.6.x
« Reply #1 on: March 04, 2019, 11:15:21 am »

Hello.
I have twice galleries with version 1.5.20
with php 5.6 both galleries works fine
now my provider changes to php 7.2

gallery one
all data old content, use the cpg_installer_stub.php (version 3.2)
start running
http://www.***.com/PORTAL/cpg/cpg_installer_stub.php
--> All package files were successfully placed. Click below to complete the install. (I used V 1.6 04)
--> click on the button "Complete install"
--> http://***/PORTAL/cpg/update.php
-->Fatal error: Uncaught Error: Call to a member function fetchAssoc() on boolean in /homepages/***/PORTAL/cpg/include/init.inc.php:181 Stack trace: #0 /homepages/***/PORTAL/cpg/update.php(26): include_once() #1 {main} thrown in /homepages/***/PORTAL/cpg/include/init.inc.php on line 181

gallery two
I have deleted all files (except albums folder) and upload the complete V 1.6.04 data
I have upload anycontent.php and include/config.php from backup (older version)
--> http://www.***.com/PORTAL/cpg2/upgrader.php
--> Fatal error: Uncaught Error: Call to a member function fetchAssoc() on boolean in /homepages/***/PORTAL/cpg2/include/init.inc.php:181 Stack trace: #0 /homepages/***/PORTAL/cpg2/upgrader.php(21): require() #1 {main} thrown in /homepages/***/PORTAL/cpg2/include/init.inc.php on line 181

what is wrong?

Note: If I change back to php 5.6 and upload the backup, everthing is fine. But I can't use php 5.6 anymore, because my provider will not recommend this version since 12/2018
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1986
Re: Easy fresh install of CPG 1.6.x
« Reply #2 on: March 04, 2019, 02:03:03 pm »

For some reason, it seems to not connect to your database. The include/config.inc.php file must exist in its proper location when update.php runs.

The installer stub is a convenience method. If, for some reason, it does not work for you, you can resort to the standard method.
https://coppermine-gallery.net/docs/curr/en/upgrading.htm#upgrade_any

[EDIT]
I have just made a change to CPG 1.6 that should display/record the database problem in your situation. Please use the installer_stub again but choose the bottom install package (highlighted in red). The error situation should be displayed and/or recorded in the logs directory.

« Last Edit: March 04, 2019, 03:22:12 pm by ron4mac »
Logged

UweB

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Easy fresh install of CPG 1.6.x
« Reply #3 on: March 04, 2019, 07:26:35 pm »

Hello,
thank you for the fast answer.

for the first gallery (1.6.04) I used the http://www.***.com/PORTAL/cpg/cpg_installer_stub.php again
config.inc is located in Root/include/config.inc.php

ones time with php 5.6
ones time with php 7.2

same RESULT:

Fatal error :

.

When read CONFIG from database

database error:  :


in second gallery I have not checked (tomorrow will do)
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1986
Re: Easy fresh install of CPG 1.6.x
« Reply #4 on: March 04, 2019, 10:34:55 pm »

Very strange problem!!

Would you allow me to examine your site?

Place the attached file (unzipped) in the root of your website and PM me with a link to the site.
The file will allow only me to view files and make any needed uploads to resolve the issue.
« Last Edit: March 06, 2019, 04:13:13 pm by ron4mac »
Logged

UweB

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Easy fresh install of CPG 1.6.x
« Reply #5 on: March 06, 2019, 01:09:19 pm »

I did!
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1986
Re: Easy fresh install of CPG 1.6.x
« Reply #6 on: March 06, 2019, 02:46:17 pm »

I upgraded both /cpg and /cpg2 (did not upgrade /cpg3) using the cpg_installer_stub.

The key change I made that allowed the upgrade to complete okay was to set the dbserver in config.inc.php to just localhost.

[ I removed the filemanager files ]
Logged

UweB

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Easy fresh install of CPG 1.6.x
« Reply #7 on: March 06, 2019, 03:23:21 pm »

 ;D ;D ;D 
ha ha ha ... GREAT JOB! Thank you so much! Thank you!
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 21 queries.