Fatal error after upgrading 1.4 to 1.5 Fatal error after upgrading 1.4 to 1.5
 

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

Main Menu

Fatal error after upgrading 1.4 to 1.5

Started by Alans, March 07, 2012, 12:53:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alans

Hello everybody,

I hope somebody can help me out with my gallery.

My gallery worked fine under 1.4. After my PHP was updated the gallery showed some errors:

Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/siamweb/public_html/fotoboek/include/debugger.inc.php on line 134

So I decided to update my coppermine gallery in the hope to get rit of that error.

I downloaded the latest 1.5 coppermine version and overwrite all the files except the map Albums and the file anycontent.php .

I run the update.php and that looked fine, no errors.

When i try to reach my gallery I got a Fatal Error.

I activated the debug mode and I got the same error:

While executing query 'SELECT MAX(group_quota) AS disk_max, MIN(group_quota) AS disk_min, MAX(can_rate_pictures) AS can_rate_pictures, MAX(can_send_ecards) AS can_send_ecards, MAX(can_post_comments) AS can_post_comments, MAX(can_upload_pictures) AS can_upload_pictures, MAX(can_create_albums) AS can_create_albums, MAX(has_admin_access) AS has_admin_access, MAX(access_level) AS access_level, MIN(pub_upl_need_approval) AS pub_upl_need_approval, MIN( priv_upl_need_approval) AS  priv_upl_need_approval FROM cpg14x_usergroups WHERE group_id in (3)' in bridge/udb_base.inc.php on line 323

mySQL error: Unknown column 'access_level' in 'field list'


Then I made a complete new directory with the new 1.5 gallery files.
I put my old config.inc.php in the include map.
then i run the update.php and get all results "already done"

When I go to my index.php from I get this error:


While executing query 'SELECT MAX(group_quota) AS disk_max, MIN(group_quota) AS disk_min, MAX(can_rate_pictures) AS can_rate_pictures, MAX(can_send_ecards) AS can_send_ecards, MAX(can_post_comments) AS can_post_comments, MAX(can_upload_pictures) AS can_upload_pictures, MAX(can_create_albums) AS can_create_albums, MAX(has_admin_access) AS has_admin_access, MAX(access_level) AS access_level, MIN(pub_upl_need_approval) AS pub_upl_need_approval, MIN( priv_upl_need_approval) AS  priv_upl_need_approval FROM cpg14x_usergroups WHERE group_id in (3)' in bridge/udb_base.inc.php on line 323

mySQL error: Unknown column 'access_level' in 'field list'



When i look at my MySql tables i see that the filenames from the tables are still beginning with 1.4 and not 1.5

I hope somebody can help me save my gallery.

Αndré

Quote from: Alans on March 07, 2012, 12:53:04 PM
When i look at my MySql tables i see that the filenames from the tables are still beginning with 1.4 and not 1.5
The upgrade process won't change your database name nor the table prefix, so that's normal.


Quote from: Alans on March 07, 2012, 12:53:04 PM
i run the update.php and get all results "already done"
Obviously the database hasn't been upgraded (completely), as update.php executes the following line (among others):
ALTER TABLE CPG_usergroups ADD access_level tinyint(4) NOT NULL default '3';


Please run again update.php, maybe it works this time. If not, try to execute all lines from sql/update.sql manually with a tool like PHPMyAdmin. Don't forget to replace
QuoteCPG_
with your actual table prefix.


Side note: there are already some threads dealing with exactly that issue.

Αndré

I just had a look at the update process and found that hidden option. Please run update.php with the parameter debug:
Quoteupdate.php?debug

This will show you additional information below each command. What exactly is printed below
QuoteALTER TABLE CPG_usergroups ADD access_level tinyint(4) NOT NULL default '3';
?

E.g. for me it's
QuoteALTER TABLE cpg15x_usergroups ADD access_level tinyint(4) NOT NULL default '3'
Debug output:
Rows Affected: 0. MySQL said: Error (1060) Duplicate column name 'access_level'

Alans

Thanks for your reply.
I hope I'm advanced enough to do that mysql manually, i will give it a try

This is a little log the output, it's not allowed to place more then 25000 characters:

