You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VTiger安装报错求助:MySQL需配置指定sql_mode及PHP配置未生效

Fixing VTiger Pre-Requisite Check Issues on Ubuntu 18.04 (PHP 5.6)

Hey there, let's work through these VTiger setup snags step by step—you're so close to getting this sorted out! These are super common gotchas with VTiger's strict pre-flight checks, especially when mixing older PHP versions with Ubuntu 18.04's default service configs.

1. Fix PHP's error_reporting and log_errors Settings

First off, a critical mistake many folks make: on Ubuntu 18.04, PHP 5.6's Apache-specific config file isn't /etc/php.ini (that's a legacy path). You need to edit the Apache module's dedicated php.ini instead:

  • Open the correct config file with:
    sudo nano /etc/php/5.6/apache2/php.ini
    
  • Update the error_reporting line to match VTiger's exact recommendation:
    error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
    
  • Find the log_errors line and set it to:
    log_errors = Off
    
  • Save the file (Ctrl+O, hit Enter) and exit (Ctrl+X). Then restart Apache to apply changes:
    sudo systemctl restart apache2
    

The key here: Ubuntu splits PHP configs per service (Apache, CLI, FPM), so editing the wrong php.ini won't affect your web server's PHP environment at all.

2. Ensure MySQL sql_mode Is Properly Applied

Ubuntu 18.04 uses either MySQL 5.7 or MariaDB, and the mysqld service doesn't always pick up settings added to the end of /etc/mysql/my.cnf. Let's fix that:

  • Open the actual mysqld config file:
    sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
    
  • Look for the [mysqld] section (it's at the top of the file), and add your sql_mode line inside this section (not floating at the end):
    [mysqld]
    ... # keep existing settings
    sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    
  • Save and exit, then restart MySQL to activate the change:
    sudo systemctl restart mysql
    
  • Verify it worked by running this MySQL command (log into MySQL first with sudo mysql):
    SELECT @@GLOBAL.sql_mode;
    
    You should see the exact string you added in the output.

If you previously added this to /etc/mysql/my.cnf, check if that file includes a line like !includedir /etc/mysql/mysql.conf.d/—if not, your old setting was never being loaded by the service.

3. Verify Changes Are Live

After applying these fixes, clear your browser cache and reload the VTiger setup page. If the issues still pop up, confirm the PHP settings are active by creating a quick info file:

  • Make a file named info.php in your web root (e.g., /var/www/html/info.php):
    <?php phpinfo(); ?>
    
  • Access it via your browser (e.g., http://your-server-ip/info.php) and search for:
    • error_reporting (confirm it matches the exact value we set)
    • log_errors (should show Off)
      This will tell you for sure if your PHP config changes are being picked up by Apache.

内容的提问来源于stack exchange,提问作者Elkor

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.28 21:59:05