Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9150783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:39:26+00:00 2026-06-17T11:39:26+00:00

<global> <models> <starmall_shipment> <class>Starmall_Shipment_Model</class> <resourceModel>starmall_shipment_mysql4</resourceModel> </starmall_shipment> <starmall_shipment_mysql4> <class>Starmall_Shipment_Model_Mysql4</class> <entities> <shipment> <table>starmall_shipment</table> </shipment> </entities> </starmall_shipment_mysql4>

  • 0
<global>
    <models>
        <starmall_shipment>
            <class>Starmall_Shipment_Model</class>
            <resourceModel>starmall_shipment_mysql4</resourceModel>
        </starmall_shipment>

        <starmall_shipment_mysql4>
            <class>Starmall_Shipment_Model_Mysql4</class>
            <entities>
                <shipment>
                    <table>starmall_shipment</table>
                </shipment>             
            </entities>
        </starmall_shipment_mysql4>
    </models>
</global>

My custom grid in the backend is working and I see the grid with data in it.
As a debug test I have in my Grid.php in _prepareCollection:

    $x = Mage::getModel('starmall_shipment/shipment');
    $x->load(3);

    var_dump($x);  // WORKS and I get information

When I run this in a standalone script:

<?php
    define("MAGE_BASE_DIR", "/home/users/xxx/xxx");
    require_once MAGE_BASE_DIR . '/app/Mage.php';
    Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

    $x = Mage::getModel('starmall_shipment/shipment');
        $x->load(3);

    var_dump($x);   
?>

I see this error:

No such file or directory  in /home/users/xxx/xxx/lib/Varien/Autoload.php
Failed opening 'Mage/Starmall/Shipment/Model/Shipment.php'

Why does it prepend Mage in front of the model?
What can be wrong in my config?


ADDED INFORMATION:

/app/etc/Starmall_Shipment.xml

<config>
<modules>
    <Starmall_Shipment>
        <active>true</active>
        <codePool>local</codePool>
    </Starmall_Shipment>
</modules>


THE REAL PROBLEM (POSSIBLY)

My Magento hosting provider puts this tag default int /app/etc/local.xml when installing Magento.

<cache>
  <backend>memcached</backend>
  <memcached>
    <servers>
      <server>
        <host>unix:///path/to/memcached.sock</host>
        <persistent>0</persistent>
        <port>0</port>
      </server>
    </servers>
  </memcached>
</cache>

If I comment this tag out then I don’t need to use loadModules() in my script.
I wonder if I need to turn this back on when going into production mode?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:39:27+00:00Added an answer on June 17, 2026 at 11:39 am

    Have a look how Magento cron works – it works as standalone script also (cron.php) and copy-paste code to your custom module.
    Main things:

     require 'app/Mage.php';
     ...
     Mage::getConfig()->init()
    

    Also it seems like modules not loaded
    Try to add after init config:

    Mage::getConfig()->loadModules();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on form models and get this error: global name 'AdForm' is
I use a global variable (an object of a class) and define it as
I have a class like this: // file /models/person.php class Person { public function
This is my model: class Author(models.Model): first_name = models.CharField(max_length=200) last_name = models.CharField(max_length=200) middle_name =
I have these models: class Person(models.Model): name=models.CharField(max_length=100) family=models.CharField(max_length=100) class MailContact(models.Model): person=models.ForeignKey(Person) email=models.CharField(max_length=100) #some fields
In models I have: public class BidModel { public int id { get; set;
In Rails, I can create models which are global (accessible anywhere in the application).
If I have the models with the following associations: class Business has_many :products class
I have two models : class Game before_save :update_teacher teacher end def update_teacher teacher.update_attribute(something,
I have a Organization and Employee models class Organization(models.Model): is_active = models.BooleanField() name =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.