Im trying to access the Magento customer session in another part of my website.
domain.com/shop/ <- Magento
domain.com/test.php
The shop
The same issue was driving me mad. I worked through the following until the last item solved it:
If you've checked all the above, make sure you initialize a core "frontend" session on its own first like this:
// Initialise the core "frontend" session
Mage::getModel('core/session', array('name' => 'frontend'));
Then you can access the customer/session like this:
$customer = Mage::getSingleton("customer/session", array('name' => 'frontend'))->getCustomer();