Advanced search  

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

Pages: [1]   Go Down

Author Topic: Moving CPG from gallery.myweb to myweb.gallery fails  (Read 8566 times)

0 Members and 1 Guest are viewing this topic.

astecme

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Moving CPG from gallery.myweb to myweb.gallery fails
« on: January 29, 2018, 07:09:50 pm »

Hi there,

I want to move my gallery from a sub domain gallery.myweb/  to its base folder myweb/gallery/ This does not involve any move of data just a change in access. I have changed the URL to reflect the "move" but get a failure as follows

"Fatal error: Uncaught Error: Call to undefined function mysql_connect() in myweb/gallery/include/functions.inc.php:183 Stack trace: #0 myweb/gallery/include/init.inc.php(171): cpg_db_connect() #1 myweb/gallery/index.php(26): require('/homepages/45/d...') #2 {main} thrown in myweb/gallery/include/functions.inc.php on line 183"

I could do with some help/advice please.

Thanks

Allan

Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #1 on: January 29, 2018, 07:42:09 pm »

That is a sure sign that your main domain is running PHP version 7+. CPG 1.5.x is not compatible with PHP 7+. Not sure how it was running in the sub-domain but there may be a .htaccess file there that causes an older version of PHP to be used. You should use whatever method was used to set the PHP version in the new location, or upgrade CPG to version 1.6.x.
Logged

astecme

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #2 on: January 29, 2018, 08:34:19 pm »

Many thanks . I will check. However the physical location is the same. The target of forum.myweb is myweb/forum/  same location different method of access..
Logged

astecme

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #3 on: January 29, 2018, 09:35:51 pm »

Hi there again, You are quite correct. The PHP version is set as part of the subdomain. I used a 1and 1 automatic install into the subdomain but they have no upgrade path yet.

I tried setting php version in the .htaccess file - disaster! so backed out.

Thanks again
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #4 on: January 29, 2018, 09:36:16 pm »

create a phpinfo file, open a plain text file, add the following lines, and save:
Filename: phpinfo.php


<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

Upload it to your server in each directory you want to check, in your case both the old and new locations where Coppermine resides. Browse to it and you will see what version of PHP is called in each of the locations.


******* Edit - seems you posted your reply while I was typing.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #5 on: January 29, 2018, 11:28:44 pm »

I used a 1and 1 automatic install into the subdomain but they have no upgrade path yet.
You would do well to avoid, whenever possible, hosting site auto-installers. There are many times that they don't do the job correctly.
Logged

astecme

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #6 on: January 30, 2018, 08:13:46 pm »

Agreed...

So _ uploaded the latest version of 1.5.46 files and ran upgrade.php. All finished fine. gallery works from its subdomain but does not work if I address it through the site - i.e. no change.

The error I get now through direct - i.e. myweb/gallery/ is

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in myweb/gallery/include/functions.inc.php:183 Stack trace: #0 myweb/gallery/include/init.inc.php(171): cpg_db_connect() #1 myweb/gallery/index.php(26): require('/homepages/45/d...') #2 {main} thrown in /homepages/45/d710415996/htdocs/gallery/include/functions.inc.php on line 183
Logged

astecme

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #7 on: January 30, 2018, 08:18:48 pm »

this is here

function cpg_db_connect()
{
    global $CONFIG;

    $result = @mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']);

    if (!$result) {
        return false;
    }
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #8 on: January 30, 2018, 08:19:47 pm »

Then if you have no custom modifications and your theme and plugins are 1.6 compatible, upgrade to 1.6.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #9 on: January 30, 2018, 10:32:12 pm »

As I had said, CPG 1.5.x is not compatible with PHP 7.  So, although probably good that you did it, your upgrade to 1.5.46 was not going solve the sub/domain issue with PHP 7.

If 1and1 has actually made the cPanel control panel available to you, there may be a section of the panel where you can adjust the PHP configuration. Some cPanels let you adjust it by directory. Failing to get resolution from 1and1, you should probably try upgrading to CPG 1.6.x. It's a pretty simple procedure (see the link I supplied above). If you have a theme or plugins that fail with CPG1.6, we can help to correct the issues.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #10 on: January 30, 2018, 11:06:15 pm »

I have just reviewed the 1&1 documentation on this and it seems it can be set on a domain basis. In the case of sub-domains, that is considered by the control panel as a separate domain. So using that method should be suitable. Be aware that PHP 5.6 goes end of life on 31st December 2018 so this is probably a good opportunity to upgrade.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Bielsa

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 1
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #11 on: April 04, 2018, 11:20:31 am »

Thanks for the heads up, Phill. What do you suggest people upgrade to btw? I'm just curious to hear your opinion.
Logged
People think highly of these weight loss pills for women because they're effective.

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Moving CPG from gallery.myweb to myweb.gallery fails
« Reply #12 on: April 05, 2018, 11:32:45 am »

CPG 1.6 is very stable and working well. If your plugins are ready and your theme is too then that would be a great way to go. We are lacking in a bit of documentation which is why it is not fully released yet, but that is about it.
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.036 seconds with 20 queries.