Advanced search  

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]

Pages: [1]   Go Down

Author Topic: moving site from server a to server b  (Read 2864 times)

0 Members and 1 Guest are viewing this topic.

wildwalker

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
moving site from server a to server b
« on: August 16, 2023, 02:20:10 am »

Hello all,

moved my site from my old server to my new one, aaaand now my site is down.

Error msg is -
Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_runtime() in /usr/share/apache2/html/cpg15x/include/init.inc.php:64 Stack trace: #0 /usr/share/apache2/html/cpg15x/index.php(25): require() #1 {main} thrown in /usr/share/apache2/html/cpg15x/include/init.inc

Original Server
PHP 7.3.31-1~deb10u4 (cli) (built: Jun 19 2023 19:10:11) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.31, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.31-1~deb10u4, Copyright (c) 1999-2018, by Zend Technologies

Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib



New Server
PHP 8.1.2-1ubuntu2.13 (cli) (built: Jun 28 2023 14:01:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.13, Copyright (c), by Zend Technologies

root@dell-Vostro-3558:/usr/share/apache2/html/cpg15x/include# convert --version
Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5)
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib


so I cannot access my site due to the error:     Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_runtime() in /usr/share/apache2/html/cpg15x/include/init.inc.php:64 Stack trace: #0 /usr/share/apache2/html/cpg15x/index.php(25): require() #1 {main} thrown in /usr/share/apache2/html/cpg15x/include/init.inc

Any help much appreciated.


Logged

wildwalker

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: moving site from server a to server b
« Reply #1 on: August 16, 2023, 05:43:07 pm »

From what I have been reading, the functions "get_magic_quotes" and "set_magic_quotes" are no longer in PHP 8.x (if the many internet experts are anything to go by)

Can you please confirm that my Coppermine version 1.6.03 (stable) is compatible with PHP 8.1.2-1ubuntu2.13 (cli) (built: Jun 28 2023 14:01:49) (NTS)

I am using "Ubuntu 22.04.3 LTS" and apache2 Server version: Apache/2.4.52 (Ubuntu)
Server built:   2023-05-03T20:02:51

All the best.
Alan.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: moving site from server a to server b
« Reply #2 on: August 17, 2023, 01:55:16 pm »

CPG v1.6.03 does not support PHP 8.1.2
You will need to upgrade your site using the installer_stub (as you have already noticed).
Logged

wildwalker

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: moving site from server a to server b
« Reply #3 on: August 17, 2023, 05:33:50 pm »

CPG v1.6.03 does not support PHP 8.1.2
You will need to upgrade your site using the installer_stub (as you have already noticed).

Thank you ron4mac.

I resolved the zip error message by enabling ZipArchive for PHP. However, when I run the script, I get every line with this prefix:

FAILED TO PUT:

What could be cause of this?

I have tried several browsers and pcs. Is this a rights issue?

Best regards,
Alan Walker.


Logged

wildwalker

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: moving site from server a to server b
« Reply #4 on: August 17, 2023, 06:51:07 pm »

Thank you ron4mac.

I resolved the zip error message by enabling ZipArchive for PHP. However, when I run the script, I get every line with this prefix:

FAILED TO PUT:

What could be cause of this?

I have tried several browsers and pcs. Is this a rights issue?

Best regards,
Alan Walker.


I can answer this, basically 'yes'

I made an embarrasing schoolboy error today, I wanted to change the owner of some files (they were all root:root apart from a couple of subfolders.

Anyway, I accidentally made them all (files/folders/subfolders etc) www-data:www-data.

Well the script runs, but at the end it says 'complete' but when I click this button I get this error:

Fatal error: Uncaught Error: Call to undefined function mysqli_report() in /usr/share/apache2/html/cpg15x/include/database/mysqli/dbase.inc.php:32 Stack trace: #0 /usr/share/apache2/html/cpg15x/include/init.inc.php(169): CPG_Dbase->__construct() #1 /usr/share/apache2/html/cpg15x/update.php(23): include_once('...') #2 {main} thrown in /usr/share/apache2/html/cpg15x/include/database/mysqli/dbase.inc.php on line 32

Are there some files that need other permissions than www-data (I guess that is the default apache user)

Most of the files have 755 permissions.

I have looked at the Coppermine page about folder/file rights/permissions, but I dont see anywhere that lists what each one should be.


Best regards,
Alan Walker.
Logged

wildwalker

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: moving site from server a to server b
« Reply #5 on: August 17, 2023, 08:05:00 pm »

Okay, sorted it.

The permissions definitely stopped the cpg_installer_stub.php.v3.5.php script working. That is sorted now, the last part was due to me having php-mysql missing from my initial PHP install, doh!

So the updater ran and made for a really nice easy upgrade, thank you for that file, its really good.

All the best,
Alan.

Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.