php,json,codeigniterRelated 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

  • 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

  • Webnet
    php codeigniter error-handling
    function truExceptionHandler($no, $str, $file, $line) {if ($str != “Only variables should be assigned by reference”) {echo ‘<br/><pre>’;echo “<b>[ERROR] “.$str.” in “.$file.” on line “.$line.”</b><br/>”;print_r(debug_backtrace(2));} }set_error_handler(‘truExceptionHandler’);My above function isn’t catching the error Fatal error: Maximum function nesting level of ‘100’ reached, aborting! in C:\Program Files (x86)\EasyPHP-5.3.6.0\www\site.com\system\core\Common.php on

  • Rohan Kumar
    php codeigniter
    I want to add ajax paging in CI_pagination class, but for this I want to create a class MY_Pagination which extends the CI_Pagination class but it gives error when I use this library by $this->load->library(‘pagination’); in my controller: and calling the test function in new MY_Pagination ClassFatal error: Call to undefined method CI_Pagination::test() …I also added the line $config[‘subclass_prefix’] = ‘MY_’; in config.php I changed the sub class name because of Please note that all na

  • laiello
    php mysql codeigniter
    I am beating my head against the wall on this. I have a codeigniter application that I am migrating from one server to another. When migrated, I throws an error (it doesn’t in production).Fatal error: Using $this when not in object context in /SYSTEM_PATH/system/database/DB.php on line 146It’s a stock CI install 2.1.3 as far as the system folder goes.I’ve already tried re-uploading/migrating (hoping it was a corrupt file or something), but no luck.

  • ThomasReggi
    php mysql html codeigniter
    Fatal error: Call to a member function result() on a non-object in C:\wamp\www\system\application\models\users_model.php on line 8<?phpclass Users_model extends Model {function get_records(){$query = $this->db->get(‘users’);return $query->result();}}?>

  • Desert P
    php codeigniter routes
    I got following error on every controller Fatal error: Class ‘CI_Controller’ not found in /<path>/system/core/CodeIgniter.php on line 233The root folder has also its same separate codeigniter system (all ci structure) folder. the site in root in working but when i copy the another ci structure in sub folder i got mentioned fatal error. please help me.

  • H2ONOCK
    codeigniter migration
    I’ve been trying to pick my way through this error but I feel like I’m getting nowhere.We’re in the process of migrating a website from one server to another. All pages seem to work on the new site except for the contact form pages which appear to be trying to use ‘form_helper.php’. These pages work correctly on the old server but not on the new one. I get an error of:Fatal error: Call to undefined method CI_Loader::is_loaded() in C:\DATA\XXXX.com\www\application\helpers\form_helper.php on line

  • Jess McKenzie
    php codeigniter
    I am getting the following error on line 17 Fatal error: Call to a member function set_rules() on a non-objectI have the form_validation library on autoload.public function login(){$this->form_validation->set_rules(‘userName’,’userName’, ‘required|valid_email|trim|max_length[99]|xss_clean’);$this->form_validation->set_rules(‘userPassword’,’userPassword’, ‘required|trim|max_length[200]|xss_clean|callback__checkUser’);if($this->form_validation->run() === TRUE) {// set CLEAN data

  • Suheal Pasha
    php mysql codeigniter codeigniter-2 fatal-error
    My CI version is CI2.3. I’m running this php code in my local host. I followed all the steps given there but I’m getting this error don’t know why? and I changed Controller to CI_Controller. Hello world Program worked finely. This link code is not working. please need help!

  • ari
    codeigniter postgresql
    I am using Codeigniter 2.0.1 and Postgresql 8.1. My code uses transactions within try-catch blocks.On a simple insert at times I get a “Fatal Error” Fatal Error: Call to a member function row() on a non-object in<…path…>/system/database/drivers/postgre/postgre_driver.php online 357My Database Config is:$db[‘default’][‘hostname’] = “localhost”; $db[‘default’][‘username’] = “***”; $db[‘default’][‘password’] = “***”; $db[‘default’][‘database’] = “***”;$db[‘default’][‘dbdriver’] = ‘postgre’;

  • mahle
    php codeigniter
    I currently have a set up where on my local pc I have a CodeIgniter website, with CIUnit and phpunit installed for Unit Testing. Everything works fine here. I can go into the tests dir and type phpunit and all the unit tests run like normal. yayToday I set up a buildserver and installed Hudson and phpunit and created a build file and everything for it to run. The build fails because the unit tests break everything. I try to go to the tests dir /var/lib/hudson/jobs/website/workspace/tests and t

Web site is in building