sudden problem with gallery loading - Page 3 sudden problem with gallery loading - Page 3
 

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

sudden problem with gallery loading

Started by kb1100, January 29, 2006, 03:10:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kb1100

I tried to run that query and got the following:
Error
SQL-query:

UPDATE cpg140_config SET value =1 WHERE name = 'debug_mode'
MySQL said: 

#1146 - Table 'kyle1.cpg140_config' doesn't exist

Nibbler

What happened to your config table ?

I suggest you restore your dump and try the update again.

Paver

Or maybe your database name is set incorrectly?  Is your database named 'kyle1'?

kb1100

Yes, the datebase name is kyle1 which cant be changed, its my hosts user name and then the datebase number.

So Nibbler are you saying to just run the datebase file i saved and then do another update? Or do I have to do anything else?

Paver

Yes. To restore a dump, you go to SQL in phpMyAdmin, then run the text file with the dump.  (The dump is a list of SQL commands that will restore your database.)  This will create the config table which is apparently missing.  Then Coppermine's update.php should be able to update your 1.4.0 gallery to 1.4.3.

kb1100

This is what I get when I try to run that file:
Error
SQL-query:

-- phpMyAdmin SQL Dump
-- version 2.6.1
-- http://www.phpmyadmin.net
--
-- Host: mysql6.servage.net
-- Generation Time: Jan 30, 2006 at 11:26 PM
-- Server version: 5.0.15
-- PHP Version: 4.3.3
--
-- Database: `kyle1`
--
-- --------------------------------------------------------
--
-- Table structure for table `cpg140_albums`
--
CREATE TABLE `cpg140_albums` (

`aid` int( 11 ) NOT NULL AUTO_INCREMENT ,
`title` varchar( 255 ) NOT NULL default '',
`description` text NOT NULL ,
`visibility` int( 11 ) NOT NULL default '0',
`uploads` enum( 'YES', 'NO' ) NOT NULL default 'NO',
`comments` enum( 'YES', 'NO' ) NOT NULL default 'YES',
`votes` enum( 'YES', 'NO' ) NOT NULL default 'YES',
`pos` int( 11 ) NOT NULL default '0',
`category` int( 11 ) NOT NULL default '0',
`thumb` int( 11 ) NOT NULL default '0',
`keyword` varchar( 50 ) default NULL ,
`alb_password` varchar( 32 ) default NULL ,
`alb_password_hint` text,
PRIMARY KEY ( `aid` ) ,
KEY `alb_category` ( `category` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =481
MySQL said: 

#1046 - No database selected


Paver

That means you clicked on SQL from outside a database.  You need to click on a database first, then click on the SQL tab so that all SQL commands will be executed on the current database.

When you export a database, you can choose to have it include the database name so all the tables have "absolute" references, but most people use the relative references since in many cases, you do not or cannot create the database.

kb1100

#47
Ok this is what I got back after I tried running that file:
MySQL said: 

#1050 - Table 'cpg140_albums' already exists

Should I delete these and try again?

Paver

Does the import quit after this error message or does it give the error message and continue running?  If the latter, you're all set.  If the former, yeah, you need to delete the current tables and then restore from the dump.  As Nibbler asked earlier, I'm not sure what happened to your config table originally.  Something's weird with your sudden problem.

When you export your database, you can obviate the need for doing the manual delete before restore by checking the box "Add DROP TABLE" or you can check "Add IF NOT EXISTS" in the current releases of phpMyAdmin and then no delete tables is necessary - tables will only be added in the restore if the table doesn't already exist.

kb1100

I jsut keep getting error after error. I droped the contents of the datebase and ran the file and recieved the following:
Error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 59
STR: />
SQL: --
-- Dumping data for table `cpg140_hit_stats`
--

<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/servage_net/secure/admin/phpMyAdmin-2.6.1/export.php:120) in <b>/home/servage_net/secure/admin/phpMyAdmin-2.6.1/libraries/header_http.inc.php</b> on line <b>14</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/servage_net/secure/admin/phpMyAdmin-2.6.1/export.php:120) in <b>/home/servage_net/secure/admin/phpMyAdmin-2.6.1/libraries/header_http.inc.php</b> on line <b>15</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/servage_net/secure/admin/phpMyAdmin-2.6.1/export.php:120) in <b>/home/servage_net/secure/admin/phpMyAdmin-2.6.1/libraries/header_http.inc.php</b> on line <b>16</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/servage_net/secure/admin/phpMyAdmin-2.6.1/export.php:120) in <b>/home/servage_net/secure/admin/phpMyAdmin-2.6.1/libraries/header_http.inc.php</b> on line <b>17</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/servage_net/secure/admin/phpMyAdmin-2.6.1/export.php:120) in <b>/home/servage_net/secure/admin/phpMyAdmin-2.6.1/libraries/header_http.inc.php</b> on line <b>20</b><br />
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">

