#219 - Installation error
Type Defect
Status Closed
Milestone 2.3.2
Version 2.2
Component Install/Upgrade
Priority Normal
Severity Normal
Assigned to Jack
Reported 10 years ago
Updated 8 years ago
Votes 0
Related tickets
Proposed time
Worked time

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

Ticket History

10 years and 9 months ago by Jack

  • Priority High Normal
  • Severity Major Normal

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

10 years and 8 months 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"

10 years and 8 months 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.

10 years and 8 months 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?

10 years and 8 months 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.

10 years and 8 months 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!

10 years and 8 months 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.

10 years and 8 months 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\\\\":\\\\"biokratiordb8\\\\",\\\\"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.

10 years and 8 months 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?

Jack reopened as Accepted 10 years and 8 months ago

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.

10 years and 8 months 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 :)

Jack closed as Closed 10 years and 8 months ago

10 years and 7 months ago by Jack

  • Milestone 3.0 2.3.2