Announcement


Notice: Undefined offset: 5 in /var/www/piwigo.org/forum/include/parser.php on line 551

#1 2023-04-08 05:00:00

AppleBag
Member
2023-04-08
1

Installation trouble

Hi all


having a helluva time just getting this installed.

First, I was getting a 500 error immediately after starting it. Read the nginx log and it said it was missing some tables in the db, so I discovered this page after a search:

[Github] Piwigo file install/piwigo_structure-mysql.sql

Ran it manually within PHPMyAdmin, and for the most part all tables installed, except for piwigo_sessions. For that one I get the error:

Code:

SQL query:


CREATE TABLE `piwigo_sessions` (
  `id` varchar(254) binary NOT NULL default '',
  `data` mediumtext NOT NULL,
  `expiration` datetime NOT NULL default '1970-01-01 00:00:00',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;
MySQL said: Documentation

#1071 - Specified key was too long; max key length is 1000 bytes

Anyone know what needs tweaking in that query to get it imported?

thanks

Offline

 

#2 2023-04-08 10:47:22

erAck
Only trying to help
2015-09-06
1998

Re: Installation trouble

Now that's odd for two reasons:
1. the original file has varchar(255) instead of your varchar(254)
2. it looks like the actual structure resulting tried to create an index on `id` with utf8mb4 instead of binary, hence 254*4 > 1000.

You also didn't say what MySQL you have, 5.6 or 8.0 or MariaDB 10.x.

If the initial installation lacked some tables you may have problems in limited execution time or memory. Check the sever logs of the installation.

Also, I'm not sure that running the SQL in phpMyAdmin is actually a good idea. I'd try mysqldump from the command line instead.

However, if that's not available to you, try to use an explicit statement like this:

Code:

DROP TABLE IF EXISTS `piwigo_sessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `piwigo_sessions` (
  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `data` mediumtext NOT NULL,
  `expiration` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact