You can check what exception occurred in your Magento system by navigating through:

  • [Document_Root]/var/report folder and
  • Open the file # corresponding to exception number on your browser’s screen.

or

you can enable exception printing for debugging purposes by:

  • Open [Document_Root]/errors folder
  • Rename local.xml.sample to local.xml

Both ways are helpful to trace and debug exceptions and errors in Magento.

Posted by: dcsaha | February 26, 2015

How do I disable Magento Compiler?

Magento Compiler feature should be disabled on any changes in loaded Magento classes, in other words, you need to disable Magento Compilation every time before installing new extension or initiating upgrade/downgrade/installation or removal of any Magento module.

To disable Magento Compiler you can use one of the following methods:

Admin Interface

  • navigate to System > Tools > Compilation page and click on Disable button:

Disabling Magento compiler when Magento Admin Backend is inaccessible / down

When Magento backend is down or inaccessible you still can disable Magento compiler either via SSH access or any access to store filesystem via FTP/SCP or any filemanager.

Console/SSH

  • Check current compilation status
    $ php -f shell/compiler.php -- state
    Compiler Status:          Enabled
    Compilation State:        Compiled
    Collected Files Count:    6042
    Compiled Scopes Count:    4
    
    
  • Disable Magento compilation:
    $ php -f shell/compiler.php -- disable
    Compiler include path disabled
  • Clear all compiled files
    $ php -f shell/compiler.php -- clear
    Compilation successfully cleared
  • Ensure that compiler is disabled now by checking its status:
    $ php -f shell/compiler.php -- state
    Compiler Status:          Disabled
    Compilation State:        Not Compiled
    Collected Files Count:    0
    Compiled Scopes Count:    0
  • Flush Magento cache

 

FTP/Filemanager/Filesystem

  • delete includes directory or rename it to any other name (_includes.unused for example):

    ftp :~> mv ./includes ./includes.unused
  • Flush Magento cache

Courtesy: https://kb.magenting.com/content/24/81/en/disable-magento-compiler.html#nobackend

Posted by: dcsaha | January 12, 2015

Can not Add my Blogger Blog in “ScribeFire Next “

Adding wordpress blog to the “ScribeFire Next” is easy. But I failed to add my blogger blogs to the “ScribeFire Next”. Well, I received notification from google that some sign-in attempts to my google account was prevented. However, google suggested that You can switch to an app made by Google such as Gmail to access your account (recommended) or change your settings at https://www.google.com/settings/security/lesssecureapps so that your account is no longer protected by modern security standards.

I thought the “ScribeFire Next” requires less secure access method so i visited the google account setup page above and “Enable Access for less secure apps”. Remember, choosing Enable increases your chances of unauthorized account access but allows you to continue using these less secure devices and apps. Learn more.

After enabling access of less secure apps – ScribeFire Next can now add blogger blogs.

Posted by: dcsaha | November 6, 2013

Magento – Remove last slash from generated URL

In CMS:

This will not add trailing slash

<a href="{{store direct_url="about-us"}}" rel="nofollow">About us</a>

But this will:

<a href="{{store url="shipping"}}" rel="nofollow">Shipping and handling</a>

Posted by: dcsaha | August 29, 2011

How to Batch Delete Post Revisions of an WordPress Blog

Execute the following SQL command:

DELETE FROM wp_posts WHERE post_type = "revision";

for detail: http://www.wprecipes.com/how-to-batch-deleting-post-revisions

Posted by: dcsaha | August 27, 2011

Top 10 MySQL Mistakes Made By PHP

Building a solid, dependable database takes time and expertise. Here are ten of the worst MySQL mistakes:

  1. Using MyISAM rather than InnoDB
  2. Using PHP’s mysql functions
  3. Not sanitizing user input
  4. Not using UTF-8
  5. Favoring PHP over SQL
  6. Not optimizing your queries
  7. Using the wrong data types
  8. Using * in SELECT queries
  9. Under- or over-indexing
  10. Forgetting to back up
  11. Bonus mistake: not considering other databases!

Read details here:
http://www.sitepoint.com/mysql-mistakes-php-developers/

While importing data from a script file please make sure you open the script file as “SQL Script File UTF-8 (*.sql)”. From MySQL query browser, you can select this option on the “Open Script File” dialog. The dialog pops up when you select File > Open Script… option.

By default PHPLinkDirectory does not display unicode utf-8 coded characters. You need to change the init.php file at the root of your phpld directoy.

Edit init.php in both home directory of your phpld installation and the admin directory.

Change:
// $setCharset = $db->Execute (“SET NAMES ‘utf8′”);
// $setCharset = $db->Execute (“SET CHARACTER SET utf8″);

to:
$setCharset = $db->Execute (“SET NAMES ‘utf8′”);
$setCharset = $db->Execute (“SET CHARACTER SET utf8″);

For more detail: http://www.karolos.com/unicode-utf-8-characters-problem-solved-in-phpld/

MS Access exported query expressions usually get truncated at 255
Characters. Instead of exporting the query result directly, insert the
query result into “a table with Memo field”. Then export “the table with
memo field”. The solution detail can be found here: http://support.microsoft.com/kb/178743

Posted by: dcsaha | June 3, 2011

Java String Comparison

To compare Strings for equality, don’t use ==. The == operator checks to see if two objects are exactly the same object. Two strings may be different objects, but have the same value (have exactly the same characters in them). Use the .equals() method to compare strings for equality. Similarly, use the .compareTo() method to test for unequal comparisons. For example,

    String s = "<i>something</i>", t = "<i>maybe something else</i>";
    if (s == t)      // Legal, but usually WRONG.
    if (s.equals(t)) // RIGHT
    if (s > t)    // ILLEGAL
    if (s.compareTo(t) > 0) // CORRECT>

(Courtesy: http://www.leepoint.net/notes-java/data/strings/12stringcomparison.html)

Older Posts »

Categories

Follow

Get every new post delivered to your Inbox.

Join 495 other followers