Posted
on November 12, 2012, 8:57 AM,
by Nitesh,
under
magento,
PHP.
I was not been able to login to the magento2 backend even if I provided correct username and password combination. Google took me over to here. But it appears to be for older version of magento. But similar solution worked.
Open app/code/core/Mage/Core/Model/Session/Abstract.php and comment line 139-141. And the issue is solved. I haven’t yet looked at the possible undesirable implications of this change, but locally having this is not big of an issue. I recommend not using this solution in production
Posted
on November 12, 2012, 8:23 AM,
by Nitesh,
under
magento,
PHP.
I was trying to install magento 2 locally after cloning the project from its github’s repository, but I was confronted with this error.

There has been error processing your request
Even, it was hard to tell for normal user what caused the error. After looking at logs, I came to conclusion that, the var/ and pub/ directories in the root directory need to be php writable. Hence I changed their permission to 777, and it worked!
Posted
on September 7, 2012, 5:36 PM,
by Nitesh,
under
Linux,
PHP.
Well, when I was checking the requirements for symfony 2, I was presented with this Major Problem. I tried adding
suhosin.executor.include.whitelist=”phar”
to the end of php.ini file, but that was not helping. The important thing I was missing was installing php5-suhosin.
So install php5-suhosin by
sudo apt-get install php5-suhosin
And do restart your apache server before checking again.
This command comes handy when you want to dump all your databases at once.
mysqldump -u user -ppassword –all-databases > dumpname.sql
Posted
on July 21, 2012, 4:11 PM,
by Nitesh,
under
PHP.
I had this problem on Mac OSX 10.7.4, the errors were not displayed, fatal errors would have totally rendered blank page with 500 status code. The solution that worked for me was
- Open php.ini file located at /private/etc/php.ini
- Find the line that has variable display_errors.
- In my case, it was display_errors = Off, I set it as On ie. display_errors = On
And it started showing errors! If you are on a production server, having it Off would be the best thing you can do!
Posted
on July 17, 2012, 11:16 AM,
by Nitesh,
under
Hacks.
If you are developing html5 offline application leveraging app-cache and finding it hard to detect the true internet availability, read on.
As you may already know window.navigator.onLine is not reliable. I found this handy script but it didn’t work quite well with safari browser on Mac, iPad and iPhone when I had the fallback for unavailable resources. The workaround that worked quite well is the following php script.
<?php
header(‘HTTP/1.0 204 No Content’);
exit;
Save this php script with a name like check.php and the use following modification to the javascript function to check internet availability
function isOnline() {
if(window.navigator.onLine){
var s = $.ajax({
type: “HEAD”,
url: ‘check.php’ + “?” + Math.random(),
async: false
}).status;
// Check if 204 status code is returned
return s === 204;
}
return false;
}
This js script returns true network availability . Hope that will be helpful and somebody won’t have to scratch his head for days.
Posted
on July 17, 2012, 10:16 AM,
by Nitesh,
under
Mac OSX Lion.
I am migrating the existing symfony propel project I am working with from Ubuntu Linux to Mac OSX Lion. I have independent install of mysql. And I couldn’t get past this error.
Unable to open PDO connection [wrapped: SQLSTATE[HY000] [2002] No such file or directory]
Following steps solved my problem
On Terminal, execute these commands
- sudo mkdir /var/mysql/
- sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock
This should solve that error!. Actually it creates a symbolic link to /private/tmp/mysql.sock on /var/mysql/mysql.sock which the symfony/propel looks for.
It took me sometime to figure out setting up virtualhost for apache2 on Mac OSX Lion 10.7.4. I hope the following steps will be helpful.
- This is important, Edit httpd.conf located at /private/etc/apache2/httpd.conf. Uncomment the line
Include /private/etc/apache2/extra/httpd-vhosts.conf
- I like to have separate files for each vhost entries. There add the following line at the end of httpd.conf
Include /etc/apache2/sites/*.conf
- Now you can make new entries for any number of virtualhost you would want. Just name a file with extension conf inside /private/etc/apache2/sites/ directory and those files will be included.
Posted
on December 20, 2011, 11:26 PM,
by Nitesh,
under
Linux.
This solution worked for me.
1. First install acpi-call-tools
sudo apt-get install acpi-call-tools
2.
sudo modprobe -v acpi_call
3.
sudo echo “\_SB.PCI0.PEG0.GFX0.DOFF” > /proc/acpi/call
Note : I had to face permission denied when I did sudo as well. This quick fix solved that as well.
sudo chmod 777 /proc/acpi/call
Posted
on November 29, 2011, 11:40 PM,
by Nitesh,
under
Linux.
I have installed Ubuntu 11.10 on my laptop very recently. I was facing very low Wireless speed. Even accessing the local resources via Wireless link was lousy. The solution that worked for me.
sudo apt-get install wicd
sudo apt-get purge network-manager
And then configure your network with Wicd Network Manager.