( sdonate) 1067 Invalid default value for 'expiretime' in /var/www/donate/install.php:











up vote
0
down vote

favorite












Error when running /install.php



[Sat Nov 10 20:43:26.241729 2018] [:error] [pid 25855] [client 108.162.237.55:35442] PHP Fatal error:  Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rn                endcommands TEXT,rn                transactionid TEXT,rn      ' at line 9 in /var/www/donate/install.php:258nStack trace:n#0 /var/www/donate/install.php(258): PDO->exec('CREATE table tr...')n#1 {main}n  thrown in /var/www/donate/install.php on line 258


Lines 239-260 of install.php:



if(tableExists($dbcon, 'transactions') === FALSE){
$sql = "CREATE table transactions(
id INT(11) AUTO_INCREMENT PRIMARY KEY,
time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
purchaser TEXT,
usernametype TEXT,
username TEXT,
game TEXT,
expires INT(1),
expiretime ,
endcommands TEXT,
transactionid TEXT,
package TEXT,
packageid TEXT,
paymentmethod TEXT,
value DECIMAL(11,2),
status TEXT,
params TEXT);";
$dbcon->exec($sql);


}



software: sdonate.com
not sure how to fix it, documentation shows no solutions.



what would be a solution?










share|improve this question
























  • I would make the cause for the error, an error in your SQL syntax, more prominently displayed, so whoever's answering this can see what type of error they need to look for.
    – Alex
    Nov 11 at 2:23















up vote
0
down vote

favorite












Error when running /install.php



[Sat Nov 10 20:43:26.241729 2018] [:error] [pid 25855] [client 108.162.237.55:35442] PHP Fatal error:  Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rn                endcommands TEXT,rn                transactionid TEXT,rn      ' at line 9 in /var/www/donate/install.php:258nStack trace:n#0 /var/www/donate/install.php(258): PDO->exec('CREATE table tr...')n#1 {main}n  thrown in /var/www/donate/install.php on line 258


Lines 239-260 of install.php:



if(tableExists($dbcon, 'transactions') === FALSE){
$sql = "CREATE table transactions(
id INT(11) AUTO_INCREMENT PRIMARY KEY,
time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
purchaser TEXT,
usernametype TEXT,
username TEXT,
game TEXT,
expires INT(1),
expiretime ,
endcommands TEXT,
transactionid TEXT,
package TEXT,
packageid TEXT,
paymentmethod TEXT,
value DECIMAL(11,2),
status TEXT,
params TEXT);";
$dbcon->exec($sql);


}



software: sdonate.com
not sure how to fix it, documentation shows no solutions.



what would be a solution?










share|improve this question
























  • I would make the cause for the error, an error in your SQL syntax, more prominently displayed, so whoever's answering this can see what type of error they need to look for.
    – Alex
    Nov 11 at 2:23













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Error when running /install.php



[Sat Nov 10 20:43:26.241729 2018] [:error] [pid 25855] [client 108.162.237.55:35442] PHP Fatal error:  Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rn                endcommands TEXT,rn                transactionid TEXT,rn      ' at line 9 in /var/www/donate/install.php:258nStack trace:n#0 /var/www/donate/install.php(258): PDO->exec('CREATE table tr...')n#1 {main}n  thrown in /var/www/donate/install.php on line 258


Lines 239-260 of install.php:



if(tableExists($dbcon, 'transactions') === FALSE){
$sql = "CREATE table transactions(
id INT(11) AUTO_INCREMENT PRIMARY KEY,
time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
purchaser TEXT,
usernametype TEXT,
username TEXT,
game TEXT,
expires INT(1),
expiretime ,
endcommands TEXT,
transactionid TEXT,
package TEXT,
packageid TEXT,
paymentmethod TEXT,
value DECIMAL(11,2),
status TEXT,
params TEXT);";
$dbcon->exec($sql);


}



software: sdonate.com
not sure how to fix it, documentation shows no solutions.



what would be a solution?










share|improve this question















Error when running /install.php



[Sat Nov 10 20:43:26.241729 2018] [:error] [pid 25855] [client 108.162.237.55:35442] PHP Fatal error:  Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rn                endcommands TEXT,rn                transactionid TEXT,rn      ' at line 9 in /var/www/donate/install.php:258nStack trace:n#0 /var/www/donate/install.php(258): PDO->exec('CREATE table tr...')n#1 {main}n  thrown in /var/www/donate/install.php on line 258


Lines 239-260 of install.php:



if(tableExists($dbcon, 'transactions') === FALSE){
$sql = "CREATE table transactions(
id INT(11) AUTO_INCREMENT PRIMARY KEY,
time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
purchaser TEXT,
usernametype TEXT,
username TEXT,
game TEXT,
expires INT(1),
expiretime ,
endcommands TEXT,
transactionid TEXT,
package TEXT,
packageid TEXT,
paymentmethod TEXT,
value DECIMAL(11,2),
status TEXT,
params TEXT);";
$dbcon->exec($sql);


}



software: sdonate.com
not sure how to fix it, documentation shows no solutions.



what would be a solution?







php mysql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 1:55









Shadow

25.3k92742




25.3k92742










asked Nov 11 at 1:48









Alex EPIC

33




