Tag » Posts Tagged ‘php.ini’

How to upload large files in PHP

By default PHP is configured to allow files upload of size upto 2M.

We need to adjust the following PHP configuration directives:

  1. upload_max_filesize: By default this value is 2M. We need to increase it to the maximum size of single file that we want to upload.
  2. post_max_size: It defines the maximum size of POST data that PHP will accept. This value should be greater than ‘upload_max_filesize’.
  3. memory_limit: This sets the amount of memory a PHP script is allowed to use during its execution. Set this to a value greater than ‘post_max_size’ so that PHP script can load and process the uploaded file.

Continue reading »

PHP Warning: include(): realpath failed to canonicalize

Warning

I was getting the following warnings when I was running Magento shell scripts from the command line using PHP CLI (PHP Command Line Interface).


PHP Warning:  include(): realpath failed to canonicalize Mage/Core/Model/App.php - bailing in /var/www/magentoproject/lib/Varien/Autoload.php on line 93

PHP Warning:  include(): realpath failed to canonicalize Varien/Event/Collection.php - bailing in /var/www/magentoproject/lib/Varien/Autoload.php on line 93

PHP Warning:  include(): realpath failed to canonicalize Varien/Event/Observer/Collection.php - bailing in /var/www/magentoproject/lib/Varien/Autoload.php on line 93

To remove this warning I started debugging Magento code but no success. Then I googled and came across various posts/forums saying that it was possibly due to APC.

Continue reading »

Importing large database (> 2 MB) using phpMyAdmin

phpMyAdmin

If you try importing a mysql database backup file greater than 2 MB then you may receive an error – “No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.”. No Worries! you just need to make few changes to your php.ini file.

Continue reading »

Back to top