Discussion Forums  >  Self Hosted Control Panels

Replies: 13    Views: 589

Matto888
Code is Art
Profile
Posts: 8
Reg: Jun 28, 2014
Los Angeles, CA
10,580
08/31/14 03:38 PM (9 years ago)

406 Not Acceptable Error on Icon Upload for Self Hosted

I get the following error when trying to upload an Icon to an app I created on my self hosted software. I just loaded this and added a new app and get this error: An appropriate representation of the requested resource /BT-server/bt_v15/bt_app/bt_icon.php could not be found on this server. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. This error pops up also when I don't even select an image and just press the upload button. I checked and the files exists in the correct location as listed above so not sure why this would be happening.
 
Calypso Kid
Aspiring developer
Profile
Posts: 780
Reg: Mar 09, 2012
Upstate New Yor...
18,200
like
08/31/14 04:29 PM (9 years ago)
Hello, You need to be a member to use the self hosted software. More particularly, your membership gets you an API key. https://www.buzztouch.com/files/howtos/self-hosting-faq.pdf Welcome Dave
 
KevinPerry
Android Fan
Profile
Posts: 199
Reg: Jan 10, 2012
Wisconsin, USA
12,890
like
08/31/14 04:46 PM (9 years ago)
A Google Search Result = "Web browsers make a request for information from the server. When this happens, it sends an Accept header. This tells the server in what formats the browser can accept the data. If the server cannot send data in a format requested in the Accept header, the server sends the 406 Not Acceptable error. The error can also be generated by the mod_security module. Mod_security, a type of firewall program that runs on Apache web server, scans for violations of the rules it has set. If an action occurs that violates one of these rules, the server will throw a 406 error." My 'guess' would be the later (uploading a file, no no, or something :-/). Calypso Kid is correct, you do need an API key to export or download the source files from the server. You do need to become a member to get that API Key access for your control panel. Without the API Key, the site will work as normal, but you can not download anything from it, to use in eclipse to continue the developing and/or do the compiling of the app. At least that is the way I understand it. Hope that helps
 
photoserge
Aspiring developer
Profile
Posts: 146
Reg: Jan 01, 2012
paris
5,410
like
08/31/14 05:42 PM (9 years ago)
The Server is connected to Serge Ramelli's account who has been a member for years and we have made a ton of apps, so now moving to self hosting. I work with him. I have the API and the whole server set up and working fine. I am able to do everything from downloading Plugins to the rest of the items in creating the app, even uploading images to the files tab works fine. It is just the App Icon tab that give me this error for some reason when trying to upload an image. Actually I don't even need to choose a file and it gives me the error when I press the upload button with no file selected. I know it can accept pngs. I have plenty of other sites and apps uploading images just fine, just buzztouch app icon giving me this error.
 
photoserge
Aspiring developer
Profile
Posts: 146
Reg: Jan 01, 2012
paris
5,410
like
08/31/14 05:51 PM (9 years ago)
Sorry, accidently double posted
 
KevinPerry
Android Fan
Profile
Posts: 199
Reg: Jan 10, 2012
Wisconsin, USA
12,890
like
08/31/14 07:15 PM (9 years ago)
Just wondering ... what does the http server log say? Does it give any more information, at the time this is attempted? Otherwise I am at a loss at this point.
 
photoserge
Aspiring developer
Profile
Posts: 146
Reg: Jan 01, 2012
paris
5,410
like
08/31/14 09:05 PM (9 years ago)
This is what the error log says: IP - - [31/Aug/2014:20:58:01 -0700] "POST /BT-server/bt_v15/bt_app/bt_icon.php HTTP/1.1" 500 - "DOMAIN/BT-server/bt_v15/bt_app/bt_icon.php?appGuid=EAB0000289BE4E9941EC86405" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36" IP - - [31/Aug/2014:20:58:02 -0700] "GET /favicon.ico HTTP/1.1" 500 680 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36" IP - - [31/Aug/2014:20:58:04 -0700] "GET /BT-server/bt_v15/bt_app/bt_icon.php?appGuid=EAB0000289BE4E9941EC86405 HTTP/1.1" 200 14030 "DOMAIN/BT-server/bt_v15/bt_app/bt_appPackage.php?appGuid=EAB0000289BE4E9941EC86405" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36" Not sure if this is a bug in the software or what, but I did everything else on my app but the app icon and now can not download due to the fact there is no icon. :(
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
09/01/14 03:39 PM (9 years ago)
Perhaps the directory into which the icon file is uploaded does not have the proper write permissions. Ask your host for the recommended utility for changing permissions on files and directories. -- Niraj
 
photoserge
Aspiring developer
Profile
Posts: 146
Reg: Jan 01, 2012
paris
5,410
like
09/05/14 09:43 PM (9 years ago)
I have a bit of an update on this. I have reinstalled and and re-downloaded BT server 2 times now and no difference. Made triple sure all the setting were exactly per the instructions and still no difference. When I use the upload function on the files tab everything works fine - When the upload button is pressed it runs the call. When I run the upload function on the icon page it errors out above. One thing I did notice is that it the iconUrl ../../images/default_app_icon.png is being passed is the default and not the newly uploaded image, maybe this has something to do with it. This is what is getting posted, but it is not even finding the page (which happens to be the same page I am on) and errors on the send: http://buzztouch.mattodesigns.com/posting.png
 
photoserge
Aspiring developer
Profile
Posts: 146
Reg: Jan 01, 2012
paris
5,410
like
09/05/14 10:10 PM (9 years ago)
so double post
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
09/06/14 09:37 AM (9 years ago)
What tool are you using in the screenshot? It seems to be a useful tool. Perhaps your icon size is too big. Download the default icon, alter it by painting it red and change filename. Then try uploading it. These server situations are difficult to diagnose through the forum. The icon is not a big deal. You will still have to provide Xcode lots of icon sizes anyhow. You might have to live without it or go back to the server that has been successful for you. -- Niraj
 
Matto888
Code is Art
Profile
Posts: 8
Reg: Jun 28, 2014
Los Angeles, CA
10,580
like
09/06/14 02:12 PM (9 years ago)
I tried doing that already. There is something wrong with the code itself. Probably going to have to re-write that function from scratch to make it work. Spending too much time trying to debug something that is supposed to work. Kind of a bummer Buzztouch doesn't have support on this. The tool is an add-on for firefox. fireBug and firePHP. The icon is a big deal as the software will not let you export an app without having the app icon loaded. So yeah real pain.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
09/06/14 02:20 PM (9 years ago)
These are the self-hosting problems that are usually the cause of the version of PHP and how PHP is configured by the Hosting Service. You can pay PSMDanny to solve it for you. He has solved many hosting problems for the people of BT. Message him at http://www.buzztouch.com/PSMDanny
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/11/14 11:21 PM (9 years ago)
I realize this thread is a few months old. This is finally figured out. A doozie for sure. As it turns out, the countless ways mod_security could be configured on any particular box caused all sorts of freakouts. In this case, it's all about a ridiculously simple hidden http form field. The affected file: BT-server/bt_app/bt_icon.php The fix: Remove line 528. That's it, remove this line, re-upload the file. So far all servers with this issue are working. Line 528 reads: <input type="hidden" name="iconUrl" id="iconUrl" value="<?php echo $iconUrl;?>"/> Remove the entire line that holds this hidden input field. May be the longest ever to find "bug" that was caused entirely by a recent change to the mod_security module on zillions of linux servers. Sigh. Happy.
 

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.