Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 2 [3]   Go Down

Author Topic: sudden problem with gallery loading  (Read 23627 times)

0 Members and 1 Guest are viewing this topic.

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #40 on: February 04, 2006, 11:56:20 pm »

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
Logged

Nibbler

  • Guest
Re: sudden problem with gallery loading
« Reply #41 on: February 05, 2006, 12:09:33 am »

What happened to your config table ?

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

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #42 on: February 05, 2006, 12:34:11 am »

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

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #43 on: February 05, 2006, 12:41:35 am »

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?
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #44 on: February 05, 2006, 12:47:34 am »

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.
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #45 on: February 05, 2006, 01:03:09 am »

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
 
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #46 on: February 05, 2006, 01:36:11 am »

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.
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #47 on: February 05, 2006, 03:03:35 pm »

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?
« Last Edit: February 05, 2006, 03:50:02 pm by kb1100 »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #48 on: February 05, 2006, 05:56:56 pm »

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.
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #49 on: February 05, 2006, 06:15:51 pm »

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

 
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #50 on: February 05, 2006, 09:55:43 pm »

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.
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #51 on: February 05, 2006, 10:31:15 pm »

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?
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #52 on: February 05, 2006, 10:49:26 pm »

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.
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #53 on: February 06, 2006, 12:01:07 am »

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

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: sudden problem with gallery loading
« Reply #54 on: February 06, 2006, 12:59:53 am »

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)
« Last Edit: February 06, 2006, 03:17:48 am by Paver »
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #55 on: February 07, 2006, 10:06:06 pm »

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.
Logged

kb1100

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: sudden problem with gallery loading
« Reply #56 on: February 15, 2006, 10:35:26 pm »

Was there any input on this, or any reason I have this problem? Is it fixable?
Logged
Pages: 1 2 [3]   Go Up
 

Page created in 0.07 seconds with 20 queries.