Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When installing this module, mysql reports a syntax error? #77

Closed
ZHOURUFA opened this issue Jun 10, 2024 · 0 comments
Closed

When installing this module, mysql reports a syntax error? #77

ZHOURUFA opened this issue Jun 10, 2024 · 0 comments
Milestone

Comments

@ZHOURUFA
Copy link

Description of bug*
I was installing this module when activating the module suddenly reported a MySQL error. The details are as follows: PDOException: PDOException.
PDOException: sqlstate[42000]: Syntax error or access violation: 1064 There is an error in the syntax of your SQL; please check the manual that corresponds to your version of the MySQL server for the correct syntax to use near ‘unsigned DEFAULT “auto”,
PRIMARY KEY (id)
)' in D:\www\vendor\illuminate\database\Connection.php:458 at line 29
Stack trace:
#0 D:\www\vendor\illuminate\database\Connection.php(458): PDO->prepare(‘\nCREATE TABLE I...’)
#1 D:\www\vendor\illuminate\database\Connection.php(664): Illuminate\Database\Connection->Illuminate\Database{closure}('\nCREATE TABLE I...' , Array)
#2 D:\www\vendor\illuminate\database\Connection.php(631): Illuminate\Database\Connection->runQueryCallback(‘\nCREATE TABLE I...’ , Array, Object(Closure)) , Array, Object(Closure))
#3 D:\www\vendor\illuminate\database\Connection.php(465): Illuminate\Database\Connection->run(‘\nCREATE TABLE I...’ , Array, Object(Closure)) , Array, Object(Closure))
#4 D:\www\vendor\illuminate\database\Capsule\Manager.php(200): Illuminate\Database\Connection->statement(‘\nCREATE TABLE I...’)
#5 D:\www\modules\addons\pvewhmcs\pvewhmcs.php(66): Illuminate\Database\Capsule\Manager::__callStatic(‘statement’, Array)
#6 D:\www\admin\configaddonmods.php(0): pvewhmcs_activate()
#7 {main}
Next Illuminate\Database\QueryException: sqlstate[42000]: Syntax error or access violation: 1064 There is an error in the syntax of your SQL; check the manual that corresponds to your version of the MySQL server for the correct syntax to use near ‘unsigned DEFAULT “auto”, the correct syntax to use near “unsigned DEFAULT ”auto’, and the correct syntax to use near ‘unsigned DEFAULT “auto”. for the correct syntax to use near ‘unsigned DEFAULT “auto”,
PRIMARY KEY (id)
)' Line 29 (SQL:
CREATE TABLE IF NOT EXISTS mod_pvewhmcs_plans (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
title varchar(255) CHARACTER SET utf8 NOT NULL,
vmtype varchar(8) NOT NULL,
ostype varchar(8) DEFAULT NULL,
cpus tinyint(2) unsigned DEFAULT NULL, cpuemu varchar(30) CHARACTER SET utf8 DEFAULT NULL,
cpuemuvarchar(30) CHARACTER SET utf8 DEFAULT NULL,cores tinyint(2) unsigned DEFAULT NULL, cpulimit smallint(5) unsigned DEFAULT NULL,
cpuunits smallint(5) unsigned DEFAULT NULL,
memory smallint(5) unsigned NOT NULL,
swap smallint(5) unsigned DEFAULT NULL,
disk smallint(5) unsigned DEFAULT NULL, diskformat varchar(10) DEFAULT NULL,
diskformatvarchar(10) DEFAULT NULL,diskcache varchar(20) DEFAULT NULL, disktype varchar(20) DEFAULT NULL,
storage varchar(20) DEFAULT ‘local’,
diskio varchar(20) DEFAULT ‘0’, netmode varchar(10) DEFAULT NULL,
bridge varchar(20) NOT NULL DEFAULT ‘vmbr’,
vmbr tinyint(1) unsigned NOT NULL DEFAULT ‘0’,
netmodel varchar(10) DEFAULT NULL,
netratevarchar(5) DEFAULT ‘0’,firewalltinyint(1) unsigned NOT NULL DEFAULT ‘0’,bw int(6) unsigned DEFAULT ‘0’, kvm tinyint(1) unsigned NOT NULL DEFAULT ‘0’,
onboottinyint(1) unsigned DEFAULT ‘0’,vlanidvarchar(10) DEFAULT NULL,ipv6 varchar(10) unsigned DEFAULT ‘auto’, PRIMARY KEY (id`)
);) in D:\www\vendor\illuminate\database\Connection.php:671
Stack trace:
#0 D:\www\vendor\illuminate\database\Connection.php(631): Illuminate\Database\Connection->runQueryCallback(‘\nCREATE TABLE I...’ , Array, Object(Closure))
#1 D:\www\vendor\illuminate\database\Connection.php(465): Illuminate\Database\Connection->run(‘\nCREATE TABLE I...’ , Array, Object(Closure)) , Array, Object(Closure))
#2 D:\www\vendor\illuminate\database\Capsule\Manager.php(200): Illuminate\Database\Connection->statement(‘\nCREATE TABLE I...’)
#3 D:\www\modules\addons\pvewhmcs\pvewhmcs.php(66): Illuminate\Database\Capsule\Manager::__callStatic(‘statement’, Array)
#4 D:\www\admin\configaddonmods.php(0): pvewhmcs_activate()
#5 {main}

I've followed the installation steps you marked and have checked everywhere when I got the error.

Reproduce.
Steps to reproduce the behaviour:

  1. Start trying to activate the service after setting the service ID to greater than 100.
  2. A MySQL error is reported during activation.

Module > Support/Health tab (delete ip and paste here):*

  • 1.2.4
  • Apache 2.4;MySQL 5.7.26;PHP 8.1.29

**whmcs info (please fill in the following): ***

  • WHMCS version (must be supported): 8.10
  • Use HTTPS: Yes
@lsthompson lsthompson added this to the v1.2.5 milestone Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants