Sub projects under one Project ID

Morning,

I’m upgrading a series of PHPMaker project files (4) that are under one project and when in production, are subfolders to the main site. Each project file is a sub folder/module performing a function like CRM, supplier details, shareholder details, Xero interfacing etc. and share the same DB.

All have the same Project name and ProjectID and same security details and permissions. From the main project the user can navigate into a sub project. This worked great and only required one login as they all shared the same SESSION and Project details. Was originally developed in 2018 and had been upgraded to 2020 were it sits right now.

I’m now upgrading it to 2025 and just trying to get my head around using the same structure in 2025 with routing and Symfony. Previously I could point the URL to the subfolder and php file and that would pass it down into that sub project/module and then as long as the URL had the subfolder name prefixed, it could access the module functionality.
With slim routing I don’t seem to be able to do that. I need to “come through the front door” to get it to show the main screen in the sub module.
i.e. call the subdirectory and let the default get picked up which then establishes the routing for the module.

When I move back up to the main module, I seem to have lost all credentials and have to log back in again.

Any pointers/hints/ideas as to how I should be correctly sharing/moving between the project modules/subfolders with 2025 would be much appreciated.

TIA
Steve.

You need to go through the main index.php, that’s how all frameworks works (Slim, Symfony, Laravel, etc.), that’s why URL rewrite is required. Never try to access a particular .php by file name. Old version security systems are based on session variables named with project name only, so it worked. With newer versions, the user is refreshed from session on every request for better security. The security token is based on the user, not project ID or project name.

When you enter a sub site, you need to go through the index.php of the sub site. If the security settings for all projects are exactly the same (especially same users table), the authentication token should be the same, it should also work.

(You may also consider SSO by SAML. For example, SimpleSAMLphp.)

That makes sense. Will have to plan this one out a bit more.
Thanks for the info. :+1: