PHP | Encoding Spanish Characters with json_encode

Author - Webner

You may face a problem with Spanish characters in PHP while trying to use json_encode. After json_encode it doesn’t give any result and no any error either. For solving this use utf8_encode instead of json_encode.
$result = utf8_encode ($value)

Webner Solutions is a Software Development company focused on developing CRM Read more…

Salesforce password expires and it needs to be changed in code everytime

Author - Webner

Problem:

We’re integrating Salesforce to a third-party e-commerce site using our custom cakephp app. In the app we’ve written code which uses Salesforce API to connect to Salesforce using Salesforce account username and password and then makes use of API calls to insert and Read more…

Codeigniter | How to remove index.php from URLs

Author - Webner

Problem: The default URL for Codeigniter contains index.php in it. How to remove that from URL?

For example: How do we change

http://localhost/workspace/pagination_demo/index.php/Home/ to http://localhost/workspace/pagination_demo/Home/

Solution:

Steps:

1.  Go to application- config folder inside your project:

2 Read more…

Salesforce | Invoking a Visualforce page in a managed package

Author - Webner

Remember one thing i.e to use __ (double underscore) after package name. Suppose you have a Visualforce page that uses custom controller. Visualforce page name is Upload_a_File. You have created a button on this page to choose a file and then upload this file to Amazon S3 or some Read more…

Error Code: 3. Error writing file ‘/tmp/MYMI5iqH’ (Errcode: 28)

Author - Webner

Problem

Recently in a website we were developing in Codeigniter PHP Framework, some of the urls stopped working and started throwing 500 internal server error. On investigation we found a MySQL query which was causing the problem .Query is simple but when we ran it Read more…

Salesforce prevents calls to unauthorized network address

Author - Webner
|
0 Comments
|

We have a callout inside a class (using @future) which was throwing following exception:

Apex script unhandled exception by user/organization:005A0000001WKkE/00DA0000000KYuL

Failed to invoke future method ‘public static void invokeProcess(String, String, String, Decimal, String, String, String, Datetime, String, String)’ on class ‘FillAccordForrms’ for job id ‘707A000000AYXxu’ caused Read more…

Salesforce Apex Data Loader – Date values off by 1 day

Author - Webner
|
0 Comments
|

How can I ensure my dates are correct when loading with the Data Loader?

When loading data into date fields such as Opportunity Close Date using the Data Loader, the date displayed in the application is sometimes one day earlier/later than the date in Read more…

Heroku | Run Cakephp Code as Cron Job

Author - Webner

Problem

The requirement was to run CakePHP controller action as cron job on Heroku. In order to achieve this you need to schedule this action so that it runs at specific time intervals on Heroku.
To run the code you need to add Heroku scheduler Read more…

Salesforce – Using dataloader on Linux

Author - Webner

If you work on Linux and you want to upload data to Salesforce from a Linux machine, you cannot use dataloader as it is Windows based program. Besides you need to install it on your machine and you also need credentials and security token of the Org to which you Read more…

Moodle | How to set a course as completed

Author - Webner
|
0 Comments
|

Following are the steps to complete a course in moodle by admin :

1. Open the course that you want to complete.

2. To the left side there will be a link of “Edit Settings”. In this link there will be an option of “Completion Tracking”. Expand the “Completion Read more…

Heroku – Session expires or gets deleted on every commit

Author - Webner
|
0 Comments
|

Session expires or gets deleted on every commit in Heroku

Follow these steps to fix this problem:

1. Install MemCachier addon in your heroku app

2. Create .user.ini file in your Heroku app and write following code in the file:
session.save_handler=memcached
session Read more…

Cannot Start Apache Service

Author - Webner
|
0 Comments
|

It’s a common problem while starting XAMPP, especially for Skype users. The default port used by both Skype and Apache is 80. In order to use both of them you should change the port number for one of them.

Here are the steps:

Changing Skype Read more…

Shared Hosting | Absolute location of a file

Author - Webner

If you want to access a file on a shared hosting server by specifying its absolute location it may not work. The reason is what we see on shared hosting as root folder actually may have more before it that is not visible to us for security reasons (as machine Read more…

Mobile App development | Flipper view not showing some images

Author - Webner
|
0 Comments
|

When mobile developers create an application, whether in Android or iOS, they often face challenge of mobile device fragmentation. Mobile device fragmentation in simple words means when an application is not able to run on some devices while it runs fine on others. One such problem developers encounter is where Read more…

Salesforce – To Fetch and process more than 50000 records

Author - Webner
|
0 Comments
|

To Fetch and process more than 50000 records in Salesforce

Problem

We want to fetch more than 50000 contacts and want to process them but are not able to do that due to salesforce Query limit.

Solution

Batch apex is Read more…

PHP Code | Connect to remote SFTP location on Windows

Author - Webner

We need to use the phpseclib library to connect to SFTP server:
$sftp = new Net_SFTP(‘www.webnersolutions.com’);
if (!$sftp->login(‘user_name’, ‘password’))
{
exit(‘Login Failed’);
}
$this->downloadfiles($sftp->nlist());
//to download all files on remote root folder Read more…

Amazon S3 and PHP | How to list only top level folders in a bucket

Author - Webner

Sample code:

$result= $client->listObjects(array(“Bucket” => $bucket,”Delimiter” => “/”));
$files = $response2->getPath(‘Contents’);
foreach ($result[‘CommonPrefixes’] as $object)
{
echo $object[‘Prefix’]’;
}

This will list only the top level folder. If we do not use delimiter with listObject function then it will give list of all the Read more…

Salesforce | How to recover data deleted by mistake

Author - Webner
|
0 Comments
|

Salesforce provides facility to create multiple copies of organization’s data in different environments for testing and training purpose without affecting the original data. Sandboxes are of three types – Configuration Only Sandbox, Developer Sandbox, Full Sandbox. Configuration only Sandbox is a read only sandbox containing objects, reports, dashboards etc having Read more…

Salesforce to Amazon S3 file upload – Heap Limit Exceeded

Author - Webner
|
0 Comments
|

How to resolve “Heap Limit Exceeded” error while uploading large files to Amazon S3 from within Salesforce.
Amazon Toolkit from Force.com has inbuilt classes and methods that facilitate connecting to Amazon S3 from Salesforce and uploading files to Amazon S3 from within Salesforce. For that we generally write a Read more…

How to get all the checked values from the Table view in iOS

Author - Webner
|
0 Comments
|

Table view is not like listview on which you can iterate over cells and get values. Tableview in iOS has reusable cells i.e. every time you scroll it, old cells don’t go up or down but the existing cells are reused to show new data. You can’t Read more…

‹ Prev page1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 Next page ›