CREATE TABLE IF NOT EXISTS `cpg14x_categorymap` ( cid int(11) NOT NULL, group_id int(11) NOT NULL, PRIMARY KEY (cid,group_id) ) COMMENT='Holds the categories where groups can create albums'
--------------------------------------------------------------------------------
Debug output:
Rows Affected: 0. MySQL said: Note (1050) Table 'cpg14x_categorymap' already exists
Already Done
CREATE TABLE cpg14x_temp_messages ( message_id varchar(80) NOT NULL default '', user_id int(11) default '0', time int(11) default NULL, message text NOT NULL, PRIMARY KEY (message_id) ) COMMENT='Used to store messages from one page to the other'
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1050) Table 'cpg14x_temp_messages' already exists
Already Done
ALTER TABLE cpg14x_filetypes DROP INDEX `EXTENSION`, ADD PRIMARY KEY ( `extension` )
--------------------------------------------------------------------------------
Debug output:
Rows Affected: 0. MySQL said: Error (1142) ALTER command denied to user 'coppermine'@'localhost' for table 'cpg14x_filetypes'
Already Done
ALTER TABLE cpg14x_filetypes ADD `player` VARCHAR( 5 )
--------------------------------------------------------------------------------
Debug output:
Rows Affected: 0. MySQL said: Error (1142) ALTER command denied to user 'coppermine'@'localhost' for table 'cpg14x_filetypes'
Already Done
ALTER TABLE cpg14x_filetypes CHANGE `mime` `mime` CHAR(254) default NULL
--------------------------------------------------------------------------------
Debug output:
Rows Affected: 0. MySQL said: Error (1142) ALTER command denied to user 'coppermine'@'localhost' for table 'cpg14x_filetypes'
Already Done
INSERT INTO cpg14x_filetypes VALUES ('001', 'application/001', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry '001' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('7z', 'application/7z', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry '7z' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('arj', 'application/arj', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry 'arj' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('bz2', 'application/bz2', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry 'bz2' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('cab', 'application/cab', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry 'cab' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('lzh', 'application/lzh', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry 'lzh' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('rpm', 'application/rpm', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry 'rpm' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('tar', 'application/tar', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry 'tar' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('z', 'application/z', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry 'z' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('odb', 'application/vnd.oasis.opendocument.database', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'odb' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('odt', 'application/vnd.oasis.opendocument.text', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'odt' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('ods', 'application/vnd.oasis.opendocument.spreadsheet', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'ods' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('odp', 'application/vnd.oasis.opendocument.presentation', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'odp' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('odg', 'application/vnd.oasis.opendocument.graphics', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'odg' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('odc', 'application/vnd.oasis.opendocument.chart', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'odc' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('odf', 'application/vnd.oasis.opendocument.formula', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'odf' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('odi', 'application/vnd.oasis.opendocument.image', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'odi' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('odm', 'application/vnd.oasis.opendocument.text-master', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'odm' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('ott', 'application/vnd.oasis.opendocument.text-template', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'ott' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('ots', 'application/vnd.oasis.opendocument.spreadsheet-template', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'ots' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('otp', 'application/vnd.oasis.opendocument.presentation-template', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'otp' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('otg', 'application/vnd.oasis.opendocument.graphics-template', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'otg' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('otc', 'application/vnd.oasis.opendocument.chart-template', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'otc' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('otf', 'application/vnd.oasis.opendocument.formula-template', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'otf' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('oti', 'application/vnd.oasis.opendocument.image-template', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'oti' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('oth', 'application/vnd.oasis.opendocument.text-web', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'oth' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('sxw', 'application/vnd.sun.xml.writer', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry 'sxw' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('stw', 'application/vnd.sun.xml.writer.template', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'stw' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('sxc', 'application/vnd.sun.xml.calc', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry 'sxc' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('stc', 'application/vnd.sun.xml.calc.template', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'stc' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('sxd', 'application/vnd.sun.xml.draw', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Error (1062) Duplicate entry 'sxd' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('std', 'application/vnd.sun.xml.draw.template', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'std' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('sxi', 'application/vnd.sun.xml.impress', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'sxi' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('sti', 'application/vnd.sun.xml.impress.template', 'document', '')
--------------------------------------------------------------------------------
Debug output:
MySQL said: Warning (1265) Data truncated for column 'mime' at row 1
MySQL said: Error (1062) Duplicate entry 'sti' for key 1
Already Done
INSERT INTO cpg14x_filetypes VALUES ('sxg', 'application/vnd.sun.xml.writer.global', 'document', '')
--------------------------------------------------------------------------------

Alans

I looked at the files in directory sql  but it's far to complicated for me to do it manualy.
I hope you can get me an more easy fix.

Thanks for your time anyway

Αndré

Unfortunately you haven't posted the most important line (that one with 'access_level'), but I assume it will tell you the same like some other lines:
QuoteALTER command denied to user 'coppermine'@'localhost' for table 'cpg14x_filetypes'

Ask your hosting provider to grant the ALTER privilege to that user.

Alans

It's my own server and so far i know it has full privileges

Debug output:
MySQL said: Error (1062) Duplicate entry 'allow_user_upload_choice' for key 1
Already Done
ALTER TABLE cpg14x_usergroups ADD access_level tinyint(4) NOT NULL default '3'
--------------------------------------------------------------------------------
Debug output:
Rows Affected: 0. MySQL said: Error (1142) ALTER command denied to user 'coppermine'@'localhost' for table 'cpg14x_usergroups'
Already Done
ALTER TABLE cpg14x_usergroups ALTER access_level SET DEFAULT '3'

Alans

YES!!!!

You are GREAT!!!

It was indeed the privelegesfrom the database.
I changed it to full (all) and now it's working again

thank you very very much

Alan

Alans

I smiled too soon.

The gallery is back but when I click an image i get:

Fatal error: Call to undefined function ctype_alpha() in /usr/home/siamweb/public_html/fotoboek/include/inspekt.php on line 484


Αndré

Quote from: Alans on March 07, 2012, 02:45:05 PM
Fatal error: Call to undefined function ctype_alpha() in /usr/home/siamweb/public_html/fotoboek/include/inspekt.php on line 484

ctype_alpha is a PHP function which exists since PHP 4.0.4: http://www.php.net/manual/en/function.ctype-alpha.php

Check if it's disabled or if you're running such an old PHP version. This issue isn't related to the upgrade process itself, so please mark this thread as solved as described in the board rules and start a new topic if you need further support regarding the other issue.

Alans

Ok, I will try to get that  function ctype_alpha activate in PHP.
if i get stucked again i open a new topic.

btw i run PHP Version 5.3.10