coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Freeco on January 20, 2007, 02:49:18 PM

Title: move webserver -> update MySQL dbHostName
Post by: Freeco on January 20, 2007, 02:49:18 PM
In december my host moved my site from a slower server to his main webserver. I simply had to update the hostname in my ASP files, phpBB and my MySQL client.

I guess since the move I have some problems with CPG... When someone wants to create/order an album, following error appears:
QuoteCritical error
There was an error while processing a database query.
While executing query "INSERT INTO cpg148_albums (category, title, uploads, pos) VALUES ('10009', 'test album', 'NO',  '1')" on 0
mySQL error: Field 'description' doesn't have a default value
First I thought the folder rights weren't moved correctly. I notified my host, as I can't change folder rights myself, and he corrected them. It didn't solve the problem though. The same error appears when trying again.
When I tried executing the query "INSERT INTO cpg148_albums (category, title, uploads, pos) VALUES ('10009', 'test album', 'NO',  '1')" from a MySQL client there's no problem at all...  ???
Am I correct to think that I also have to update the hostname in CPG? I found file config.php that has "$dbhost = 'old hostname'", which I changed to the new name and uploaded it. No change though... :-\

What am I missing here? Is there some other file I have to update? Or would an update from 1.4.8 to 1.4.10 do the trick?
Title: Re: move webserver -> update MySQL dbHostName
Post by: Nibbler on January 20, 2007, 02:51:26 PM
It's because MySQL is setup differently on your new server (strict mode is enabled). I think this was corrected in 1.4.10, but not 100% sure. Updating is mandatory anyway.
Title: Re: move webserver -> update MySQL dbHostName
Post by: Freeco on January 20, 2007, 10:37:11 PM
solved after updating the hostname in config.inc.php and upgrading to 1.4.10
tnx!