[mapguide-users] MGOS 4 Beta 2 and CodeIgniter

Gordon Luckett gordon.luckett at arrowgeomatics.com
Wed Nov 12 08:05:05 PST 2025


Hi David
When in doubt, I use Jackie's Sanity Check..

https://themapguyde.blogspot.com/2022/04/mapguide-dev-diary-important.html?m=1



On Wed, 12 Nov 2025, 10:39 David Bowen via mapguide-users, <
mapguide-users at lists.osgeo.org> wrote:

> Our application is built using the Model/View/Controller (MVC) framework
> CodeIgniter and I'm attempting to update the MVC framework from v3.1.13 to
> v4.6.3, but I'm encountering an issue where it seems that one of the
> MapGuide functions isn’t being loaded or recognized. The issue occurs
> during the log out process, where a user logs out of the application and
> there's a series of steps that take place to destroy the sessions (code
> below).
> I'm getting the following error when I attempt to log out of the
> application: Call to undefined function
> App\Controllers\Login\MgUserInformation(). This function,
> MgUserInformation, is successfully called when the user first logs into the
> application and a session is created, so I’m unclear what’s causing the
> issue.
> Does anyone have familiarity with MGOS and CodeIgniter 4, or would anyone
> have suggestions on how to check if MGOS functions are being properly
> loaded?
> We're running MGOS 4 Beta 2 and are unable to go to MGOS 4 until we've
> updated the MCV framework.
>
> Thanks,
> David
>
> function logout() {
>     //Log out and destroy session
> $this->mgExtDir = getenv('mg_extensionsDir');
>     $this->webconfig_ini = getenv( 'webconfigFilePath' );
>     $this->mgMapID = $this->_getValueByFieldName( 'MAPNAME' );
>     $this->mgSessionId = $this->_getValueByFieldName( 'SESSION' );
>     try {
>         // Initialize the Web Extensions and connect to the Server using
>         // the Web Extensions session identifier stored in PHP session
> state.
>
>         MgInitializeWebTier( $this->webconfig_ini );
>         $si = $this->mgSessionId;
>        // code fails on following line
>         $userInfo = new MgUserInformation( $this->mgSessionId );
>         $siteConnection = new MgSiteConnection();
>         $siteConnection->Open( $userInfo );
>
>         $siteConnection->GetSite()->DestroySession( $this->mgSessionId );
>     } catch ( MgException $e ) {
>         echo $e->GetMessage();
>         echo $e->GetDetails();
>     }
>     $session_dat = array( 'logged_in' => FALSE );
>     session()->set( $session_dat );
>     session()->destroy();
>     return redirect()->to( 'login/login' ); //Direct user back to login
> screen
> }
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapguide-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20251112/1e9ac8e0/attachment.htm>


More information about the mapguide-users mailing list