First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Within the terminal, Fire this command:
which php
| <?php | |
| if(php_sapi_name()!=="cli"){ | |
| echo "Must be run from the commend line."; | |
| }; | |
| /** | |
| * Setup a magento instance so we can run this export from the command line. | |
| */ | |
| require_once('app/Mage.php'); | |
| umask(0); | |
| if (!Mage::isInstalled()) { |
| delimiter ;; | |
| drop procedure if exists build_catalog;; | |
| create procedure build_catalog(IN categories INT, IN products INT) | |
| begin | |
| SET @category_count = 1; | |
| SET @CATNAMEPREFIX = "Category "; | |
| SET @CATURLKEYPREFIX = "cat-"; | |
| SET @CATURLPATHPREFIX = "catpath-"; | |
| SET @ROOTCATEGORY = 2; | |
| SET @INCLUDEINMENU = 1; |
| <?php | |
| require_once 'app/Mage.php'; | |
| Mage::app(); | |
| $quote = Mage::getModel('sales/quote') | |
| ->setStoreId(Mage::app()->getStore('default')->getId()); | |
| $product = Mage::getModel('catalog/product')->load(6); /* 6 => Some product ID */ |
| <?php | |
| define('MAGENTO_ROOT', "/var/www/web"); | |
| $mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
| require_once $mageFilename; | |
| umask(0); | |
| Mage::app(); |