forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 install => Topic started by: ron4mac on August 26, 2017, 07:40:18 pm

Title: Easy fresh install of (or upgrade to) CPG 1.6.x
Post by: ron4mac 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 (https://forum.coppermine-gallery.net/index.php/topic,79013.0.html)).   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
Title: Re: Easy fresh install of CPG 1.6.x
Post by: UweB 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
Title: Re: Easy fresh install of CPG 1.6.x
Post by: ron4mac 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.

Title: Re: Easy fresh install of CPG 1.6.x
Post by: UweB 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)
Title: Re: Easy fresh install of CPG 1.6.x
Post by: ron4mac 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.
Title: Re: Easy fresh install of CPG 1.6.x
Post by: UweB on March 06, 2019, 01:09:19 pm
I did!
Title: Re: Easy fresh install of CPG 1.6.x
Post by: ron4mac 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 ]
Title: Re: Easy fresh install of CPG 1.6.x
Post by: UweB on March 06, 2019, 03:23:21 pm
 ;D ;D ;D 
ha ha ha ... GREAT JOB! Thank you so much! Thank you!
Title: Re: Easy fresh install of (or upgrade to) CPG 1.6.x
Post by: treehstn on June 05, 2023, 10:48:43 pm
For those of us that need a little handholding... Do you only upload this one script file or do you download the Source code(zip) file also, unpack the zip and upload all of those files also according to the documentation manual instructions for updating/upgrading?
Title: Re: Easy fresh install of (or upgrade to) CPG 1.6.x
Post by: treehstn on June 05, 2023, 11:36:35 pm
For those of us that need a little handholding... Do you only upload this one script file or do you download the Source code(zip) file also, unpack the zip and upload all of those files also according to the documentation manual instructions for updating/upgrading?

Nevermind!!  I got it to work.  Was just afraid I would mess it up not understanding.  Uploaded both the script and the unpacked files and then ran the update script from the browser address bar.  Worked without a hitch!
Title: Re: Easy fresh install of (or upgrade to) CPG 1.6.x
Post by: wildwalker on August 16, 2023, 11:49:51 am
Hello, and thank you for your reply.

I renamed the file to .php, put it in my web directory and navigated to www.mywebsite/cpg_installer_stub.php.v3.5.php

I got the response:

The extension providing ZipArchive is not available

I guess I need to install something, but am not sure what. Can you advise please :)

Best regards,
Alan.
Title: Re: Easy fresh install of (or upgrade to) CPG 1.6.x
Post by: ron4mac on August 17, 2023, 01:52:04 pm
The extension providing ZipArchive is not available
I guess I need to install something, but am not sure what. Can you advise please

sudo apt install php8.1-zip
Title: Re: Easy fresh install of (or upgrade to) CPG 1.6.x
Post by: FrA1l3 on August 27, 2023, 09:22:08 pm
Hello,
I wanted to ask you a somewhat strange question that I have because I have migrated from hosting and the gallery does not quite work well.
In fact it's weird, because the gallery does show the photos and it works fine, but when I log in it doesn't work.
I have also tried installing a new gallery from cpg_installer_stub.php v3.5, but it still doesn't work, it hangs at step 4.

I have tried various database and PHP configurations and there is no way, the same error always occurs.

The server is Linux
One configuration is: PHP 8.1.21 MariaDB 10.5
In this configuration y can see this message in screen login.php:
Code: [Select]
Deprecated: Optional parameter $type declared before required parameter $marker is implicitly treated as a required parameter in /home/asociacionsantabarbara/www/galeria/plugins/visiblehookpoints/codebase.php on line 303
The other setup is PHP 8.0.29 MySQL 8.0 which is pretty much identical to the setup I had on the old hosting.


What surprises me is that it works fine (shows albums and photos) but when I log in, it gives this error in both cases:
Quote
This page does not work The page hosting.com cannot process this request now.
HTTP ERROR 500

and the url redirects me to this:
Code: [Select]
http://hosting.com/gallery/login.php?referer=
We are talking about a Coppermine 1.6.25

I have looked for all the messages related to HTTP 500 and the url referer= but nothing I have tried works.

Also tell you that the clean installation remains without leaving a trace.
I have tried to run PHP with the latest development version in red, and it does not leave any trace or log. It's just like I don't process it.

Can you help me?
Thank you so much!

Title: Re: Easy fresh install of (or upgrade to) CPG 1.6.x
Post by: FrA1l3 on August 27, 2023, 10:26:45 pm
Ok sorry. I don't know why I was determined to use PHP8, I've been reading all the documentation for 2 days and I had it in my head that version 1.6 worked with PHP8.
It has been to lower the PHP of the hosting to PHP7.4 and the gallery works perfectly.

best regards!   :-[ ;D