Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem after server migration #65

Open
FreeBeeEssDee opened this issue Oct 27, 2022 · 7 comments
Open

problem after server migration #65

FreeBeeEssDee opened this issue Oct 27, 2022 · 7 comments

Comments

@FreeBeeEssDee
Copy link

My coppermine was migrated from an old server with freebsd 12 and php 7.4 to a new machine with freebsd 13 stable and php 8.1. On the new server all other web applications (wordpress, nextcloud, postfixadmin, ...) are working smoothly. But coppermine throws the error:
Fatal error: Uncaught Error: mysqli object is already closed in /usr/local/www/coppermine/include/database/mysqli/dbase.inc.php:73 Stack trace: #0 /usr/local/www/coppermine/include/init.inc.php(172): CPG_Dbase->getError() #1 /usr/local/www/coppermine.3/index.php(22): require('...') #2 {main} thrown in /usr/local/www/coppermine/include/database/mysqli/dbase.inc.php on line 73

I tried the same coppermine from the old server, a freshly installed package from the ports and 1.6.20 and the development version from here. All with the same result. I successfully checked the database credentials by using the mariadb command-line tool.

@ron4mac
Copy link
Collaborator

ron4mac commented Oct 28, 2022

It is likely the value for the database server that is causing an issue for you. Try using just 'localhost' for the database server.

@FreeBeeEssDee
Copy link
Author

Thanks for the hint and my fault that I forgot to include my config.inc.php:
cat config.inc.php

%

@ron4mac
Copy link
Collaborator

ron4mac commented Oct 28, 2022

resolved?

@FreeBeeEssDee
Copy link
Author

No, I already used localhost and I have checked with "telnet localhost 3306" that the database can be reached.

@ron4mac
Copy link
Collaborator

ron4mac commented Oct 28, 2022

Run the php command 'phpinfo();' and look at the mysqli section to see that it is configured properly.
Or try 'localhost:3306' as the database server in config.inc.php

@ron4mac
Copy link
Collaborator

ron4mac commented Oct 28, 2022

In the file include/init.inc.php, on lines 172 and 173, change the 2 $CPGDB->getError() calls to $CPGDB->getError(false,true) to see if that gives you any better information.

@ron4mac
Copy link
Collaborator

ron4mac commented Oct 29, 2022

Has this issue been resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants