My Magento on PHP 5.4.x Fixes

I am currently setting a Magento v1.7 ecommerce store on nginx with PHP 5.4. I have been monitoring the Magento store for errors and have been getting a few of them. I wanted to make a list of the errors that I am getting with the fixes. I hope these fixes will help other. And of course, please comment if you have a few to add to the list or if the fix on the post is not correct.

ERR (3): Warning: Illegal string offset 'value'  in /app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php on line 111

I have been getting the above error in saving configuration in backend.
Fix:
Replace at line 111:

} elseif ($v['value']==$defText) {
    $defTextArr[] = $v['label'];
    break;
}

To:

} elseif (isset($v['value'])) {
    if ($v['value']==$defText) {
        $defTextArr[] = $v['label'];
        break;
    }
}

If you have problem with Magento not generating PDF form invoice or anything PDF related.
You may need to open up: /lib/Zend/Pdf/FileParserDataSource.php
and comment out:

//abstract public function __construct();
//abstract public function __destruct();

Check out page problems with Log in and quantity updates.
By inserting:

<?php echo $this->getBlockHtml('formkey'); ?>

Right after:

<form id="login-form">

You may need to use grepWin to search for the location with the error, your theme may vary.

Increasing PHP File Upload Size on nginx

I am running nginx + php-fpm. I was posting new products to my newly set up Magento website, however when I was uploading the product image I got the “HTTP Upload Error.” I searched only, but did not find the answer to my problem. It turns out that the “HTTP Upload Error” meant that you uploaded a file passed the maximum allowed by php-fpm.

To boost up the file limit, you can simply set to the following on:

# /etc/php.ini
upload_max_filesize= 5M
post_max_size = 10M #Usually double the "upload_max_filesize
max_input_time = 100 #This one set the time spend for the php service to get your file before it closes its connection with you. It is better to set a higher number if you upload large size files. I set mine to 100 seconds, it should be enough time for me to upload a 5MB file. 

# one of your nginx *.conf that contains your domain config
# /etc/nginx/conf.d/virtual.conf
# add the code below within server {}
client_max_body_size 5m;

Now simply reboot php-fpm and nginx to take effect:

service nginx restart
service php-fpm restart