output_buffering in Wamp causing issues in the insert form

As mentioned earlier this week i changed my development machine to newer vmware win 7. During this, also upgraded from Wamp 2.2 to Wamp 2.5. Fortunatelly, i still keep both environments in parallel since various issues come up.

One of these issues is the one found today in php form (created with the dreamweaver CC wizard) that inserts some values into a mysql table. In my new dev machine i got these errors:

apache erros

The old dev environment worked fine, the prod environment worked fine, the new dev threw errors.

I started by trying to find any compatibility issues in the PHP versions between Wamp Server 2.2 and 2.5, could not locate anything.

The solution came from the Stack Exchange (again). It appears that the php.ini on the new server came with the default value of

output_buffering = 4096

which should be changed to

output_buffering = on

which was the default on the old dev machine. To change the value in Wamp server just go to PHP menu and edit the php.ini to the mentioned value.

wamp.2.5

One alternative suggested by lots of people, which i did not try was to add

ob_start();

at the beggining of the script, which turns on the output buffering feature for the specific script.

vmware repeated characters problem

For some time now i have this problem in one of the vm`s i use (win XP).When i edit a text document or start typing something, repeated keystrikes appear as if someone is pressing “c” on my keyboard.

repeated c strokes

In the beginning i thought that the cause of the problem was my XP machine, and the fact that i have been installing software from unsecure “origins”.. So i thought that a new vmware would be the solution to the problem. But NO! After backing up all my data, migrating it to a new windows 7 machine, and started using it in production use, guess..

repeated c strokes

It appears that this is a knowkn issue for vmware machines. I should have google it before doing all the work. This is how to get rid of it:

1. Power off the virtual machine.

2. Add a line, similar to this, at the end of your virtual machine’s configuration (.vmx) file

keyboard.typematicMinDelay = “2000000”

which equals to 2 seconds delay in the keyboard.

3. Start the vmware. You should be good to go.

Mike at “Single Founder” suggests the value can be changed to “500000”, since “2 seconds is a long time for computers”. I agree.