Problems with install Problems with install
 

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

Problems with install

Started by pschmehl, June 16, 2017, 08:15:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pschmehl

I maintain several websites. Three of them are on one virtual server that is running PHP 7.1.5. Coppermine runs on one site: http://www.specialforcesphotos.com/. It was an older 1.5 version, so I updated it to 1.5.48, but it still didn't work. So I upgraded to 1.6.03. I logged into the updater and successfully completed the update, but when I login, I get a blank page. I decided to create a test account, but the captcha image is broken, so I can't do that.

This is the url when visting as a guest: http://www.specialforcesphotos.com/index.php As you can see, it appears to be a normal Coppermine site.
This is the url when logged in as admin: http://www.specialforcesphotos.com/login.php?referer=index.php I'd take a screenshot, but it's a completely blank page.
The same thing happens when I login with my account, which has normal privileges.

This is the registration page: http://www.specialforcesphotos.com/register.php

This is a screenshot of the captcha portion of the registration page: https://www.dropbox.com/s/65jkfq4ei40favm/registration.jpeg?dl=0

If you need anything from me, I'll be glad to provide it. I have sudo access to the server. I don't have the option to roll back to php 5.56, and I'm not overly concerned if the site is down for a while. If you have new beta code, I have no problem testing it out.

Server details: FreeBSD 10.3-RELEASE
Apache 2.4.25
Mysql 5.6.36
PHP 7.1.5


phill104

First thing you should do is enable error display on your server or lookup the error in your logs. When you see the blank screen, an errror has occurred but your server is setup to hide that error and place it in the logs. Once we know what the actual error is we can advise accordingly
It is a mistake to think you can solve any major problems just with potatoes.

pschmehl

The last error in the apache website error log is from last night.
[Thu Jun 15 19:49:08.966999 2017] [php7:error] [pid 48119] [client 76.183.153.52:50075] PHP Fatal error:  Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /usr/home/sherman/Sites/www.specialforcesphotos.com/update.php:33\nStack trace:\n#0 {main}\n  thrown in /usr/home/sherman/Sites/www.specialforcesphotos.com/update.php on line 33
This is my last login in the apache website access logs:
76.183.153.52 - - [16/Jun/2017:11:26:06 -0700] "GET /login.php?referer=index.php HTTP/1.1" 200 2313 "http://forum.coppermine-gallery.net/index
.php/topic,79080.0.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.3
0"
76.183.153.52 - - [16/Jun/2017:11:26:15 -0700] "POST /login.php?referer=index.php HTTP/1.1" 500 - "http://www.specialforcesphotos.com/login.php?referer=index.php" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30"

I'm seeing a bunch of these in the apache server error log
[Fri Jun 16 00:00:01.274201 2017] [core:notice] [pid 27133] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
Failed loading /usr/local/lib/php/20151012/opcache.so:  Cannot open "/usr/local/lib/php/20151012/opcache.so"
Failed loading /usr/local/lib/php/20151012/opcache.so:  Cannot open "/usr/local/lib/php/20151012/opcache.so"

I pkg deleted opcache and reinstalled it. Then I restarted Apache. I got this in the server error log:
[Fri Jun 16 14:02:46.850145 2017] [core:notice] [pid 27133] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
Failed loading /usr/local/lib/php/20151012/opcache.so:  Cannot open "/usr/local/lib/php/20151012/opcache.so"

But, opcache.so is in a different place.
/usr/local/lib/php/20160303/opcache.so
I'll report the results of my investigation here.

pschmehl

I forced the reinstall of Apache and its dependencies, which resolved the opcache.so not found issue. The index page is still blank after logging in, but I'm not seeing any errors in the logs. I'll look through the docs to figure out how to enable debug mode.

pschmehl

If I go to /update.php, I'm prompted for a login. After I login as admin, I'm taken to a page listing the things that need to be changed/updated/deleted. The list says already done. If I then click on check your file versions or gallery's start page, debug says I'm a guest. So, somehow I'm getting logged out after running update.php. Once I'm logged in, the page is blank. The registration page still has the broken captcha as well.

I'm not seeing anything in the logs.

phill104

It is hard to diagnose your server issues, which is I believe where the error lies.  When I say enable the display of errors, I am talking about in your server setup, not coppermine. The error could be a PHP setup one, an apache one or a number one f other things. Only by knowing what the obfuscated error is can we begin to understand what the cause is.
It is a mistake to think you can solve any major problems just with potatoes.

pschmehl

I enabled some extra logging in php, and found this in the logs today:
[Sat Jun 17 10:14:11.777984 2017] [php7:error] [pid 34987] [client 66.249.79.6:57469] script '/home/sherman/Sites/www.specialforcesphotos.com/docs/en/register.php' not found or unable to stat
[Sat Jun 17 10:14:35.854197 2017] [php7:error] [pid 34987] [client 66.249.79.6:44521] script '/home/sherman/Sites/www.specialforcesphotos.com/docs/en/pluginmgr.php' not found or unable to stat

Both of those files are in the root of the app, so that's pretty odd.

phill104

What is this setting? http://documentation.coppermine-gallery.net/en/configuration.htm#admin_general_coppermine-url

As you are not able to logon, you may need to check it in your database using phphmyadmin or whatever tool you have installed on your server.
It is a mistake to think you can solve any major problems just with potatoes.

ron4mac

For the registration captcha, you need to make sure that the GD2 functions are available to PHP.

Your blank screen problems could be caused by an incompatible plugin. Rename the plugin folder to something else (e.g. pplugin), essentially disabling all plugins, and see if the blank screen goes away. If that corrects things, use the process of elimination to identify the problem plugin(s).

You might find benefit in doing a clean install in another area on your server. Use the info that you discover in that process to correct the issues with your existing galleries.

pschmehl

Quote from: Phill Luckhurst on June 18, 2017, 10:04:47 AM
What is this setting? http://documentation.coppermine-gallery.net/en/configuration.htm#admin_general_coppermine-url

As you are not able to logon, you may need to check it in your database using phphmyadmin or whatever tool you have installed on your server.
I login to mysql directly and run queries.

mysql> select name, value from cpg15x_config where name like '%ecards%';
+------------------------+-------------------------------------+
| name                   | value                               |
+------------------------+-------------------------------------+
| ecards_more_pic_target | http://www.specialforcesphotos.com/ |
| log_ecards             | 0                                   |
+------------------------+-------------------------------------+
2 rows in set (0.01 sec)

mysql> select name, value from cpg15x_config where name like '%home%';;
+-------------+-----------+
| name        | value     |
+-------------+-----------+
| home_target | index.php |
+-------------+-----------+
1 row in set (0.01 sec)

pschmehl

Quote from: ron4mac on June 18, 2017, 01:19:10 PM
For the registration captcha, you need to make sure that the GD2 functions are available to PHP.

Your blank screen problems could be caused by an incompatible plugin. Rename the plugin folder to something else (e.g. pplugin), essentially disabling all plugins, and see if the blank screen goes away. If that corrects things, use the process of elimination to identify the problem plugin(s).

You might find benefit in doing a clean install in another area on your server. Use the info that you discover in that process to correct the issues with your existing galleries.
Installing the gd extension fixed the captcha problem. Thank you.

These are the plugins in the plugin directory.
ls /home/sherman/Sites/www.specialforcesphotos.com/plugins/
link_target      opensearch      upload_h5a      upload_swf      visiblehookpoints
onlinestats      sample         upload_sgl      usergal_alphatabs

These are the plugins downloaded with the installer.
ls /home/schmehl/cpg1.6.x-develop/plugins/
sample         upload_h5a      upload_sgl      upload_swf      visiblehookpoints

Since I can't uninstall these, can I just change perms or ownership so that they can't be accessed?

I looks like link_target, opensearch, onlinestats, usergal_alphatabs, and visiblehookpoints are the addons.

pschmehl

It looks like only three are "installed", and those are core plugins.

mysql> select name, enabled from cpg15x_plugins;
+----------------+---------+
| name           | enabled |
+----------------+---------+
| CoreH5A Upload |       1 |
| CoreSWF Upload |       1 |
| CoreSGL Upload |       1 |
+----------------+---------+
3 rows in set (0.00 sec)

pschmehl

I just attempted to register a test account. Although it appeared to work, it failed. The username is not in the db, and when I look at the log, there are no INSERT queries at all. Only SELECT queries.

pschmehl

I just created a new db (coppermine_test) and a new directory and copied the files over. Set perms. Ran install.  Got this error:
Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /usr/home/sherman/Sites/www.specialforcesphotos.com/cpg1.6.x-develop/include/database/mysqli/install.php on line 273 Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /usr/home/sherman/Sites/www.specialforcesphotos.com/cpg1.6.x-develop/include/database/mysqli/install.php on line 278

pschmehl

One thing I forgot to mention. I discovered during the install that mcrypt was not present. After installing that extension, the original site login works fine. Registration also works. So it appears that the problems with the original site are resolved.

I can keep the test site up if you want to use it for troubleshooting.

ron4mac

Quote from: pschmehl on June 19, 2017, 12:18:25 AM
One thing I forgot to mention. I discovered during the install that mcrypt was not present.
Interesting...  Earlier today I made changes to CPG (Github) that would keep it from needing mcrypt any more.  ???

Glad you resolved your site problem.

phill104

It is a mistake to think you can solve any major problems just with potatoes.