Disclaimer : I'm a complete newbie to databases, sql language and other stuff. Please excuse the following novice speech.
When trying to install Piwigo on my server, i kept having an error 500 after submitting the first form.
After a while, i managed to find and read the error log at the root folder; it said something i don't remember (yeah not useful sorry), but which encouraged me to look further. Ok fine, i found it in my history : i think it was that the piwigo_sites table was not found.
So after another while, i checked my database and saw that 20 tables were created, and not a sign of piwigo_sites.
I don't know how i found that the tables were created by the piwigo_structure-mysql.sql file (brave search for piwigo_sites table helped), but i then found it had way more than 20 tables to create. So i managed to run its content directly in phpMyAdmin (that piece of software is scary to me but it seems to works well), and got a more informative error : the key for the sessions table was "too long, more than 1000 bytes".
I managed to discover and somehow understand that the varchar thing was 4 times in bytes. So i tried to replace 255 with 249 in the structure file (line 337) before retrying the install and behold, it worked. ( 🎉 )
I just thought i might mention it here in case something is off that is worth checking by those who know what this funny language is all about. Because i absolutely don't.
I'm glad i did not give up. The feeling of victory is great, amplified by my total noobiness is such affairs.
Can't wait to try Piwigo now (hoping the 249 thing won't break my install, haha).
Cheers !
PW
Hi there,
*Disclaimer : I'm a complete newbie to databases, sql language and other stuff. Please excuse the following novice speech.*
When trying to install Piwigo on my server, i kept having an error 500 after submitting the first form.
After a while, i managed to find and read the error log at the root folder; it said something i don't remember (yeah not useful sorry), but which encouraged me to look further. Ok fine, i found it in my history : i think it was that the piwigo_sites table was not found.
So after another while, i checked my database and saw that 20 tables were created, and not a sign of piwigo_sites.
I don't know how i found that the tables were created by the `piwigo_structure-mysql.sql` file (brave search for `piwigo_sites table` helped), but i then found it had way more than 20 tables to create. So i managed to run its content directly in phpMyAdmin (that piece of software is scary to me but it seems to works well), and got a more informative error : the key for the `sessions` table was "too long, more than 1000 bytes".
I managed to discover and somehow understand that the varchar thing was 4 times in bytes. So i tried to replace `255` with `249` in the structure file (line 337) before retrying the install and behold, it worked. ( :tada: )
I just thought i might mention it here in case something is off that is worth checking by those who know what this funny language is all about. Because i absolutely don't.
I'm glad i did not give up. The feeling of victory is great, amplified by my total noobiness is such affairs.
Can't wait to try Piwigo now (hoping the 249 thing won't break my install, haha).
Cheers !
PW
<!-- github-sync-id:2482144101 -->
Also, i may add that on my second-to-last try i forgot to delete the tables from my database (which had just been created from the within-database 249-modified piwigo_structure-mysql SQL command).
The install failed again with the error_log : PHP Fatal error: Uncaught mysqli_sql_exception: Table 'piwigo_activity' already exists.
I then deleted all tables, along with some files and folders in my directory (which i replaced with fresh ones ― i had done that quite a few times during my previous erratic wanderings), and relaunched the install with success.
I just thought it might be worth mentionning, in case handling existing tables could be done without a sad crash.
Bui guess there should never be existing tables, because no one would go through such a twisted process to make the install work. Anyway.
✌️
Also, i may add that on my second-to-last try i forgot to delete the tables from my database (which had just been created from the within-database 249-modified piwigo_structure-mysql SQL command).
The install failed again with the error_log : `PHP Fatal error: Uncaught mysqli_sql_exception: Table 'piwigo_activity' already exists`.
I then deleted all tables, along with some files and folders in my directory (which i replaced with fresh ones ― i had done that quite a few times during my previous erratic wanderings), and relaunched the install with success.
I just thought it might be worth mentionning, in case handling existing tables could be done without a sad crash.
Bui guess there should never be existing tables, because no one would go through such a twisted process to make the install work. Anyway.
:v:
<!-- github-comment-id:2306101986 -->
In your PhpMyAdmin, can you run SQL query : SHOW CREATE TABLE piwigo_sessions; ?
The piwigo_sessions.id column is varchar(255). If your MySQL says it is "more than 1000 bytes", I suspect each char may take 4 bytes, meaning your MySQL uses a 4-bytes charset.
In your PhpMyAdmin, can you run SQL query : `SHOW CREATE TABLE piwigo_sessions;` ?
The `piwigo_sessions.id` column is varchar(255). If your MySQL says it is "more than 1000 bytes", I suspect each char may take 4 bytes, meaning your MySQL uses a 4-bytes charset.
<!-- github-comment-id:2308421218 -->
Result : piwigo_sessions CREATE TABLE piwigo_sessions ( id varchar(24...
"your MySQL uses a 4-bytes charset"
From what i understand, yes that is the case, since modifying 255 to 249 did not trigger the error.
Should it not be ?
Ran :
`SHOW CREATE TABLE piwigo_sessions;`
Result :
`piwigo_sessions CREATE TABLE piwigo_sessions (
id varchar(24... `
"your MySQL uses a 4-bytes charset"
From what i understand, yes that is the case, since modifying 255 to 249 did not trigger the error.
Should it not be ?
<!-- github-comment-id:2308431931 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi there,
Disclaimer : I'm a complete newbie to databases, sql language and other stuff. Please excuse the following novice speech.
When trying to install Piwigo on my server, i kept having an error 500 after submitting the first form.
After a while, i managed to find and read the error log at the root folder; it said something i don't remember (yeah not useful sorry), but which encouraged me to look further. Ok fine, i found it in my history : i think it was that the piwigo_sites table was not found.
So after another while, i checked my database and saw that 20 tables were created, and not a sign of piwigo_sites.
I don't know how i found that the tables were created by the
piwigo_structure-mysql.sqlfile (brave search forpiwigo_sites tablehelped), but i then found it had way more than 20 tables to create. So i managed to run its content directly in phpMyAdmin (that piece of software is scary to me but it seems to works well), and got a more informative error : the key for thesessionstable was "too long, more than 1000 bytes".I managed to discover and somehow understand that the varchar thing was 4 times in bytes. So i tried to replace
255with249in the structure file (line 337) before retrying the install and behold, it worked. ( 🎉 )I just thought i might mention it here in case something is off that is worth checking by those who know what this funny language is all about. Because i absolutely don't.
I'm glad i did not give up. The feeling of victory is great, amplified by my total noobiness is such affairs.
Can't wait to try Piwigo now (hoping the 249 thing won't break my install, haha).
Cheers !
PW
Also, i may add that on my second-to-last try i forgot to delete the tables from my database (which had just been created from the within-database 249-modified piwigo_structure-mysql SQL command).
The install failed again with the error_log :
PHP Fatal error: Uncaught mysqli_sql_exception: Table 'piwigo_activity' already exists.I then deleted all tables, along with some files and folders in my directory (which i replaced with fresh ones ― i had done that quite a few times during my previous erratic wanderings), and relaunched the install with success.
I just thought it might be worth mentionning, in case handling existing tables could be done without a sad crash.
Bui guess there should never be existing tables, because no one would go through such a twisted process to make the install work. Anyway.
✌️
In your PhpMyAdmin, can you run SQL query :
SHOW CREATE TABLE piwigo_sessions;?The
piwigo_sessions.idcolumn is varchar(255). If your MySQL says it is "more than 1000 bytes", I suspect each char may take 4 bytes, meaning your MySQL uses a 4-bytes charset.Ran :
SHOW CREATE TABLE piwigo_sessions;Result :
piwigo_sessions CREATE TABLE piwigo_sessions ( id varchar(24..."your MySQL uses a 4-bytes charset"
From what i understand, yes that is the case, since modifying 255 to 249 did not trigger the error.
Should it not be ?
I'm going to reduce it to
varchar(50), that's already far enough