Advanced search  

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

Pages: [1]   Go Down

Author Topic: Moving from a server to another one ?  (Read 14312 times)

0 Members and 1 Guest are viewing this topic.

mika2k3

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
    • http://www.ecrantotal.org
Moving from a server to another one ?
« on: November 10, 2003, 12:11:30 pm »

Hello,

I want to move my Cpg1.2.0 from one server to another one...

- I've put on my hard disk the structure of my first server (files & folders)
- I've backup my database (file : "backup_db.sql")
- I've change "config_inc.php" to match new parameters
- I've uploaded my files & folders on 2nd server
- I want to run the "backup_db.sql" on new database via phpmyadmin

--> it gives me an error message for the table "pictures" :

Quote

CREATE TABLE ecrantot_pictures (
   pid int(11) NOT NULL auto_increment,
   aid int(11) DEFAULT '0' NOT NULL,
   filepath varchar(255) NOT NULL,
   filename varchar(255) NOT NULL,
   filesize int(11) DEFAULT '0' NOT NULL,
   total_filesize int(11) DEFAULT '0' NOT NULL,
   pwidth smallint(6) DEFAULT '0' NOT NULL,
   pheight smallint(6) DEFAULT '0' NOT NULL,
   hits int(10) DEFAULT '0' NOT NULL,
   mtime timestamp(14),
   ctime int(11) DEFAULT '0' NOT NULL,
   owner_id int(11) DEFAULT '0' NOT NULL,
   owner_name varchar(40) NOT NULL,
   pic_rating int(11) DEFAULT '0' NOT NULL,
   votes int(11) DEFAULT '0' NOT NULL,
   title varchar(255) NOT NULL,
   caption text NOT NULL,
   keywords varchar(255) NOT NULL,
   approved enum('YES','NO') DEFAULT 'NO' NOT NULL,
   user1 varchar(255) NOT NULL,
   user2 varchar(255) NOT NULL,
   user3 varchar(255) NOT NULL,
   user4 varchar(255) NOT NULL,
   url_prefix tinyint(4) DEFAULT '0' NOT NULL,
   randpos int(11) DEFAULT '0' NOT NULL,
   pic_raw_ip tinytext,
   pic_hdr_ip tinytext,
   PRIMARY KEY (pid),
   KEY pic_hits (hits),
   KEY pic_rate (pic_rating),
   KEY aid_approved (aid, approved),
   KEY randpos (randpos),
   KEY pic_aid (aid),
   KEY search (title, caption, keywords, filename)
)

MySQL a répondu:

BLOB column 'caption' used in key specification without a key length


I use Mysql 3.23.47
Can u help me please ?

Thanks,
Mika.
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Moving from a server to another one ?
« Reply #1 on: November 10, 2003, 01:29:42 pm »

Open schema.sql and replace

Code: [Select]
caption text NOT NULL,
with
Code: [Select]
caption varchar(500) NOT NULL,

That will fix it for the time being[/code]
Logged
SANIsoft PHP applications for E Biz

mika2k3

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
    • http://www.ecrantotal.org
Moving from a server to another one ?
« Reply #2 on: November 10, 2003, 02:31:34 pm »

If i use :
Code: [Select]
caption varchar(500) NOT NULL

i obtain this sql error :
Quote
Too big column length for column 'caption' (max = 255). Use BLOB instead


and if i use
Code: [Select]
caption varchar(255) NOT NULL

i obtain :
Quote
Specified key was too long. Max key length is 500


Can u help me !?
Logged

sede

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Moving from a server to another one ?
« Reply #3 on: March 03, 2004, 10:43:18 pm »

I have the same problem. Cannot restore the database.

Finally I was able to do it, when deleted the following line:
"KEY search (title, caption, keywords, filename) "
But I think it is not the best solution...

Please help!
Logged

nozzz

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Solution
« Reply #4 on: March 17, 2004, 05:09:19 am »

Hi all - maybe a bit late, but for anyone searching in the future here is the fix:

The last line of the create table SQL looks like this
KEY search (title,caption,keywords,filename)

sede mentiond it worked when he removed it, but the better option is to make the line look like this:

FULLTEXT KEY search (title,caption,keywords,filename)

I found the solution by looking in the install.php for coppermine.  The original install creates the table this way.

regards,
john
nozzz
Logged

mohamedimran

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 15
    • Celebrities Foto Collection
Re: Moving from a server to another one ?
« Reply #5 on: March 16, 2009, 07:53:05 pm »

thx frnd...

http://funnyimgs.co.cc - My site

me too got this prob... but now it solved....

thx again...
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Moving from a server to another one ?
« Reply #6 on: March 17, 2009, 03:58:30 am »

Locking.

Edit: I tried to locking the thread....  :-\  I can't lock this thread (as I thought), neither delete my post to let someone else see this and take action. Please some with the right permissions do what is needed.
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Moving from a server to another one ?
« Reply #7 on: March 17, 2009, 07:12:01 am »

@Fabricio: did as suggested. Thanks.

@all: locking.

@mohamedimran: in the future, don't post on boards that exist for reference only.
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.