<?php require('app/Mage.php'); Mage::app(); $product = Mage::getModel('catalog/product')->getCollection()->getFirstItem(); var_dump($product->getData('media_gallery'));
|* A simple fix for a shell execution on preg_match('/[0-9]\.[0-9]+\.[0-9]+/', shell_exec('mysql -V'), $version);|
|* The only edit that was done is that shell_exec('mysql -V') was changed to mysql_get_server_info() because not all|
|* systems have shell access. XAMPP, WAMP, or any Windows system might not have this type of access. mysql_get_server_info()|
|* is easier to use because it pulls the MySQL version from phpinfo() and is compatible with all Operating Systems.|
|* @link http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento|
|* @author Magento Inc.|
|OpenSTV version 1.7 (http://www.OpenSTV.org/)|
|Suggested donation for using OpenSTV for an election is $50. Please go to|
|http://www.OpenSTV.org/donate to donate via PayPal, Google Checkout, or|
|Certified election reports are also available. Please go to|
|http://www.openstv.org/certified-reports for more information.|
|Loading ballots from file magento-stackexchange-com-2015-election-results.blt.|
Debugging (Resource) Model Instantiation
Follow each step manually and any bugs during (resource) model instantiation will become obvious.
Since many people find model and resource model instantiation to be one of the more challenging things in Magento 1, these are all the steps Magento does to resolve the factory name to the real PHP class name.
To debug, simply follow each step manually until you find a non-match. This works really well in my experience.
Less guessing, more and faster results.
In the examples I use a factory name of "example/thing".