forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 install => Topic started by: cpgusr007 on November 06, 2021, 07:27:45 pm

Title: CPG 1.6 install on new VPS - Fails after DB selection step
Post by: cpgusr007 on November 06, 2021, 07:27:45 pm
Hello, 

I am trying to install the latest CPG on a new Rocky Linux 8 VPS (replacement for Centos 8).  I already have CPG running on Centos 7 but the install is dated (2014) and I want to restart fresh.

The issue I have is that the installer fails at the step where it connects to the database.  Basically, I get a blank page after I click on "Next step".   For information, I use a remote MariaDB server for database storage.  Current CPG works perfectly that way.

What I've done:

Go to /var/www/html and:
Code: [Select]
git clone https://github.com/coppermine-gallery/cpg1.6.x.git
Code: [Select]
mv cpg1.6.x coppermine
Code: [Select]
chown -R apache:apache coppermine
Navigated to https://vps.localdomain/coppermine/install.php

Step 1: License agreement: OK (no problems)
Step 2: Checking installation files: OK  (no problems)
    Displaying 1505 items of 1505 folders/files processed with 0 potential issues

Step 3: Checking directory permissions: OK  (no problems)
    Directory   Status
    ./albums   Writable
    ./albums/userpics   Writable
    ./albums/edit   Writable
    ./include   Writable

Step 4: Image package selection: OK (no problems)

Your server supports the following image package(s)
GDlib Version 2.
ImageMagick Version 6.9.10(at: /usr/bin/)

Step 5: Testing image library: OK (but for some reasons I have to click "Next step" twice...)

Step 6: Database user authentication

Remark 1: Only MYSQLI or PDO:Mysql are available in the dropdown menu.
I selected "MYSQLI"
I entered the address of the DB server, username & password (for information, I can connect to the remote MariaDB server using the same credentials via the mysql CLI command)
I clicked "Test connection" => "Successful connection with database"
I clicked "Next step"

I get a BLANK page.

php -v
Code: [Select]
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.24, Copyright (c) 1999-2018, by Zend Technologies

php -m
Code: [Select]
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

hostnamectl
Code: [Select]
   Static hostname: vps.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
           Boot ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Virtualization: kvm
  Operating System: Rocky Linux 8.4 (Green Obsidian)
       CPE OS Name: cpe:/o:rocky:rocky:8.4:GA
            Kernel: Linux 4.18.0-305.25.1.el8_4.x86_64
      Architecture: x86-64

Of course I tried with the cpg_install_stub.php script (v3.4) pretty much every possible way (selecting different CPG versions, etc) and I could NEVER make it work past the DB step (sometimes even having other issues)

Whats next?
Title: Re: CPG 1.6 install on new VPS - Fails after DB selection step
Post by: phill104 on November 08, 2021, 06:29:46 pm
Your problem does not appear to be related to a DB issue, but something on your server setup. The reason you are seeing a blank page is because your server has errored but it is setup to not dis-lay those errors. You need to find out what the error actua;ly is for us to be able to come to a resolution. There are a couple of ways to do this. The first is to look at the error logs on your server for the exact time the error happened. These should provide info on exactly what is failing. The other is to temporarily set display errors on your server to on as you will then see the error message generated by your server. Your host should be able to advise on how to do this.
Title: Re: CPG 1.6 install on new VPS - Fails after DB selection step
Post by: cpgusr007 on November 09, 2021, 01:33:59 am
Hello,

After about an hour playing around with Apache and PHP, I ended up reinstallng PHP but this time tried with 7.4. 

When I proceed through the installer, instead of the blank page I get:

Code: [Select]
Parse error: syntax error, unexpected 'FdE' (T_STRING), expecting ')' in /var/www/html/coppermine/include/config.tmp.php on line 19
I believe this is the actual error...
Title: Re: CPG 1.6 install on new VPS - Fails after DB selection step
Post by: ron4mac on November 09, 2021, 02:16:45 am
My guess is that the db password has a single quote (') in it. I can see that this condition would not be handled well.
Title: Re: CPG 1.6 install on new VPS - Fails after DB selection step
Post by: ron4mac on November 09, 2021, 12:44:22 pm
I have made changes to the install procedure that should correct your issue.
Use the cpg_installer_stub and choose the bottom-most (highlighted in red) version to install. It will have the needed changes.

Thank you for working through this to help discover the cause for failure. Sorry for your troubles.
Title: Re: CPG 1.6 install on new VPS - Fails after DB selection step
Post by: cpgusr007 on November 09, 2021, 03:22:08 pm
Hello Ron,

Thanks for the support!  No worries about the "troubles".  I tried the competition and came back to Coppermine for a good reason :)

About the DB password, you were right, it had a single quote in it (was actually starting with a single quote).  I changed it to simple alpha-numeric and re-cloned from github. 

However I noticed two things:

1.  At pretty much every step, I had to click "Next step" twice or more.  No error messages.  Please note that PHP and Apache are currently configured to show (display) errors on the screen as well as in the logs.
2.  At the database step, I entered the DB credentials, clicked test connection (to which it said Connection successful) then I click Next step only to be presented with the same screen over & over.

At this point I deleted the entire folder, and used the cpg_installer_stub.php script to install fresh and selected CPG Release 1.6.15

Followed the normal install steps (I was also hit by the double clicks on "Next steps" again), then I got to the dreaded DB step which only came back up each time I hit "Next step.

Restart from scratch, delete everything, re-upload the stub install script and this time I selected the red option at the bottom (latest dev code or something similar)

Then got past the DB step without errors!

However at the final step, I got:

Code: [Select]
Notice: Undefined index: db_typedb_hostdb_userdb_passworddb_namedb_prefix in /var/www/html/coppermine/install.php on line 1715
But the site seems to work well (except a small issue with the skin/theme -> see screenshot).
Title: Re: CPG 1.6 install on new VPS - Fails after DB selection step
Post by: ron4mac on November 09, 2021, 03:36:09 pm
Quote
Code: [Select]
Notice: Undefined index: db_typedb_hostdb_userdb_passworddb_namedb_prefix in /var/www/html/coppermine/install.php on line 1715

My bad  ::) ... corrected.
Title: Re: CPG 1.6 install on new VPS - Fails after DB selection step
Post by: cpgusr007 on November 09, 2021, 04:00:39 pm
Hey there,

do I need to reinstall or do anything else before I roll out the site?
Title: Re: CPG 1.6 install on new VPS - Fails after DB selection step
Post by: ron4mac on November 09, 2021, 04:37:51 pm
do I need to reinstall or do anything else before I roll out the site?
Nope ... should be good to go.
Title: Re: CPG 1.6 install on new VPS - Fails after DB selection step
Post by: cpgusr007 on November 09, 2021, 04:54:33 pm
Thats great!

Thanks a lot for your time and support!