<head>
<title>phpMyAdmin</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="https://secure.servage.net/admin/phpMyAdmin-2.6.1/" />
<script language="JavaScript" type="text/javascript">
<!--
    /* added 2004-06-10 by Michael Keck
     *       we need this for Backwards-Compatibility and resolving problems
     *       with non DOM browsers, which may have problems with css 2 (like NC 4)
    */
    var isDOM      = (typeof(document.getElementsByTagName) != 'undefined'
                      && typeof(document.createElement) != 'undefined')
                   ? 1 : 0

SQL-query:

-- -- Dumping data for table `cpg140_hit_stats` --
Warning: Cannot modify header information - headers already sent by (output started at /home/servage_net/secure/admin/phpMyAdmin-2.6.1/export.php:120) in /home/servage_net/secure/admin/phpMyAdmin-2.6.1/libraries/header_http.inc.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /home/servage_net/secure/admin/phpMyAdmin-2.6.1/export.php:120) in /home/servage_net/secure/admin/phpMyAdmin-2.6.1/libraries/header_http.inc.php on line 15

Warning: Cannot modify header information - headers already sent by (output started at /home/servage_net/secure/admin/phpMyAdmin-2.6.1/export.php:120) in /home/servage_net/secure/admin/phpMyAdmin-2.6.1/libraries/header_http.inc.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at /home/servage_net/secure/admin/phpMyAdmin-2.6.1/export.php:120) in /home/servage_net/secure/admin/phpMyAdmin-2.6.1/libraries/header_http.inc.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /home/servage_net/secure/admin/phpMyAdmin-2.6.1/export.php:120) in /home/servage_net/secure/admin/phpMyAdmin-2.6.1/libraries/header_http.inc.php on line 20



Paver

Unknown Punctuation String?  Wow, that's strange.  If phpMyAdmin created that file, it should be able to add it back in again.  This looks to me like a phpMyAdmin mistake.  Your phpMyAdmin version is a little old, so there's a chance that that version had a bug but I would guess that that chance would be slim.  But I don't know what else could cause that.

I would look in the dump file, searching for "cpg140_hit_stats", then look to see if any of the data you have in there has any quotes (single or double) that are not escaped.  (Escaping a quote means to put a backslash in front of it, like this: \" or \'.)

But the next errors about "headers already sent" is strange as well.  I don't know if that is a follow-on error caused by the first one (and so nothing to worry about once you fix the first one), or if it is more a cause of the errors as a whole.

If your site is not a porn site, I'd be willing to take a look at the database and the database dump and the site to see if I can see directly what's wrong.  You can PM me the information.  If you like your current password, change it first to something else (on the database and in your Coppermine/include/config.inc.php).  We'll still discuss things here publicly, but then I'd have first-hand information on what's going on.

If your site is a porn site (or something else that might be offensive to sensitive eyes), I'm loathe to spend the extra effort, but I am willing to continue helping here.

kb1100

I do see some quotes that do not have a backslash. Are these what is causing this problem now? Is there something wrong or any reason that I keep having all of these problems?

Paver

Well, I should be more specific about escaping the quotes.  SQL commands use quotes around table names and around field names and around values to put in the table.  The problem is when there is a rogue quote inside one of these pieces of text that is not escaped.  So if you have a value that is 'Tom's Boat', you see that the apostrophe will close out the first single quote, and then the rest is not part of the string anymore.  It should be 'Tom\'s Boat' to properly add the value to the database.

kb1100

So should I add back slashes in? I can show you the portion of the datebase you are reffering to if that would help.

Paver

#54
If there are values that have quotes and are not escaped, then yes, add the backslashes to escape those quotes.  Make sure not to escape quotes used around values like in my example: 'Tom\'s Boat' - the beginning and ending quotes are not escaped.

Sure, you can paste some of the database here.  (an attachment might be better than inline)

kb1100

Ok, I went through the part of the datebase that you mentioned, and it looks ok as far as I can see based on the instructions you gave. I have atached this part.

kb1100

Was there any input on this, or any reason I have this problem? Is it fixable?