php,android,json,exception,httprequestRelated issues-Collection of common programming errors


  • Iain
    apache-2.2 php centos suphp
    We have a server that’s handling uploads. The memory limit is set at a ridiculously high level in php.ini (800 M).. however we have gd, which is managing the image resizing, but it is dying at about 60M of memory usage (our error log is reporting a fatal error at this stage).From all our Apache config files (CPanel/WHM managed), I can’t find a RLimitMem that’s set anywhere either.I’ve looked as well if there’s any limits set in our kernel, but can’t find anything there as well.Is there somethin

  • Haresh Vidja
    ubuntu php wordpress
    I have moved my server data PHP + WordPress and database(mysql) from one server to another server… All things working fine… but some time i got page blank in click submit button.. This problem occures some time ..I didnt get any error or fatal error in errorLog file and not get access entry in accsessLog file also on time of blank page.. Black page issue occurs some time on same taskSo how can I fix this problem..

  • Scott Pack
    apache-2.2 php centos
    So the same code works on my Ubuntu server but when I upload it to my dedicated hosting server running CentOS it seems to add an extra prefix of .:/usr/share/pear:/usr/share/php: I tried setting includepath to different things but it just doesn’t work. The file is in a directory called language in the same folder as the file that is including it and I’m using:include dirname(__FILE__).DIRECTORY_SEPARATOR.”language”.DIRECTORY_SEPARATOR.”storage.inc”; include dirname(__FILE__).”/language/language.

  • mike
    php cpanel pdo
    Getting this error: Fatal error: Class ‘PDO’ not foundHave these lines in php.ini:extension=pdo.so extension=pdo_sqlite.so extension=sqlite.so extension=pdo_mysql.soThis shows up in php.info()– –enable-pdo=shared’ ‘Have access to whm but there is no “software” tab from which to access easyapatche? Any suggestions??

  • Mahbubur R Aaman
    php centos zend-framework
    Shows PHP Fatal Errormain(): Failed opening required ‘Zend/Loader.php’I have installed ZF on /usr/share/phpzf command is working. I can create project and do other works using zf command. But while including the library path then shows the error.Am i missing something?

  • Passionate Developer
    apache-2.2 php
    I am getting below errors despite setting memory_limit in php.ini to 64mb:Fatal error: Out of memory (allocated 6291456) (tried to allocate 91284 bytes) in /home/favstayc/public_html/coverbuddy2/cake/libs/configure.php on line 1067What could I change to fix this issue?

  • BlaM
    php iis7 stdout stderr
    Okay, this is slowly getting annoying. I’m used to work with Apache Webservers and never had any of these problems. IIS seems to try to be intelligent – or whatever.Here’s my situation: My customer wants a PHP website and it is supposed to run on an Windows IIS webserver.For my development environment I could use my Apache – but just to be sure I want to do it with IIS, too. So I set up a dev-server with Windows Vista, all the latest Updates and installed IIS. Everything fine!I quickly found ins

  • WerkkreW
    apache-2.2 php varnish
    We recently migrated our site to a load balanced apache cluster behind varnish. Since that time a very small subset of users is reporting they cannot view any pages. I have narrowed the issue down quite a bit. This issue was not present before the move, the old infrastructure was a single large box.We are on Rackspace Cloud running 8 apache2 instances behind varnish 3.0 all load balanced using Rackspace Cloud load balancers (Zeus) and 2 mysql instances for a total of 10 servers, all linux.Use

  • Uvais Ibrahim
    php php-extensions pecl expect
    I got some serious error while installing expect extension in PHP.I ran sudo pecl install channel://pecl.php.net/expect-0.3.1I got error like this while running make,running: make /bin/bash /tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/libtool –mode=compile cc -I. -I/tmp/pear/temp/expect -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/include -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/main -I/tmp/pear/temp/expect -I/usr/include/php5 -I/usr/include/php5/main -I/u

  • Justin808
    php http httpd hostgator
    OK, so I’m uploading a 350meg zip file. The file one uploaded is unzipped and the contents are processed. The processing consists of reading in a data file, then copying and thumbnailing images, the adding data to a database. This is all once process start to finish. I can see in the log that the datafile is processed. I can see on the filesystem the thumbnails get created. But then it looks like the whole this starts over from scratch with blank post data and it fails.When I look at the httpd l

  • David Dimalanta
    android libgdx memory-efficiency debugging screen
    When making my simple app for revisions to update the latest changes, I test it first between the device (Google Nexus 7) and desktop using Eclipse IDE. I made eleven screens for the game in terms of the following for testing:Splash screen (usually the company’s logo) Game content (Usually announced if it’s rated E or M, for example) Loading Screen Title screen Main Menu screen Player 1’s registration screen Player 2’s registration screen Player list screen Game screenI tried testing switching s

  • Jonathan Hobbs
    java android animation sprites pixel
    I have been coding speed for an object. I have made it so the object will move from one end of the screen to another at a speed depending on the screen size, at the monemt I have made it so it will take one second to pass the screen. So i have worked out the speed in code but when I go to assign the speed it tells me to force close and i do not understand why. Here is the code: MainGame Code:@Override protected void onDraw(Canvas canvas) {setBlockSpeed(getWidth()); }private int blockSpeed;privat

  • milano
    android libgdx
    I try to create live wallpaper with libgdx framework. Here’s my source code: repositoryWhen I run this, black screen with name of the app appears (probably empty android layout). Main game is not called. I think that it is because starting a service not an activity. However how could I start an activity when AndroidTestWallpaper isn’t subclass of Activity class? I used this tutorial but I don’t think it’s complete, in this form my IDE (Intellij IDEA) doesn’t let me to run the app because no main

  • A M
    android cocos2d
    CCScene doesn’t show anything on 4.3 version?I am working on a project in which I’m using the cocos2d_android.jar and on the 4.3 version the screen goes blank and music/ccTouches/others things working fine.Even after I change the jar file with the API level 18(4.3 version), Add into my project and there is no error in the import time and uses their classes but in the RunTimeError occurred like :09-14 07:49:49.890: E/AndroidRuntime(1282): FATAL EXCEPTION: GLThread 102 09-14 07:49:49.890: E/Andro

  • grgarside
    android mac-os irrlicht ndk
    I’m new to irrlicht and I have started with irrlicht android port. I have made the following changes to android.mk file:LOCAL_CFLAGS := -O3 -DANDROID_NDK -DDISABLE_IMPORTGL -I./../include/ -I./include/ -I/documents/karthik/android/android-ndk-r9/platforms/android-18/arch-arm/usr/includeLOCAL_LDLIBS := -L/documents/karthik/android/android-ndk-r9/platforms/android-14/arch-arm/usr/lib/libGLESv1_CM.so -ldl -llog -L/documents/karthik/android/android-ndk-r9/platforms/android-14/arch-arm/usr/lib/libGLE

  • rolfl
    java android parcelable
    I am new to the Parcelable interface that I have implemented in my classes. At first they were Serializable, but now I have changed them to Parcelable.Have I done this the right way, and am I doing everything correctly? Here are my snippets of code:Citypublic class City implements Parcelable {private String code;private String name;private List<CityWeather> weathers ;public City() {super();}public String getName() {return name;}public void setName(String name) {this.name = name;}public Str

  • Mark101
    java android
    I have a method called hash button however on press the application crashes. Any idea why this is happening?I have included parts of my logcat below, any help is greatly appreciated.Many Thanks, Mark02-12 16:59:26.115: E/AndroidRuntime(2416): FATAL EXCEPTION: main 02-12 16:59:26.115: E/AndroidRuntime(2416): java.lang.ArrayIndexOutOfBoundsException: length=4; index=4

  • user3313192
    java android json android-asynctask
    I’am building a app that connects to a remote sever through JSON in this case connecting to ‘localhost’. The current program i have written will open different UI depending on their ‘type’ i.e normal or admin. My logat and java are below: This is my Log cat data: 02-19 07:19:51.921: E/AndroidRuntime(1707): FATAL EXCEPTION: AsyncTask #1 02-19 07:19:51.921: E/AndroidRuntime(1707): Process: com.example.newjudoapp, PID: 1707 02-19 07:19:51.921: E/AndroidRuntime(1707): java.lang.RuntimeException: A

  • user2005938
    java android box2d andengine sigsegv
    I am getting this error:Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 16513 (UpdateThread)when I create the body of a wall, but only the second time the method is called. For example, when the scene loads, the method that loads these walls is called once, and when the player collides with an object that brings him to the next room, the method is called again. This is the part of the method that is giving this error:Tile t = new Tile((float) i * 64, (float) j * 64- ((j * 64 – (mHeight

  • baTimá
    android android-intent android-activity android-logcat
    When i try to open a activity in my app which its suposed to show some saved messages(that i saved in another activity in the same app) it Force to Close and shows me these errors in LogCat:10-08 18:22:17.243: E/AndroidRuntime(269): FATAL EXCEPTION: main10-08 18:22:17.243: E/AndroidRuntime(269): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mensagem/com.example.mensagem.Mensagenssalvas}: java.lang.NullPointerException10-08 18:22:17.243: E/AndroidRuntime(269):

  • user3313192
    java android json android-asynctask
    I’am building a app that connects to a remote sever through JSON in this case connecting to ‘localhost’. The current program i have written will open different UI depending on their ‘type’ i.e normal or admin. My logat and java are below: This is my Log cat data: 02-19 07:19:51.921: E/AndroidRuntime(1707): FATAL EXCEPTION: AsyncTask #1 02-19 07:19:51.921: E/AndroidRuntime(1707): Process: com.example.newjudoapp, PID: 1707 02-19 07:19:51.921: E/AndroidRuntime(1707): java.lang.RuntimeException: A

  • Siddesh Bhalke
    php json curl json-decode
    My json data{“total”: 533489,”page”: 1,”pagesize”: 30,”questions”: [{“tags”: [“php”,”html”,”forms”],”answer_count”: 6,”favorite_count”: 0,”question_timeline_url”: “/questions/22075370/timeline”,”question_comments_url”: “/questions/22075370/comments”,”question_answers_url”: “/questions/22075370/answers”,”question_id”: 22075370,”owner”: {“user_id”: 3343981,”user_type”: “registered”,”display_name”: “user3343981″,”reputation”: 3,”email_hash”: “55d0eb4577a0ba9f9e428d445431b595″},”creation_date”: 1393

  • Coby Kaufer
    php json api ftp
    I’m aware that many people have had this issue with json_decode, but for my situation it’s a little different. I had this website working, using the youtube API and the json_decode function . It was working, until I thinkI accidentally may have replaced the .htaccess file in my domains main directory, and now all other websites going off that FTP account are returning similar errors. Does anyone know of any solutions to this? Here is my php.ini file: register_globals = Offzend_extension=”/usr/lo

  • Brandon
    java json asynchronous file-download
    I am downloading from a server using AsyncTask class. Sometimes my code works fine, and sometimes it throws an exception.This is my logcat:06-29 17:29:01.123: E/AndroidRuntime(321): FATAL EXCEPTION: AsyncTask #5 06-29 17:29:01.123: E/AndroidRuntime(321): java.lang.RuntimeException: An error occured while executing doInBackground() 06-29 17:29:01.123: E/AndroidRuntime(321): at android.os.AsyncTask$3.done(AsyncTask.java:200) 06-29 17:29:01.123: E/AndroidRuntime(321): at java.util.concurrent.Futu

  • user2584493
    java php android mysql json
    I am having issues with my attempt to connect via JSON to a PHP file to access MySQL in android. I cannot for the life of me figure out why this is causing my app to crash. Any ideas?It is throwing the following error: AndroidRuntime FATAL EXCEPTION: mainI am attemping to call this from my main activity:new getData().getMovie();Which calls this:import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList;import org.apache.http.*; import

  • leppie
    php html json foreach json-decode
    I´ve got the following: include(‘php/get_recipe_byID.php’);$jsonstring1 = $recipe_byidarr;$recip = json_decode($recipe_byidarr, true);print_r($recip);foreach ($recip[‘Data’][‘Recipes’] as $key => $newrecipe) {// echo ‘<li>// <a href=”/recipe_search.php?id=’ . $recipe[‘ID’] . ‘”>’;echo ‘seas’;echo $newrecipe[‘TITLE’];echo ‘<br><br>’; } When I call it in the browser, it tells me thatFatal error: Cannot use string offset as an array in /var/www/recipe_sea

  • MirroredFate
    php json apache ubuntu
    Apache is logging PHP Fatal error: Call to undefined function json_decode(). After some googling, it seems this problem is a result of not having the latest version of php. Oddly, running php –version ouputs PHP 5.5.1-2+debphp.org~precise+2 (cli) (built: Aug 6 2013 10:49:43) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologieswith Zend OPcache v7.0.2-dev, Copyright (c) 1999-2013, by Zend Technologieswith Xdebug v2.2.3, Copyright (c) 2002-2013, b

  • guyja
    python json python-requests
    I’m using python-requests to work with an elasticsearch index. In particular I’m not getting what I want from requests.json() (wraps the json.loads() function in the standard lib). I’m struggling with the result returned by the json() method. It seems to be returning a list of strings. I want a dict object that I can loop through to access each members attributes i.e…r = requests.get(url) results = r.json() //same as results = json.loads(json string) print(results)for result in results:pri

  • erj2code
    java json spring properties apache-camel
    I have a HelloWorld Java project that uses Camel to obtain a Map, and print out its contents in JSON format. The Map currently has hardcoded values, but I really want to change my code so that it uses Spring to load a sensor.properties file of nested key,value pairs into this Map.I have another Java project I wrote that only uses Spring, and can load the sensor.properties file just fine into an Arraylist object.However, when I try to use code from that project to load the sensor.properties in m

  • cmnunis
    android json wcf sql-server-2008
    I am currently developing an Android app that gets details from an SQL Server table. Thanks to everyone who has helped previously with my understanding of AsyncTasks and JSON, I can now retrieve objects. However, my attempt at updating tables from an Android device is not so smooth. Firstly, I’ll begin with the table: I have a JobStatus table that is populated by a trigger that runs as a new record is entered into the Jobs table. When the trigger is run, these 4 columns are populated, namely:-Th

  • HAL9000
    mysql stored-procedures cursors exception
    I’ve seen two different approaches of cursor handling is MySQL stored procedures. Now I’m curious about their stability, due to potential MYSQLEXCEPTION risks in stored routines.Assuming, that CURSOR is opened when DBMS raises MYSQLEXCEPTION and goes to EXIT HANDLER if it is declared…Approach #1:DELIMITER $$CREATE PROCEDURE `test1`() BEGIN DECLARE `EOS` BOOLEAN DEFAULT FALSE;DECLARE `buffer` INT UNSIGNED;DECLARE `MyCursor` CURSOR FOR SELECT`id` FROM`MyTable` LIMIT 50;DECLARE EXIT HANDLER FOR M

  • HLGEM
    postgresql insert exception trigger
    I am trying to write my first trigger. It is an insert trigger as follows:<b>Fatal error</b>: postgres7 error: [-1: ERROR: INSERT has more target columns than expressions at character 78INSERT INTO dash_pre_queue(ord_obj_guid,ord_entry_type_guid,client_obj_guid, installer_obj_guid, installer_serial_number, datetime, ord_proc_state_guid,created,ord_esc_type_guid,in_error,ord_entry_guid) SELECT(ord_obj_guid,NULL,client_obj_guid,inst_obj.inst_obj_guid,inst_obj.installer_serial_number

  • chintan khetiya
    android database http exception
    Help me please with error FATAL EXCEPTION mainI have this error when new activity starts.my code:package com.novator.inweld;import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader;import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.json.JSONArray; import org.json.JSONObject;import android

  • user2619284
    android multithreading exception android-asynctask
    I load an image in Bitmap from the javaCameraView. This one is send to async task in order to send it to php file. During the first-second there is no problem. After this time, I have a problem of thread but I don’t find a solution. This is the LogCat : 07-25 16:36:29.492: E/AndroidRuntime(17507): FATAL EXCEPTION: AsyncTask #507-25 16:36:29.492: E/AndroidRuntime(17507): java.lang.RuntimeException: An error occured while executing doInBackground()07-25 16:36:29.492: E/AndroidRuntime(17507): a

  • user1880779
    java android listview exception listactivity
    I’m getting this error whenever I’m trying to start this activity :01-31 02:19:19.558: E/AndroidRuntime(1318): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.prva/com.example.prva.ListView}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is ‘android.R.id.list’ListActivity :package com.example.prva;import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.support.v4.widget.SimpleCurso

  • Susanna
    android exception processing minim
    I’m running Processing 2.02 in Windows 8, have jre 7 installed, running an emulator created for API level 11, using the latest Minim version (as of 9/20/2013). I wrote a test sketch to make sure I can run things to the emulator (a canvas 100×100 green with a simple line drawn). This works. I then wrote a sketch to test out Minim playing a mp3 sound snippet. The mp3 file is about 201K and is in the data folder The sketch works in java but fails when I switched to Android mode.Can someone please

  • William
    java android exception
    I am trying to ad admob ads to my app but I am getting this error in the logcat when it launches. The app ran fine before I added the admob so I think it’s something to do with that.03-16 19:08:00.683: E/AndroidRuntime(529): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.musicbynumbers.scalesads/com.musicbynumbers.scalesads.MainMenu}: java.lang.NullPointerException 03-16 19:08:00.683: E/AndroidRuntime(529): at android.app.ActivityThread.performLaunchActivity(ActivityThre

  • bilal.haider
    android eclipse exception main
    With my friends, we’re working in a project and for it i need to create an andoid application. (i specify, i’m a beginner at programming in java) So to start i’ve follow a good tutorial (http://www.buildcircuit.com/sensorgraph-using-android-amarino-and-arduino/) it explain how to create a connection enter your arduino (microcontroller) and your arduino with amarino (bluetooth).The program retrieves the value of the variable voltage and displays it on the phone.But i’ve trouble, my program doesn

  • user1880779
    java android exception button onclicklistener
    Application crashes and I’m getting this error :02-19 13:48:34.168: E/AndroidRuntime(1070): FATAL EXCEPTION: main 02-19 13:48:34.168: E/AndroidRuntime(1070): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.prva/com.example.prva.MainMenu}: java.lang.NullPointerException02-19 13:48:34.168: E/AndroidRuntime(1070): Caused by: java.lang.NullPointerException 02-19 13:48:34.168: E/AndroidRuntime(1070): at com.example.prva.MainMenu.onCreate(MainMenu.java:49)When I try

  • Shawn
    silverlight exception fatal-error
    Receiving this error when trying to build a Silverlight 4 project.The code generator’Microsoft.ServiceModel.DomainServices.Tools.CSharpCodeDomClientCodeGenerator’encountered a fatal exception and could not generate code for project’TheProject.csproj’: Exception has been thrown by the target of aninvocation.

  • skaffman
    php windows httprequest pecl
    I was wondering how I can’t get rid of this error. I have a PHP 5.3 running on a Windows Server.In one of my file, I need to do a HttpRequest. The problem is that I need a specific *.dll (pecl_http.dll) that I can’t find. Is there another way to do this, or has someone this *.dll for PHP 5.3 ?Thanks for your helpAlexandre

  • dwnz
    android web-services httprequest restlet android-async-http
    I’m trying to send a POST request to my REST webservice using Android Async Http library as my client.For my webservice I’m using RESTlet framework.This is my handler method on my webservice:@Override public void handle(Request request, Response response) {String type = request.getMethod().getName();if(type.equalsIgnoreCase(“get”)){response.setStatus(new Status(Status.CLIENT_ERROR_BAD_REQUEST, “GET Requests are not accepted”));}else if(type.equalsIgnoreCase(“put”)){response.setStatus(new Status(

  • Orochi1992
    php android json exception httprequest
    Hello I am working on a login activity but it always displays the following error:E/JSON Parser(12505): Error parsing data org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject 03-25 00:21:14.735: W/dalvikvm(12505): threadid=11: thread exiting with uncaught exception (group=0x41d83700) 03-25 00:21:14.775: E/AndroidRuntime(12505): FATAL EXCEPTION: AsyncTask #1 03-25 00:21:14.775: E/AndroidRuntime(12505): java.lang.RuntimeException: An error occured while

  • user2218667
    android json parsing httprequest
    I try to parse data using json and AsyncTask. But am getting the error on these line:JSONObject json = jsonParser.makeHttpRequest(url_product_detials, “GET”, params);this is my code:public class EditWatchListProducts extends Activity {EditText txtName; EditText txtPrice; Button btnSave; Button btnDelete;String pid;private ProgressDialog pDialog;JSONParser jsonParser = new JSONParser();private static final String url_product_detials = “http://192.168.2.22/android_connect/get_product_details.php”;

  • user3081855
    android android-asynctask httprequest
    I have be) script.I have gone through many variations of the problem on stack overflow and used the solution to try and build the knowledge to do this but it seems to be failing everytime, can someone help?public class Main extends Activity implements OnClickListener {private EditText value;private Button btn;private ProgressBar pb;@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);value = (EditText) findViewById(R.id.editTe

  • ebichuhamster
    android multithreading android-asynctask maps httprequest
    I’m reading up on multithreading on Android. I haven’t found my error.I have a map (copied from Android Map API v2 Demo app) which displays location. I have an AsyncTask I want to call from this activity but once i call it it immediately crashes. The asynctask is an httprequest encapsulation.First I placed myasynctask.execute() on the onConnected(..) function, but once the activity got started (the map tried to load) the app would crash.@Overridepublic void onConnected(Bundle connectionHint) {m

  • Mobile Tech.
    java android json drupal httprequest
    Authentication error: Unable to respond to any of these challenges: {} Android – 401 UnauthorizedI have taken reference from this link Authentication Error when using HttpPost with DefaultHttpClient on AndroidI am working on android app in that backed in Drupal. In that I am sending data from android app to drupal website – webservice in JSON format. Now I can read JSON data from Drupal webservice and writing it in my android application. But facing problem in writing on drupal from android,

  • user2652614
    android apache http wamp httprequest
    hello i am getting an http refused error when using a device. the code is working on the emulator. any help is appreciated. I am currently using wamp server.below is the average error i get from all codes requiring http request12-30 20:20:16.106: W/System.err(14136): org.apache.http.conn.HttpHostConnectException: Connection to http://10.0.2.2 refused 12-30 20:20:16.341: W/System.err(14136): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOper

  • Usman Kurd
    android timer httprequest httpresponse
    Right now I am using HTTPRequest every thing is working fine. But i want to handle the following scenario Device is connected to wifi but wifi is not connected to internetI am using conection time out but honestly speaking it take its own time to time out and that is 40 seconds not less than that. Code for Request is following :public String[] doHttpGetWithCode_1(String url, String headerParam) throws Exception {weburl = new URL(url);uri = new URI(weburl.getProtocol(), web

  • Mayur
    java httprequest multipartform-data
    How can i initialized Multipart request..? I am uploading file using multipart/form-data content type but i can’t get multipart request in my controller.So how can i get multipart request in my controller .. Thanks in Advance.I am getting error like this..Jun 13, 2012 2:01:05 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [appServlet] in context with path [/Login] threw exception [Request processing failed; nested exception is java.lang.IllegalStat

Web site is in building