Wednesday, June 24, 2015

SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1

Hello,

Got this error message

SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1

We tried everything to insert in one table but this error didn't budged even for the simplest query we  wrote.

Then I found that there was a "TRIGGER" applied on this table which on insertion updates another table.

So the problem was with the stored procedure. There was some additional field in it.

I discovered the root cause as soon as I deleted the Trigger.

So the issue was with the error message, this error was not pin pointing that the field was missing on which table, due to the language of the error it seems like the error is with the immediate table but actually it can be with a connected one.

Hope this will help someone.

Thanx
Anshumaan Bakshi


Monday, April 27, 2015

Connection Failed: 'host' is not allowed to connect to this mysql server

Hello,

If you are getting following error while trying to connect your (PHP) application to a MySQL database

Connection Failed: 'host' is not allowed to connect to this MySQL server

Then this may due to limited privileges given to the user through which one s trying to connect with the server. Although a correct username and password is been used to connect still we have this error.

What happens is when a new MySQL user is added to a DB then the hostname name like localhost is added by default to user like user1@localhost. Now this user can access the DB for sure but while he is on the same machine not remotely.

The solution for this issue is to create a new user which has Any Host privileges "%" like

mysql> CREATE USER 'user2'@'%' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'user2'@'%' -> WITH GRANT OPTION;


Thanx
Anshumaan Bakshi

Wednesday, April 9, 2014

Windows 7 Aero Peek not working

Hello Everyone,

If you are on Windows 7 and due some update or some other issue the temporary view of the minimised windows or desktop is missing, which you normally get when you do a mouse over on the icons on your desktop then you have the issue known as Aero Peek not Working.

Actually you get to know about Aero peek if you right click -> Task Bar -> Properties, then you will know Aero Peek is the responsible module for this functionality, and if its not working then it would seems like disabled on the box just opened.


So the next step is to enable it.

Simple steps.

  1. Verify what's really the issue is
    1. Click on Start menu.
    2. Type Aero and locate the option which says "Find and fix problems with transparency and other visual effects"
    3. Wizard will be opened and click next to initiate it.
    4. The Wizard then will point out any issues, if it points out "desktop window manager is disabled" then we can proceed with the following solution.
  2. Click Start
  3. Type Services.msc
  4. Scroll down until you locate the entry that is labelled "Desktop Window Manager Session Manager".
  5. Right-Click on this service. Select Stop if already running else Start if it is stopped.
  6. Once Windows is done with starting then right click "Desktop Window Manager Session Manager" and select properties.
  7. On General Tab make sure the Start Type should is set to Automatic.
  8. That's it.
Thanx
Anshumaan Bakshi

Tuesday, January 28, 2014

Windows 7 Blue Screen uTorrent / µTorrent is running FIX

Hello,

If you are running Windows 7 and you had left the system running as some things are been downloaded from uTorrent / µTorrent. After some time you see a Blue Screen of Death with some error number and only way the system would work further is by hard restarting it.

If one thinks by restarting the system or reinstalling uTorrent / µTorrent will fix this issue then one has mistaken,

From my research on the net I found this issue comes due to access number of connection opened by uTorrent / µTorrent for downloading stuff, it very common if the there are many seeders for a specific file, in Windows 7 this will happen instantly.

If you download and install a Blue Screen Reader Tool from download.com then for this particular problem you will find the cause of blue screen which will appear as

Probably caused by : NETIO.SYS

On the net one will find different solutions of installing a windows patch / upgrading, changing some windows configuration, even upgrading RAM and uninstalling few softwares like MaAfee. But as the problem started with uTorrent / µTorrent so the solution has to be with its configuration.

I tried an tested this solution and it is working fine for me.
  1. Got to uTorrent / µTorrent and open Options -> Prefrences -> Bandwidth.
  2. Set the numbers in Number of connections as minimum as you like
    1. Global maximum number of connection 15
    2. Maximum number of connected peers per torrent 12
    3. Number of upload slots per torrent 1
You can play with numbers as per your requirement, but try to maintain the number in between minimum limits and you will be fine and safe from blue screen of death.

Thanx
Anshumaan Bakshi


Wednesday, January 8, 2014

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 47 bytes) in C:\wamp\www\workspace\MegaStore\lib\Zend\Db\Statement\Pdo.php on line 312

Hello,

If you get and error message like

 Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 47 bytes) in C:\wamp\www\workspace\MegaStore\lib\Zend\Db\Statement\Pdo.php on line 312


And no matter how much you change the php.ini file the error persists, then you need to add

ini_set('memory_limit', '2042M');

On top of the script which is throwing this error message, as this takes effect more properly when you are using some architectures like Zend or Magento the above simple fix can save a lot of your time.

Thanx
Anshumaan Bakshi

Wednesday, December 25, 2013

WAMP PID 4 Port 8 busy

Hello,

If you are on Windows 7 and WAMP is not working.You have closed SKYPE, changed its default ports etc, and any other related software which can possibly use port 80, and still WAMP doesn't start. Specifically Apache.

A little bit of Goggling can tell you that Port 80 is taken by Windows 7, Pid 4 in Task Manager, further you can find out that its a system process and it cannot be killed.

I found that there is service named http.sys which captures  port 80 on start-up and it needed to be stopped in order to release port 80.

It has to be disabled through REGEDIT, following are the steps for the same,

  1. Launch regedit, run-> type regedit
  2. Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP
  3. Locate Start
  4. Change the value to 4 which means disabled.
  5. Restart your system.
  6. Now your WAMP should work.

Thanx

Anshumaan Bakshi