33












  • I would make the cause for the error, an error in your SQL syntax, more prominently displayed, so whoever's answering this can see what type of error they need to look for.
    – Alex
    Nov 11 at 2:23


















  • I would make the cause for the error, an error in your SQL syntax, more prominently displayed, so whoever's answering this can see what type of error they need to look for.
    – Alex
    Nov 11 at 2:23
















I would make the cause for the error, an error in your SQL syntax, more prominently displayed, so whoever's answering this can see what type of error they need to look for.
– Alex
Nov 11 at 2:23




I would make the cause for the error, an error in your SQL syntax, more prominently displayed, so whoever's answering this can see what type of error they need to look for.
– Alex
Nov 11 at 2:23












2 Answers
2






active

oldest

votes

















up vote
0
down vote



accepted










expiretime field does not have a data type, hence the syntax error. You need to provide the data type (probably datetime based on the name of the field).






share|improve this answer





















  • This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
    – Shadow
    Nov 11 at 2:06












  • well expiretime INT(11), fixed it.
    – Alex EPIC
    Nov 11 at 2:07










  • I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
    – Shadow
    Nov 11 at 2:09










  • Probably should just flag for closure as typo...
    – miken32
    Nov 11 at 3:26


















up vote
0
down vote













got it, just had to change it to:



expiretime INT(11),






share|improve this answer





















  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
    – Aniket Sahrawat
    Nov 11 at 7:18











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245154%2fsdonate-1067-invalid-default-value-for-expiretime-in-var-www-donate-instal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote



accepted










expiretime field does not have a data type, hence the syntax error. You need to provide the data type (probably datetime based on the name of the field).






share|improve this answer





















  • This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
    – Shadow
    Nov 11 at 2:06












  • well expiretime INT(11), fixed it.
    – Alex EPIC
    Nov 11 at 2:07










  • I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
    – Shadow
    Nov 11 at 2:09










  • Probably should just flag for closure as typo...
    – miken32
    Nov 11 at 3:26















up vote
0
down vote



accepted










expiretime field does not have a data type, hence the syntax error. You need to provide the data type (probably datetime based on the name of the field).






share|improve this answer





















  • This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
    – Shadow
    Nov 11 at 2:06












  • well expiretime INT(11), fixed it.
    – Alex EPIC
    Nov 11 at 2:07










  • I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
    – Shadow
    Nov 11 at 2:09










  • Probably should just flag for closure as typo...
    – miken32
    Nov 11 at 3:26













up vote
0
down vote



accepted







up vote
0
down vote



accepted






expiretime field does not have a data type, hence the syntax error. You need to provide the data type (probably datetime based on the name of the field).






share|improve this answer












expiretime field does not have a data type, hence the syntax error. You need to provide the data type (probably datetime based on the name of the field).







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 11 at 1:55









Shadow

25.3k92742




25.3k92742












  • This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
    – Shadow
    Nov 11 at 2:06












  • well expiretime INT(11), fixed it.
    – Alex EPIC
    Nov 11 at 2:07










  • I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
    – Shadow
    Nov 11 at 2:09










  • Probably should just flag for closure as typo...
    – miken32
    Nov 11 at 3:26


















  • This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
    – Shadow
    Nov 11 at 2:06












  • well expiretime INT(11), fixed it.
    – Alex EPIC
    Nov 11 at 2:07










  • I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
    – Shadow
    Nov 11 at 2:09










  • Probably should just flag for closure as typo...
    – miken32
    Nov 11 at 3:26
















This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
– Shadow
Nov 11 at 2:06






This has got nothing to do with php, the sql is broken. You need to provide the appropriate data type, not just the default value. I can't tell you what the right data type is, I can only guess.
– Shadow
Nov 11 at 2:06














well expiretime INT(11), fixed it.
– Alex EPIC
Nov 11 at 2:07




well expiretime INT(11), fixed it.
– Alex EPIC
Nov 11 at 2:07












I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
– Shadow
Nov 11 at 2:09




I'm not sure if int is the right data type for a field name as expiretime. Int is a valid data type for sure, but may cause issues later. You should contact the developer of this tool and ask him / her to fix this issue.
– Shadow
Nov 11 at 2:09












Probably should just flag for closure as typo...
– miken32
Nov 11 at 3:26




Probably should just flag for closure as typo...
– miken32
Nov 11 at 3:26












up vote
0
down vote













got it, just had to change it to:



expiretime INT(11),






share|improve this answer





















  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
    – Aniket Sahrawat
    Nov 11 at 7:18















up vote
0
down vote













got it, just had to change it to:



expiretime INT(11),






share|improve this answer





















  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
    – Aniket Sahrawat
    Nov 11 at 7:18













up vote
0
down vote










up vote
0
down vote









got it, just had to change it to:



expiretime INT(11),






share|improve this answer












got it, just had to change it to:



expiretime INT(11),







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 11 at 2:06









Alex EPIC

33




33












  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
    – Aniket Sahrawat
    Nov 11 at 7:18


















  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
    – Aniket Sahrawat
    Nov 11 at 7:18
















Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
– Aniket Sahrawat
Nov 11 at 7:18




Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - From Review
– Aniket Sahrawat
Nov 11 at 7:18


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245154%2fsdonate-1067-invalid-default-value-for-expiretime-in-var-www-donate-instal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Xamarin.iOS Cant Deploy on Iphone

Glorious Revolution

Dulmage-Mendelsohn matrix decomposition in Python