Advanced search  

News:

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

Pages: [1]   Go Down

Author Topic: Problems with install  (Read 694 times)

0 Members and 2 Guests are viewing this topic.

pschmehl

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Problems with install
« on: June 16, 2017, 08:15:13 PM »

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

Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4383
    • Windsurf.me
Re: Problems with install
« Reply #1 on: June 16, 2017, 09:41:33 PM »

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

pschmehl

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Problems with install
« Reply #2 on: June 16, 2017, 11:07:33 PM »

The last error in the apache website error log is from last night.
Code: [Select]
[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 33This is my last login in the apache website access logs:
Code: [Select]
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
Code: [Select]
[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:
Code: [Select]
[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.
Code: [Select]
/usr/local/lib/php/20160303/opcache.soI'll report the results of my investigation here.
Logged

pschmehl

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Problems with install
« Reply #3 on: June 16, 2017, 11:42:13 PM »

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

pschmehl

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Problems with install
« Reply #4 on: June 17, 2017, 01:13:32 AM »

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

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4383
    • Windsurf.me
Re: Problems with install
« Reply #5 on: June 17, 2017, 07:52:05 AM »

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

pschmehl

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Problems with install
« Reply #6 on: June 17, 2017, 11:52:37 PM »

I enabled some extra logging in php, and found this in the logs today:
Code: [Select]
[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.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4383
    • Windsurf.me
Re: Problems with install
« Reply #7 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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 562
Re: Problems with install
« Reply #8 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.
Logged

pschmehl

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Re: Problems with install
« Reply #9 on: June 18, 2017, 10:06:49 PM »

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.

Code: [Select]
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)
Logged

pschmehl

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Re: Problems with install
« Reply #10 on: June 18, 2017, 10:18:39 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.
Logged

pschmehl

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Problems with install
« Reply #11 on: June 18, 2017, 10:21:07 PM »

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

Code: [Select]
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)
Logged

pschmehl

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Problems with install
« Reply #12 on: June 18, 2017, 11:35:01 PM »

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

pschmehl

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Problems with install
« Reply #13 on: June 19, 2017, 12:10:25 AM »

I just created a new db (coppermine_test) and a new directory and copied the files over. Set perms. Ran install.  Got this error:
Code: [Select]
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
Logged

pschmehl

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Problems with install
« Reply #14 on: June 19, 2017, 12:18:25 AM »

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

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 562
Re: Problems with install
« Reply #15 on: June 19, 2017, 01:23:20 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.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4383
    • Windsurf.me
Re: Problems with install
« Reply #16 on: June 19, 2017, 02:18:06 AM »

Good idea. I wonder if the same was true for this other users issue http://forum.coppermine-gallery.net/index.php/topic,79032.0.html
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.562 seconds with 21 queries.