Blank Page after moving host Blank Page after moving host
 

News:

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

Main Menu

Blank Page after moving host

Started by mbarrows, March 24, 2017, 06:25:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mbarrows

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

phill104

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

mbarrows

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

mbarrows

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

phill104

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

mbarrows

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 ?

phill104

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

mbarrows

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 ?

phill104

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

ron4mac

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:

define('RESTRICTED_PRIV', true);

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

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

mbarrows

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

ron4mac

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

ron4mac

#12
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:
[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"

mbarrows

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

ron4mac

Quote from: mbarrows on March 31, 2017, 03:19:35 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).