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: Blank Page after moving host  (Read 1039 times)

0 Members and 1 Guest are viewing this topic.

mbarrows

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Blank Page after moving host
« on: March 24, 2017, 07:25:34 PM »

Hi
So I moved host recently
  - copied all files across
  - exported and re-imported the DB
  - changed file permissions
  - amended to config file - to point at new DB

When I try to access I get a totally blank page.
I tried a phpinfo - with  <?php phpinfo(); ?>  - that works

However trying any of the coppermine supplied .php files all show a blank page - even phpinfo.php

URL - http://www.barrows-web/photoalbum/index.php
Note I added a index.html to the photoalbum directory for now

Any pointers would be gratefully received as I've run out of ideas
Thanks
Malcolm
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4369
    • Windsurf.me
Re: Blank Page after moving host
« Reply #1 on: March 25, 2017, 09:54:55 PM »

As the pages are blank your server settings are masking an error. To work out what the error is you need to check the servers logs. All hosts set these up differently so you may need to as them for advice. As even PHP info and update.php are not running I can only guess that either there is some file corruption during upload, or more likely the file ownership is incorrect.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

mbarrows

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Blank Page after moving host
« Reply #2 on: March 29, 2017, 03:37:15 PM »

Thanks for the reply. I'll contact the hosts re errors

permissions on all files are 755 - specifically

Mode    User    Group  World
Read        x   x       x
Write    x   -   -
Execute    x   x   x

Any thoughts
Logged

mbarrows

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Blank Page after moving host
« Reply #3 on: March 29, 2017, 04:16:43 PM »

as an experiment I changes to 777 - no change
So I don't think it's permissions?
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4369
    • Windsurf.me
Re: Blank Page after moving host
« Reply #4 on: March 29, 2017, 04:52:23 PM »

In that case your logs are the only way we can determine what the errors are. There are options with most hosts that allows the display of errors. Your current settings hide the error and just display a blank screen instead. This could still be a permission/ownership problem, suhosin had some really strange effects sometimes.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

mbarrows

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Blank Page after moving host
« Reply #5 on: March 29, 2017, 06:48:50 PM »

Hi

Got hold of the logs. Copy of the last few lines attached.
I looks like get photoalbum has worked - but nothing is being displayed ?
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4369
    • Windsurf.me
Re: Blank Page after moving host
« Reply #6 on: March 29, 2017, 08:42:10 PM »

Those lines are just showing your site was crawled. You need to create the error then look at the logs for the exact time the error occurred.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

mbarrows

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Blank Page after moving host
« Reply #7 on: March 30, 2017, 12:01:26 PM »

So that's what happened - the last two lines are from when I browsed to the site after reviewing the logs - that is all that was entered in the log file

Should some error logging be turned on to give a more granular reporting, maybe in php.ini

The host is escalating the issue for me but I do wonder if it would be worth reinstalling the whole thing again, latest version, new DB whole thing
and then trying to point at the old DB. If I created a new directory with a different name I assume they would live side by side ?
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4369
    • Windsurf.me
Re: Blank Page after moving host
« Reply #8 on: March 30, 2017, 06:37:16 PM »

Your host may have logs setup for errors elsewhere. There are often PHP logs, access logs, apache logs etc. You could turn on the display of errors if your host allows but they are the best people to ask how to do this.

I still feel this is an ownership problem, or all your uploaded files are faulty in some way as even standalone files that should be on your install are failing to run. I am talking about files that should do something and do not even access your DB.
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: 541
Re: Blank Page after moving host
« Reply #9 on: March 30, 2017, 07:21:12 PM »

This does work as expected:
http://www.barrows-web.co.uk/photoalbum/install.php

I suspect database problems.

To temporarily show errors, insert these 2 lines at around line 25 in the index.php file at the root of your CPG (1.5.40) install:

Code: [Select]
define('RESTRICTED_PRIV', true);

error_reporting(-1); // <-- this
ini_set('display_errors', '1'); // <-- and this

require('include/init.inc.php');
Logged

mbarrows

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Blank Page after moving host
« Reply #10 on: March 31, 2017, 01:08:46 PM »

thanks for you comments guys.

I have been playing with PHP.ini - I was trying to turn on error checking, kinda like you are suggesting.

I removed, via trial and error, the ; (comment) on the last line, and guess what - it works. No idea why. I can't see why error reporting should make this work, but commenting in/out makes it work/break consistently.

If any PHP guru;s know why I would love to know

; error_reporting
;  Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;  Development Value: E_ALL
   Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 541
Re: Blank Page after moving host
« Reply #11 on: March 31, 2017, 02:51:54 PM »

The semi-colon that you are removing is just in the 'Quick Reference' section of your php.ini file.  And it becomes an invalid directive, causing the rest of the file to not be processed (I think). I suspect you will see the same result if you just change the name of your php.ini file to no-php.ini, leaving php to initialise according to the system default.

Still curious as to why things were failing ...
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 541
Re: Blank Page after moving host
« Reply #12 on: March 31, 2017, 03:05:53 PM »

I was able to look at your php.ini file (web accessible). Your php version is 5.6 and the file tries invoking libraries for 5.4. This was likely the source of problems. Your semi-colon removal causes those incompatible directives to not be processed. That php.ini file was probably from your previous host. I recommend just removing it.

Your php setup allows using .user.ini files in any directory where you need to adjust php slightly.

You can only upload 2M file size. An example .user.ini file that you may want to create in your CPG folder would be:
Code: [Select]
[php]
upload_max_filesize = 20M
post_max_size = 20M

max_execution_time = 300
memory_limit = 256M

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = false
log_errors = true
error_log = "php_error.log"
« Last Edit: March 31, 2017, 03:22:11 PM by ron4mac »
Logged

mbarrows

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Blank Page after moving host
« Reply #13 on: March 31, 2017, 03:19:35 PM »

thanks for that - I'll try removing

I had another look at the file - can I ask what it is that makes you say it was for v 5.4

also
re>- Your php setup allows using .user.ini files in any directory where you need to adjust php slightly
Can I ask where this is "allowed"
and
Do I need to create/amend a user.ini file - I assume not ?

thanks
Malcolm
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 541
Re: Blank Page after moving host
« Reply #14 on: March 31, 2017, 03:24:59 PM »

Can I ask where this is "allowed"
and
Do I need to create/amend a user.ini file - I assume not ?
You can place it in any directory ... and it must be .user.ini (full stop at beginning).
Logged
Pages: [1]   Go Up
 

Page created in 0.078 seconds with 20 queries.