Include(user_id.php) failed to open stream: (even though there is no include of such name in my code)

I am running Vagrant locally on my Windows PC, Vagrant is running CentOS and having a weird issue with something working fine locally on my Vagrant box, but getting an error when pushing the code to my staging server.

Within my admin I have the following URL which grabs the id from the URL and uses that within a function to add some rows to a particular database table.

http://www.mysite.co.uk.192.168.0.155.xip.io/admin/settings/bulkclassroom/id/19312

This URL above in turn goes to my ‘Settings’ Controller and runs the follow function




    public function actionBulkclassroom($id = null)

    {

        if (isset($id)) {

            $model = new OrganisationClassroom();

            $model->bulkAssignTeacherAllClassrooms($id);

        }

    }



This in turn uses the ‘OrganisationClassroom’ model and uses the following function to assign a teacher to all classrooms.




    public function bulkAssignTeacherAllClassrooms($user_id = null)

    {

        if (!$user_id) return false;


        $classes = OrganisationClassroom::model()->currentUserOrganisation()->findAll();


        OrganisationClassroomsTeachersPivot::model()->deleteAll('user_id =:user_id ', array(':user_id'=> $user_id));


        foreach($classes as $class)

        {

            $pivot = new OrganisationClassroomsTeachersPivot();

            $pivot->classroom_id = $class->classroom_id;

            $pivot->user_id = $user_id;

            $pivot->save(false);

        }

    }



The code is pretty much self-explanatory and is working as expected when I run the code locally on my Vagrant box, however when I push the code to my staging server online I get the following error.

include(user_id.php) [function.include]: failed to open stream: No such file or directory

I am unsure why this is happening, nowhere in my code do I have an include(user_id.php) (I have done a search to double-check)

As the code & database tables are the same the issue can only be somehow related to my staging server setup somehow - can anyone suggest what is going on with this & how I can fix it?

Just a guess:

The url manager seems not working as expected. I would try with the url manager with its basic settings - no pretty url, no hiding of index.php, no disguising of extensions … etc. And the settings of the web server, too.

You have bad the name of the model probably, in windows there isn’t restriction whith the names (upper case and lower case), but in linux the names of the models must be precise.

I hope to help you!!