|
You last visited: Today at 18:27
Advertisement
SQL or the Code?
Discussion on SQL or the Code? within the Flyff Private Server forum part of the Flyff category.
07/17/2016, 09:11
|
#1
|
elite*gold: 0
Join Date: Jan 2010
Posts: 141
Received Thanks: 8
|
SQL or the Code?
Hi epvp, I have a problem where when I buy an item in my webshop it won't execute. I receive an error that says "The script could not be executed:
This item could not be sent.". This just happens last week, and I have no idea why it just happens as to I am not touching anything in the code. Can someone help me?
|
|
|
07/17/2016, 11:25
|
#2
|
elite*gold: 0
Join Date: Jan 2014
Posts: 773
Received Thanks: 373
|
you use the webshop from sedrika?
|
|
|
07/18/2016, 03:16
|
#3
|
elite*gold: 0
Join Date: Jan 2010
Posts: 141
Received Thanks: 8
|
Quote:
Originally Posted by Drabur
you use the webshop from sedrika?
|
Hello there, I am not using Sedrikas. Just the sapphires default. What could be the fault?
|
|
|
07/18/2016, 09:06
|
#4
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,739
Received Thanks: 1,669
|
Check ODBC Errors in your PHP Error file (in Windows C:\Windows\Temp\php_errors.log by default).
But thats only the case when the ODBC function calls used by the item sender are not error-supressed ( e.g. @ c_exec).
|
|
|
07/18/2016, 15:08
|
#5
|
elite*gold: 0
Join Date: Jan 2010
Posts: 141
Received Thanks: 8
|
Quote:
Originally Posted by xTwiLightx
Check ODBC Errors in your PHP Error file (in Windows C:\Windows\Temp\php_errors.log by default).
But thats only the case when the ODBC function calls used by the item sender are not error-supressed ( e.g. @ c_exec).
|
Hi there, thank you for giving me hope by replying but "php_errors.log" is not present in the said folder. I cannot seem to find it in the "C:" drive whenever I try to search for it. I believe that I do not have any faults in the code because I did not touch anything in it.
|
|
|
07/18/2016, 16:50
|
#6
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,739
Received Thanks: 1,669
|
Quote:
Originally Posted by pakinglalat
Hi there, thank you for giving me hope by replying but "php_errors.log" is not present in the said folder. I cannot seem to find it in the "C:" drive whenever I try to search for it. I believe that I do not have any faults in the code because I did not touch anything in it.
|
Sorry, it could be C:\Temp, not C:\Windows\Temp.
It really depends how PHP is configured on your system, but mostly it was C:\Temp.
|
|
|
07/19/2016, 05:27
|
#7
|
elite*gold: 0
Join Date: Jan 2010
Posts: 141
Received Thanks: 8
|
Quote:
Originally Posted by xTwiLightx
Sorry, it could be C:\Temp, not C:\Windows\Temp.
It really depends how PHP is configured on your system, but mostly it was C:\Temp.
|
Hello there again, it is not present too. This problem is really bad, I really need to fix this issue because coins/votepoints will be deducted whenever someone buy anything in the shop. Also whenever I add any news from the administration panel, it won't be present in the database though it says that it successfully been added.
|
|
|
07/19/2016, 14:15
|
#8
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,739
Received Thanks: 1,669
|
How did you setup your website?
IIS with PHP or XAMPP?
We need way more details than you gave us.
Maybe you should look for this one in your sites/shop.php:
Code:
if(isset($_POST['shopBuyItem'])) {
And remove all leading @'s before your odbc_exec function calls.
Quote:
to
Quote:
This should make it possible for your site to log errors.
But we really need to know where your error logs are.
|
|
|
07/22/2016, 08:42
|
#9
|
elite*gold: 0
Join Date: Jan 2010
Posts: 141
Received Thanks: 8
|
Quote:
Originally Posted by xTwiLightx
How did you setup your website?
IIS with PHP or XAMPP?
We need way more details than you gave us.
Maybe you should look for this one in your sites/shop.php:
Code:
if(isset($_POST['shopBuyItem'])) {
And remove all leading @'s before your odbc_exec function calls.
to
This should make it possible for your site to log errors.
But we really need to know where your error logs are.
|
Hello there, sorry for the very late reply. I will be trying to do this for the php log to show up. Since I only have the errors for the apache I believe but in the apache error logs there are some php related errors and I do not see any thing regarding the cause of my problem in it. I am using XAMPP.
This is the one you are talking about that I did not alter in any way:
Code:
if(isset($_POST['shopBuyItem'])) {
if( [MENTION=311501]ODB[/MENTION]c_exec($odbc_connect, $strUpdateBalance)
AND
[MENTION=311501]ODB[/MENTION]c_exec($odbc_connect, '
INSERT INTO [' . $_CONFIG['db_databases']['web'] . '].dbo.[LOG_PURCHASES] (
item,
itemname,
itemcount,
itemcurrency,
itemworth,
account,
datetime
) VALUES (
' . cleanSqlInput($mixedSelectedItemDetailsArray['itemid']) . ',
\'' . cleanSqlInput($mixedSelectedItemDetailsArray['name']) . '\',
' . cleanSqlInput($mixedSelectedItemDetailsArray['count']) . ',
' . $intGetCurrentCurrency . ',
' . cleanSqlInput($mixedSelectedItemDetailsArray[$intWorthColumnHelper]) . ',
\'' . cleanSqlInput($_SESSION['user']) . '\',
\''. date($_CONFIG['web_date_format']['dbDatetime']) .'\'
)
')
AND
send_item($intCharacterID, $mixedSelectedItemDetailsArray['itemid'], $mixedSelectedItemDetailsArray['count'])
) {
echo createMessage($_LANG['success_item_bought'], 'success');
}
else {
echo createMessage($_LANG['error_item_could_not_be_sent'], 'fail');
}
}
|
|
|
07/22/2016, 20:13
|
#10
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,739
Received Thanks: 1,669
|
Quote:
Originally Posted by pakinglalat
Hello there, sorry for the very late reply. I will be trying to do this for the php log to show up. Since I only have the errors for the apache I believe but in the apache error logs there are some php related errors and I do not see any thing regarding the cause of my problem in it. I am using XAMPP.
This is the one you are talking about that I did not alter in any way:
Code:
if(isset($_POST['shopBuyItem'])) {
if( [MENTION=311501]ODB[/MENTION]c_exec($odbc_connect, $strUpdateBalance)
AND
[MENTION=311501]ODB[/MENTION]c_exec($odbc_connect, '
INSERT INTO [' . $_CONFIG['db_databases']['web'] . '].dbo.[LOG_PURCHASES] (
item,
itemname,
itemcount,
itemcurrency,
itemworth,
account,
datetime
) VALUES (
' . cleanSqlInput($mixedSelectedItemDetailsArray['itemid']) . ',
\'' . cleanSqlInput($mixedSelectedItemDetailsArray['name']) . '\',
' . cleanSqlInput($mixedSelectedItemDetailsArray['count']) . ',
' . $intGetCurrentCurrency . ',
' . cleanSqlInput($mixedSelectedItemDetailsArray[$intWorthColumnHelper]) . ',
\'' . cleanSqlInput($_SESSION['user']) . '\',
\''. date($_CONFIG['web_date_format']['dbDatetime']) .'\'
)
')
AND
send_item($intCharacterID, $mixedSelectedItemDetailsArray['itemid'], $mixedSelectedItemDetailsArray['count'])
) {
echo createMessage($_LANG['success_item_bought'], 'success');
}
else {
echo createMessage($_LANG['error_item_could_not_be_sent'], 'fail');
}
}
|
That is the right place, remove the '@' symbol at every odbc_exec.This should show errors regarding this scope.
|
|
|
08/01/2016, 15:21
|
#11
|
elite*gold: 0
Join Date: Jan 2010
Posts: 141
Received Thanks: 8
|
The problem is now fixed and was due to our memory compressing technology that we used. Restart was just the fix
|
|
|
All times are GMT +2. The time now is 18:27.
|
|