Installation error

219
Defect
Binär Arkiv
Jack
2.3.2
2.2
Install/Upgrade
Closed
Normal
Normal
7 years ago
5 years ago
0

Description

I get this error on installation: SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO" on version 2.3

Ticket History

7 years ago by Jack

  • Changed Priority from High to Normal
  • Changed Severity from Major to Normal

What is the exact error you get and what MySQL version are you using?

7 years ago by Binär Arkiv

I use MySQL 5.0.18 What I've done: 1. uploaded the traq-files 2. created an empty database 3. ran the install script here: http://www.binararkiv.se/binararkiv_files/traq/install/index.php 4. filled in the database settings and login stuff. Got an message that it could connect to the database. 5. I got to the screen with the title "Confirm" and clicked OK on that page. 6. Got this message: Database error: #: SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"

7 years ago by Binär Arkiv

Hmm, not really sure what MySQL version it is... phpMyAdmin says both 5.0.18 and 5.0.51a. Probably it is 5.0.51a.

7 years ago by Binär Arkiv

Oh, I forgot to say that I run it on a web hosting site (web hotel). Could it be permission stuff? That I'm not allowed to run the SET-command in SQL?

7 years ago by Binär Arkiv

Sorry to spam... But I tried to copy the whole SQL-content in the install.sql -file and ran it in phpMyAdmin on my web hotel, and it worked perfectly fine. No SQL errors.

7 years ago by Binär Arkiv

One last question.. I tried to track the error myself.. and i saw that install.php is trying to include config.php from the systems directory. But i have only a config-new.php file in it, should I rename it to config.php? Well, I will try that :) But now I have to sleep. Good night!

7 years ago by Jack

Not sure what's going on there with phpMyAdmin allowing it to work. Try removing the "SET SQL_MODE=..." line from the install.sql file in the install directory and try rerunning the installer. As for the config.php part, it looks for the config.php file and if there is one the installer will shutdown, this is to stop other people trying to run the installer.

7 years ago by Binär Arkiv

It was still problem with the SQL-thing. But it seems like it has nothing to do with the SQL. I took a little bit deeper look at it and echoed the variables $_POST['db'] and $dbconf (at the beginning in step 4 in install.php) and the $_POST['db'] variable contained this: {\\\\"server\\\\":\\\\"mysql4.scorpionshops.com\\\\",\\\\"user\\\\":\\\\"biokratior_db8\\\\",\\\\"pass\\\\":\\\\"my_password\\\\",\\\\"dbname\\\\":\\\\"biokratior_db8\\\\",\\\\"prefix\\\\":\\\\"traq_\\\\"} and right after the $dbconf assignment i echoed $dbconf and got an empty string.

I am not a very good programmer, but I know PHP and mySQL pretty well. But I don't know how json works and I don't know if the $_POST['db'] should look like that? Or if it is something going worng with the json_decode at this line in index.php: $dbconf = json_decode($_POST['db'], true);

I hope this information is helpful. I guess other people could have this problem as well, since I just followed the installation instructions and have tried it over and over again.

7 years ago by Binär Arkiv

I found the problem!! The php command json_encode works with parameters from PHP 5.3.0: http://php.net/manual/en/function.json-encode.php And I use PHP 5.2.11 on my web server. Is the json encoding and decoding necessary, or can i remove these commands from the code on my installation?

7 years ago by Jack

  • Reopened ticket as Accepted

It seems to be a magic quotes issue, have a read of "this post":http://traqproject.org/forum/showthread.php?tid=156&pid=458#pid458 on the forums and hopefully that will fix the issue.

7 years ago by Binär Arkiv

Thanks!! I copied the code and pasted it into index.php and it worked almost. I still got en error about Std Object. But then I also replaced all json_encode() with serialize() and all json_decode() with unserialize() and it worked perfectly even on PHP 5.2.11 and maybe on even earlier versions :)

7 years ago by Jack

  • Closed ticket as Closed

6 years and 11 months ago by Jack

  • Changed Milestone from 3.0 to 2.3.2