Discussion Forums  >  Self Hosted Control Panels

Replies: 19    Views: 135

Ed Goodall
Fusion Technology
Profile
Posts: 422
Reg: Oct 01, 2011
Wiltshire, UK
12,320
08/16/14 07:39 AM (9 years ago)

An error ocurred in running the fnExecuteNonQuery() method in utilityFunctions.php

Hi all Got a problem when creating an app on a self hosted server. I get this error when I specify a name and hit 'Next'... An error ocurred in running the fnExecuteNonQuery() method in utilityFunctions.php Anyone know why? Thanks Ed
 
Cakebit
Code is Art
Profile
Posts: 501
Reg: Dec 15, 2010
In your local b...
16,510
like
08/16/14 08:09 AM (9 years ago)
Hi Ed, How's it going?! Are you using an apostrophe ( ' ) in the app nickname? Sometimes this error happens when I do that. If not, I'll dig deeper into the code :) Cheers, -Cake http://buzztouch.me/chat/
 
Ed Goodall
Fusion Technology
Profile
Posts: 422
Reg: Oct 01, 2011
Wiltshire, UK
12,320
like
08/16/14 09:56 AM (9 years ago)
Hey Cake - all good, you? No, it wouldn't let me, it came up with a different error. It works on my other control panel, so this is confusing! If you could that would be awesome :) Ed
 
Cakebit
Code is Art
Profile
Posts: 501
Reg: Dec 15, 2010
In your local b...
16,510
like
08/16/14 10:42 AM (9 years ago)
Sure thing! Was there an error code with that error? (Eg: 6) If so that might help! -Cake
 
Ed Goodall
Fusion Technology
Profile
Posts: 422
Reg: Oct 01, 2011
Wiltshire, UK
12,320
like
08/16/14 10:57 AM (9 years ago)
How did you know?! It was 6! Ed
 
Adam
Aspiring developer
Profile
Posts: 247
Reg: Oct 23, 2010
Southern Califo...
4,470
like
08/16/14 11:10 AM (9 years ago)
It is probably something with the BT_API_requests in your MySQL database. Adam
 
