php,javascript,jquery,ajax,jsonRelated issues-Collection of common programming errors
user2958356
php mysql magento
I have Magento 1.7.0.2 and when I try to edit a customer account in the admin panel i get this error: Fatal error: Call to a member function setRenderer() on a non-object in /home/techspec/public_html/magento/includes/src/Mage_Adminhtml_Block_Customer_Edit_Tab_Account.php on line 77$attributes = $customerForm->getAttributes();foreach ($attributes as $attribute) {/* @var $attribute Mage_Eav_Model_Entity_Attribute */$attribute->setFrontendLabel(Mage::helper(‘customer’)->__($attribute->
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.
Doge
php mysql memory-management
This question already has an answer here:Diagnosing Memory Leaks – Allowed memory size of # bytes exhausted11 answersI am retrieving 10K records (having 10 columns with datatypes as datetime, text, int, varchar) using mysql_fetch_object and fetching all columns from each joined table in the query , which gave the memory size exhaustion fatal error, but then I amended the query to get only some specific columns which eliminated the error, saving me from drowning in the lake of errors. The query
Fran Verona
php javascript jquery ajax
I have a PHP file with the following code:<html><head><!– HEAD –><?php require_once ‘Language.php’; ?></head><body><script type=”text/javascript”>$.get(‘step2.php’,function(data){// Do something});</script></body> </html>As you can see, I’m trying to load some content via Ajax call. The problem is that step2.php contains some PHP code:<div class=”step-content table-bordered”><h3><?php echo $Lang->get(‘create_s2_title
hakre
php sugarcrm
I created a custom module (batch_Batches), with a custom view in sugar crm 6.3.0.RC2. When navigating to index.php?module=batch_Batches&action=myhello I get the error: Fatal error: Nesting level too deep – recursive dependency? in C:\sugar2\SugarCRM\include\utils.php on line 1038These are the files I created for the custom view. What am I missing? modules\batch_Batches\views\view.myHello.php:if (!defined(‘sugarEntry’) || !sugarEntry) die(‘Not A Valid Entry Point’);require_once(‘include/MVC/V
cweiske
php unit-testing code-coverage pear phing
Pleaase help… Inside my build.xml(under C:\xampp\php directory) is<?xml version=”1.0″ encoding=”UTF-8″?><project name=”my_project” default=”code_coverage” basedir=”.”><fileset dir=”C:/xampp/htdocs/phpunittest/classes” id=”php”><include name=”*.php”/></fileset><fileset dir=”C:/xampp/htdocs/phpunittest/tests” id=”tests”><include name=”Test*.php”/></fileset><target name=”code_coverage”><mkdir dir=”coverage_db”/><mkdir dir=”coverage_re
j0k
php xampp
When I use the PHP class Normalizer (e.g. \Normalizer::normalize($string, Normalizer::FORM_KD);) in my class Text.php in custom namespace Utils, I get the following error:Fatal error: Class ‘Utils\Normalizer’ not found in C:\xampp\htdocs\MyProject\src\Utils\text.php on line 380My project runs under XAMPP with PHP 5.4.4. I know also that:Normalizer should work since PHP 5 >= 5.3.0. The extension php_intl.dll is enabled in my php.ini file.What am I missing?
jwilner
php oop
First time extending a class in PHP and I’m getting a fatal error that says the method is private when it’s not. I’m sure it’s something elementary, but I’ve studied books and forums, and I just can’t pin down what I’ve done to generate this error. Any help greatly appreciated. Details below:Error message:Fatal error: Call to private method testgiver::dbConnect() from context ‘testprinter’ in /root/includes/classes/testprinter.php on line 726Line 726 of testprinter in the code below:private func
j0k
php heroku
I have the following statement:$img->setTitle(mb_check_encoding($item[‘title’], ‘UTF-8’) ? $item[‘title’] : utf8_encode($item[‘title’]));This works on my local setup of PHP 5.4.17 and my shared host which has PHP 5.3.xxBut when I deploy this app to Heroku (which has PHP 5.3.10), it gives the following error in the logs:2012-12-26T09:55:28+00:00 app[web.1]: [Wed Dec 26 09:55:27 2012] [error] [client 10.119.79.71] PHP Fatal error: Call to undefined function mb_check_encoding() in /app/www/incl
Pé de Leão
php solr
The following is my code which adds documents and fires a query using Solr.It’s showing an error:SolrInputDocument number 1 is not a valid SolrInputDocument instance Catchable fatal error: Argument 1 passed to SolrClient::query() must be an instance of SolrParams, string given in /var/www/ps/test.php on line 85<?php require_once( ‘bootstrap.php’ ); $options = array( ‘hostname’ => SOLR_SERVER_HOSTNAME ); $client = new SolrClient($options);// Create two documents to represent two auto parts.
Fran Verona
php javascript jquery ajax
I have a PHP file with the following code:<html><head><!– HEAD –><?php require_once ‘Language.php’; ?></head><body><script type=”text/javascript”>$.get(‘step2.php’,function(data){// Do something});</script></body> </html>As you can see, I’m trying to load some content via Ajax call. The problem is that step2.php contains some PHP code:<div class=”step-content table-bordered”><h3><?php echo $Lang->get(‘create_s2_title
Sean
javascript node.js gruntjs livereload
PC Specs: Windows 7 Enterprise x64I’m running grunt.js on a project and recently started receiving an error when attempting to run ‘grunt watch’.Grunt worked fine yesterday but today I started seeing:Running “watch” task Waiting…Fatal error: listen EACCESI read another question here: Cloud 9 and Grunt.jsthat lead me to remove ‘options: {livereload: true}’ from Gruntfile.jsrunning watch again works as intended. Is there a way to reconfigure grunt or livereload to get livereload working with G
Asenar
javascript php jquery callback
i have make an php editor with so much effort but i cant print the fatal error. and want to print the fatal error. How to do this. I have code for run the php through eval function here is my jsfiddle – **http://jsfiddle.net/3c7F6/3/** I want to print an fatal error. Please help me to do this.please check the code and give me the suggestion
Septagram
javascript fatal-error
Is it possible to terminate script on a certain condition with a specific error message? Exceptions are not an option, as they can be catched, thus avoiding termination.Update:I’d prefer the universal approach, but if there’s none, then it’s for the in-browser JavaScript. Error should be silent, and the error message should only go into the browser error log.
Ates Goral
javascript gruntjs
I removed the old grunt first,and I install the new grunt.But I got an error:D:\www\grunt-test\grunt grunt-cli: The grunt command line interface. (v0.1.4)Fatal error: Unable to find local grunt.If you’re seeing this message, either a Gruntfile wasn’t found or grunt hasn’t been installed locally to your project. For more information about installing and configuring grunt, please see the Getting Started guide: http://gruntjs.com/getting-startedIs there haven’t a grunt in my system path, or somethi
Vexir
javascript syntax-error
I think there’s some kind of non-fatal bug in my script that’s not allowing me to a/ debug the script with Firebug and b/ causes Firefox to constantly display a Connecting… (with the swirly) while I’m on the page. The script seems to run fine though.Any ideas what could cause that?<script type=”text/javascript”> var xmlHttp; var xmlDoc;loadXMLFile();function loadXMLFile() {xmlHttp = new window.XMLHttpRequest();xmlHttp.open(“GET”, “myFile.xml”, true);xmlHttp.onreadystatechange = StateChan
Bram Jetten
javascript ruby-on-rails debian v8
I’m trying to deploy my Rails app to a new VPS which runs with Debian. I’m using Nginx and Phusion Passenger as my server.I’ve installed Node.js as a JavaScript runtime. Sadly I’m seeing the following error message:Fatal error in v8::V8::AddGCPrologueCallback() V8 is no longer usableEdit:It is fixed now. Apparently gr security was causing the error.
Elisabeth
javascript iphone ipad orientation
I’m having the same problem that a couple of others have had with getting the correct behavior in a web app on an orientation change, and there doesn’t seem to be an obvious solution – I’ve seen this question asked a couple of times on Stack Overflow and no one’s yet been able to answer it.When I start the app in portrait mode, it works fine. Then I rotate into landscape and it’s scaled up. To get it to scale correctly for the landscape mode I have to double tap on something twice, first to zoo
Ulker Ibrahimova
javascript jquery file-get-contents
This question already has an answer here:Ways to circumvent the same-origin policy11 answersIs there any way to get full page source of snother different site? Example my site is example.com but i want to get facebook’s page source on example.com. I tired this one: http://phpjs.org/functions/file_get_contents/ And it gives me null. So anyone knows it?function file_get_contents (url, flags, context, offset, maxLen) {// Read the entire file into a string//// version: 906.111// discuss at: http://
shoriwa-shaun-benjamin
java javascript android cordova webview
I am trying to get my cordova webview to work with cordova 3.2 an use the phonegap Camera API to access the camera.Reference: Android WebViewsHere are some successful implementations of what I want to do, but these use Phonegap 1.9, i want to use Phonegap 3.2 (the latest one)Cordova WebView using AndroidAlso here’s a VideoWith the code below I am able to make the cordova webview display my index.html page without any issues but when I to access the camera by clicking on “Capture Photo” in my HTM
Fran Verona
php javascript jquery ajax
I have a PHP file with the following code:<html><head><!– HEAD –><?php require_once ‘Language.php’; ?></head><body><script type=”text/javascript”>$.get(‘step2.php’,function(data){// Do something});</script></body> </html>As you can see, I’m trying to load some content via Ajax call. The problem is that step2.php contains some PHP code:<div class=”step-content table-bordered”><h3><?php echo $Lang->get(‘create_s2_title
Tom
jquery ajax joomla joomla2.5
Still having problems figuring out how to use Ajax and the Joomla framework together. I’ve created a Joomla component which I can access with:index.php?option=com_mycomponentI’m using Jquery with Ajax in components/com_mycomponent/views/mycomponent/tmpl/default.php:<?php // No direct access to this file defined(‘_JEXEC’) or die(‘Restricted access’); ?> <html> <head><title>Ajax with jQuery Example</title><script language=”javascript” type=”text/javascript” src=”ht
Asenar
javascript php jquery callback
i have make an php editor with so much effort but i cant print the fatal error. and want to print the fatal error. How to do this. I have code for run the php through eval function here is my jsfiddle – **http://jsfiddle.net/3c7F6/3/** I want to print an fatal error. Please help me to do this.please check the code and give me the suggestion
Ulker Ibrahimova
javascript jquery file-get-contents
This question already has an answer here:Ways to circumvent the same-origin policy11 answersIs there any way to get full page source of snother different site? Example my site is example.com but i want to get facebook’s page source on example.com. I tired this one: http://phpjs.org/functions/file_get_contents/ And it gives me null. So anyone knows it?function file_get_contents (url, flags, context, offset, maxLen) {// Read the entire file into a string//// version: 906.111// discuss at: http://
Mitesh Vora
jquery html css ellipsis
I tried looking here Insert ellipsis (…) into HTML tag if content too wide but could not get in chrome to work. I there solution for multiline in all browsers??
Ronald Yeung
javascript jquery ajax json cors
What I am trying to do is to have a page on the HTTP protocol sending an AJAX call to the same Web server but using HTTPS. Both the requesting page and the AJAX handler are on the same server, having the same domain and port. (I.e., only difference is the protocol.) To illustrate,Fromhttp://www.example.com/index.phpTriggers a jQuery AJAX call tohttps://www.example.com/authenticate.php?user=123&password=456(I am hoping to pass the password through HTTPS to make it encrypted over the Internet.
Mac-Gon
javascript jquery html5 css3 navigation
I’ve been reading lots of the other posts, and no doubt it’s my inexperience with jQuery that is giving me trouble, but there are lots of things close to what I’m trying to accomplish. I have a div where I have a vertical navigation set of buttons. Inside that I want the other divs (child divs) that will be shown or hidden based on the navigation button clicked by the user. I want all of these divs to be in the same location on the screen…so, basically like a tabbed form but with vertical navi
user2023507
jquery spring twitter-bootstrap spring-mvc thymeleaf
I have following code : public class StudentController extends BaseController {@RequestMapping(value = “/student/edit”, method = RequestMethod.POST)public String submitForm(@Valid @ModelAttribute(MODEL_ATTRIBUTE_STUDENT) StudentDTO edited,BindingResult bindingResult, RedirectAttributes attributes) {if (bindingResult.hasErrors()) {return STUDENT_EDIT_FORM_VIEW;}//some logic…}@InitBinder public void initBinder(WebDataBinder binder) {SimpleDateFormat dateFormat = new SimpleDateFormat(“MM/dd/yyyy”
Liam Bailey
javascript jquery history.js
On this page: http://www.kastenreus.nl/onze-kasten/ we have the filters down the left hand side, we are having a problem with the link filters under Verfijn uw wensen, if you watch the console you can see it is firing 2 requests, the first one is what the content is loading in from, when it is the second we actually need.This is the click binded event:jQuery(“.codenegar_product_filter_wrap ul li a”).live(“click”, function(e){e.preventDefault();var $this = jQuery(this);if($this.attr(“data-key”) =
thealexbaron
jquery css
Click “Rate” – that should pop up a normal boxy dialog, but styles aren’t working. Any ideas?Here’s the working example on the site: http://www.great-quotes.com/boxyTest.htmThe official boxy docs: onehackoranother.com/projects/jquery/boxy/.boxy-wrapper { position: absolute; } .boxy-wrapper.fixed { position: fixed; }/* Modal */.boxy-modal-blackout { position: absolute; background-color: black; left: 0; top: 0; }/* Border */.boxy-wrapper { empty-cells: show; }.boxy-wrapper .top-left,.boxy-wrapper
Fran Verona
php javascript jquery ajax
I have a PHP file with the following code:<html><head><!– HEAD –><?php require_once ‘Language.php’; ?></head><body><script type=”text/javascript”>$.get(‘step2.php’,function(data){// Do something});</script></body> </html>As you can see, I’m trying to load some content via Ajax call. The problem is that step2.php contains some PHP code:<div class=”step-content table-bordered”><h3><?php echo $Lang->get(‘create_s2_title
Tim Post
php ajax
Quite simply, I want my javascript to be able to react to a fatal 500 error caused by PHP, appropriately to the error.My goal is simply to collect the fatal error message that the script produced, so I can show it on the client side.Is this in any way possible?EDIT: cleaned up the question, in case it gets, by chance, it gets searched.
Tom
jquery ajax joomla joomla2.5
Still having problems figuring out how to use Ajax and the Joomla framework together. I’ve created a Joomla component which I can access with:index.php?option=com_mycomponentI’m using Jquery with Ajax in components/com_mycomponent/views/mycomponent/tmpl/default.php:<?php // No direct access to this file defined(‘_JEXEC’) or die(‘Restricted access’); ?> <html> <head><title>Ajax with jQuery Example</title><script language=”javascript” type=”text/javascript” src=”ht
StuckAtWork
php ajax error-handling iis-7.5
I’d like to see any PHP errors that are occuring, ie the “Expected ; on line 5 of myfile.php” sort of thing. Unfortunately, I cannot seem to figure out how to see this information.I’ve set E_ALL, display_errors ON, friendly error messages are turned off, IIS is set to pass-through on errors, what am I missing?Syntax errors used to show up as stated above on any page; they no longer do. We moved the server to a localhost for development, and I guess didn’t mimic exactly the server config. Now I’m
NathaliaZeed
php mysql ajax mysqli
I’m battling to replace the mysql_results to mysqli. Could someone help. All I need is to correct ‘mysqli_result($result, ‘0’, ‘theurl’)’ in my code below. It worked when everything was written using mysql functions. But after I converted everything to mysqli, the mysql_results conversion seems to not be working.When it worked: echo(mysql_num_rows($query) !== 0) ? mysql_result($query, 0, ‘theurl’) : ‘None’;When I run this my current code I get an error: Fatal error: Call to a member function da
novicePrgrmr
java javascript ajax json jsp
I am sorry to ask this but i’ve been working on this for hours and I can’t figure it out on my own. I have to use json for part of a project and I was able to get it to work but now it’s not returning it back to the right jsp but instead just displaying the json jsp. I am pretty sure it is how I am receiving the json.here are screen shots of what is happening:this is the jsp that I need to use ajax on, I am wanting to populate the second dropdown using ajax:this is what is happening instead, (it
John Smith
ajax jsf jsf-2 primefaces radio-button
When I try this code after loading the index.xhtml page which is my welcome page(and which have page strana1.xhtml initialy included as content of p:outputPanel “sadrzaj”) and clicking on button “Napred”(means Forward) everything works fine and I got the ajax update of p:outputPanel id=”sadrzaj”(page strana2.xhtml loads and replace page strana1.xhtml inside of index.xhtml page, under p:outputPanel “sadrzaj”). But after that any change of radioButtons(which are part of page strana2.xhtml) doesn’t
Ronald Yeung
javascript jquery ajax json cors
What I am trying to do is to have a page on the HTTP protocol sending an AJAX call to the same Web server but using HTTPS. Both the requesting page and the AJAX handler are on the same server, having the same domain and port. (I.e., only difference is the protocol.) To illustrate,Fromhttp://www.example.com/index.phpTriggers a jQuery AJAX call tohttps://www.example.com/authenticate.php?user=123&password=456(I am hoping to pass the password through HTTPS to make it encrypted over the Internet.
stanleyhope
javascript ajax ssl internet-explorer-8
The problem: I have a site with a recently installed SSL certificate that is very dependent on POST calls over AJAX. The site worked fine on Internet Explorer 8 before the SSL certificate, but now does not.Since I haven’t been able to get a good way to read any error messages, I haven’t been able to pin down where the bug is coming from. I will try to list as much as I know/ have figured out, and I greatly appreciate any suggestions.What I know:On IE8, the site will not perform any AJAX POST cal
BLSully
c# javascript .net ajax sencha-touch
This is kind of a 2 part question:1) What is the better approach, letting .NET convert native objects into JSON, or using wrappers and encoding them myself (e.g. public string DataTableToJSON(DataTable))2) If the answer to the first question is the former approach, how best to pass error conditions to the client (JavaScript AJAX requests, generally with jQuery or in this specific case, Sencha Touch (Ext))? My current method (explained further down in this question) seems to work fairly well, but
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
Xalu
java php android mysql json
I am currently working on an app and I am trying to implement a user system with login/registatration. I’ve been going over several tutorials to get an idea what to do. Now I am beginng to wonder if something is wrong with my eclipse enviroment because after trying 2 or 3 tutorials (and downloading the source code to test), I keep getting the same errors.Rather than posting all the code (there is a lot)…Here is a link to the projects tutorial http://www.learn2crack.com/2013/08/develop-android-
Web site is in building