CPG 1.6 install on new VPS - Fails after DB selection step CPG 1.6 install on new VPS - Fails after DB selection step
 

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

Main Menu

CPG 1.6 install on new VPS - Fails after DB selection step

Started by cpgusr007, November 06, 2021, 07:27:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cpgusr007

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:
git clone https://github.com/coppermine-gallery/cpg1.6.x.git
mv cpg1.6.x coppermine
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
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
[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
   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?

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

cpgusr007

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:

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...

ron4mac

My guess is that the db password has a single quote (') in it. I can see that this condition would not be handled well.

ron4mac

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.

cpgusr007

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:

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).

ron4mac

Quote
Notice: Undefined index: db_typedb_hostdb_userdb_passworddb_namedb_prefix in /var/www/html/coppermine/install.php on line 1715

My bad  ::) ... corrected.

cpgusr007

Hey there,

do I need to reinstall or do anything else before I roll out the site?

ron4mac

Quote from: cpgusr007 on November 09, 2021, 04:00:39 PM
do I need to reinstall or do anything else before I roll out the site?
Nope ... should be good to go.

cpgusr007