Cakebit
Code is Art
Profile
Posts: 501
Reg: Dec 15, 2010
In your local b...
16,510
like
08/16/14 02:13 PM (9 years ago)
Hi Ed, So I checked out the code for this error and it is found in utilityFunctions.php on line 109. Basically it is a general error saying: We got no response from your database when we tried this request. First, check your config.php to make sure your database keys are correct - just to reduce errors. Then try turning error reporting in your config.php and re-try to create an app - the system should give me a clearer error message. Also, are you using any special symbols in your app name (EG; ", ', \) they may cause the script to terminate. -Cake
 
Ed Goodall
Fusion Technology
Profile
Posts: 422
Reg: Oct 01, 2011
Wiltshire, UK
12,320
like
08/17/14 09:26 AM (9 years ago)
How do I turn on Error Reporting?
 
Cakebit
Code is Art
Profile
Posts: 501
Reg: Dec 15, 2010
In your local b...
16,510
like
08/17/14 05:10 PM (9 years ago)
You can turn on Error Reporting by editing this line in your config.php: From: define("APP_ERROR_REPORTING", "0"); To: define("APP_ERROR_REPORTING", "1"); Let me know how it works! -Cake
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/18/14 12:38 AM (9 years ago)
Hi guys. Neat seeing everyone attacking this from different angles. Especially enjoy seeing all the young faces. 100% this is a syntax error in the SQL statement that's "trying" to execute. 1) Find the fnExecuteNonQuery() method in the utilityFunctions.php file. 2) BEFORE the query execute, do a simple echo statement so you can see the actual SQL that's trying to run (print it to the screen). Exit after that. echo $sql; exit(); Not sure what the variable name is in this method without looking, it may not be $sql, could be like $theSql or whatever. This will print the actual statement to the screen and allow you to see the syntax error. Guessing it's a rogue apostrophe too :-)
 
Cakebit
Code is Art
Profile
Posts: 501
Reg: Dec 15, 2010
In your local b...
16,510
like
08/18/14 04:29 AM (9 years ago)
@David @ buzztouch, Thanks for jumping in! I do enjoy to see another familiar face on the forums! "1) Find the fnExecuteNonQuery() method in the utilityFunctions.php file. 2) BEFORE the query execute, do a simple echo statement so you can see the actual SQL that's trying to run (print it to the screen). Exit after that." That is exactly the approach I am taking! I am going to parse through the error message (fnSqlError, anyone? :) and learn more from there... For reference, the variable is properly named $theSql, so I won't have any trouble referencing it - when we get to that point! Thanks -Cake
 
Ed Goodall
Fusion Technology
Profile
Posts: 422
Reg: Oct 01, 2011
Wiltshire, UK
12,320
like
08/20/14 01:23 AM (9 years ago)
fnExecuteNonQuery :: fnDbGetResult (get result) Database Error! Error #:1265 Error: Data truncated for column 'appLatitude' at row 1
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/20/14 02:44 AM (9 years ago)
Error: Data truncated for column 'appLatitude' at row 1 Hmm, good info. The appLatitude column is a float data type in the mySQL database. A number. It's actually almost never used, which makes me wonder. There are some columns in bt_applications that allow you to enter appAddress, appCity, appState, appLatitude, etc. These are used to help you keep track of possible location information related to an app. Entering these is done the Core screen. My suspicion is that the value entered in the form is not a float? I could be wrong. Copy / Paste the actual SQL statement that's executing, lets get a look at the literal query so we can clearly see it
 
Ed Goodall
Fusion Technology
Profile
Posts: 422
Reg: Oct 01, 2011
Wiltshire, UK
12,320
like
08/20/14 11:47 PM (9 years ago)
Not so familiar with SQL and so when I added the echo $theSql, I can login and then nothing shows up... Can someone put it into context for me please? Ed
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/21/14 02:30 AM (9 years ago)
How to best do this depends on the screen you're on. a) Login. b) Visit the screen that causes the error c) Look at the address bar. d) Paste the path to the file that's not working. The file path is after the / in the your URL /BT-server/SOME PATH TO SOME FILE At that point somebody can easier adivse on how to print the SQL statement.
 
Ed Goodall
Fusion Technology
Profile
Posts: 422
Reg: Oct 01, 2011
Wiltshire, UK
12,320
like
08/21/14 02:24 PM (9 years ago)
You know the error (above). File is /bt_v15/bt_app/bt_appNew.php and the code for the file is at http://pastebin.com/mV9nHjWS Ed
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
08/21/14 08:30 PM (9 years ago)
Another feller has the same error message: https://www.buzztouch.com/forum/thread.php?tid=5DC0E16DC46A6418A3CFBAA @Ed -- get with CakeBit and share your FTP password with him. TOGETHER, y'all will knock it out. :-) -- Niraj
 
Ed Goodall
Fusion Technology
Profile
Posts: 422
Reg: Oct 01, 2011
Wiltshire, UK
12,320
like
08/22/14 11:07 PM (9 years ago)
Already tried Niraj, but it is in a secure datacenter, sadly. Requests just time out! :( Ed
 
ThomasSechak
Aspiring developer
Profile
Posts: 59
Reg: Jul 10, 2011
Charlottsville
10,690
like
07/02/16 09:20 AM (8 years ago)
Was this resolved, how did you fix the problem. I have the exact same error. It is happening on the same page: /bt_v15/bt_app/bt_appNew.php Once turning on error reporting I have the same output you did. fnExecuteNonQuery :: fnDbGetResult (get result) Database Error! Error #:1265 Error: Data truncated for column 'appLatitude' at row 1
 
ThomasSechak
Aspiring developer
Profile
Posts: 59
Reg: Jul 10, 2011
Charlottsville
10,690
like
07/02/16 09:46 AM (8 years ago)
I experimented a little increasing the length of the appLatitude table row in the bt_applications table by turning it into a varchar instead of float. Then that made the appLongituderow have the same problem. Then changing that to a Varchar, then made this error: Error: Incorrect datetime value: '' for column 'lastRequestUTC' at row 1 Any ideas.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.