2

I couldn't figure out what Vtiger was on about when it asked me to set the php.ini file to error_reporting. Even after the error_reporting had been edited to show;

error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT

The CRM still persists in telling me it requires resetting, no matter how many time I restarted apache with sudo apachectl restart

Anyway...

After moving on, I managed to get to add the database, which at first, looks straight forward, but beware! There's one more huddle to get over before you can successfully install.

You'll probably receive the command to add:

 sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Big headache!!

firstly, Mac OS X 10.13.* running MySQL mysql-5.7.21-macos10.13-x86_64 doesn't own /my.cnf and if like me, you're MySQL file will probably be stored in usr/local/mysql/bin/.

Stop looking, you wont find it anywhere on your Mac...

But there is light at the end of this tunnel...

cjones
  • 367
  • 1
  • 3
  • 19
  • 1
    You have not asked any question, let alone a question about code. Please read https://stackoverflow.com/help/on-topic – Bill Karwin Mar 19 '18 at 21:39

7 Answers7

8

For Ubuntu - Run command:

sudo nano /etc/mysql/my.cnf

Add the following part to the bottom:

[mysqld]

sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Run command to restart MySQL Service:

sudo service mysql restart

You will also need to change Database Collation to utf8_general_ci in phpmyadmin.

Done !

Ganesh Bhosale
  • 2,000
  • 18
  • 21
7

start up terminal and type:

sudo pico /etc/my.cnf

My.cnf will be empty. Copy and paste this in the file:

[mysqld]
sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Save it (ctrl-x and hit y to accept saving the file) and exit, back into terminal.

Type:

sudo touch /etc/my.cnf

Then run mysql; mysql -u root -p

and check the entry,

SHOW VARIABLES LIKE 'sql_mode';

The result should show the settings you added to my.cnf

Now return to vtiger and continue the installation and it should work :)

cjones
  • 367
  • 1
  • 3
  • 19
5

If you use mysql on windows, please edit file [mysql.ini]
(sample: C:\wamp64\bin\mysql\mysql5.7.21\mysql.ini)
and add below info and then restart mysql service. It's OK

[mysqld]
sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Quy Le
  • 2,354
  • 25
  • 18
1

Fire this query through the root user in MySQL

SET GLOBAL sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

And check if the settings are applied by firing the query as follows

SHOW GLOBAL VARIABLES LIKE 'sql_mode';
Fabich
  • 2,768
  • 3
  • 30
  • 44
1

Quick & Dirty: edit /modules/Install/Utils.php Block: * Function to check sql_mode configuration Line 349: return false; change false to true

YOU DISALBE THE CHECK - OWN RISK Vtiger CRM 7.3.0

Neppumuck
  • 21
  • 1
1

[Windows Manual Installations]

Find My.ini in C:\ProgramData\MySQL\MySQL Server 8.0

Replace

sql-mode="ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"

note: MySQL 8.0 does not support NO_AUTO_CREATE_USER (So remove it or sql service would not start)

ANOL GHOSH
  • 1
  • 1
  • 9
0

You basically have to disable it in utils.php as mysql 8.0 doesnt support NO_AUTO_CREATE_USER.

Camber
  • 1