CakePHP 2.10.13 with custom directory structure

Hey,

This is the default directory structure in CakePHP 2.10.13:

~/lib/Cake
~/app/Config
~/app/Controller
...
~/app/webroot/index.php - this is the site directory index

But I use this:

~/webroot/cakephp/core/2.10.13/lib/Cake
~/webroot/cakephp/app/Config
~/webroot/cakephp/app/Controller
...
~/webroot/index.php - this is the site directory index

Everything in webroot. I know it’s not good, but it’s necessary. CakePHP it works with my settings, but I don’t know how to make it safe the files/directories. Please help me. Thanks!

  1. 2.10.13 is not even the latest 2.x version
  2. 2.x is EOL since June 15 2021 so I wouldn’t waste time getting this running and instead (finally) start porting things over to Cake5
  3. what exact error are you getting. you are just stating a very specific structure of your app but no error which we can go on to help you. How should we know how to help you?

You’re right, but I’ll have to stick with this version for now. There is no error, I’m just asking if it’s okay this directory structure. Safe or not? If not, what should I do? All CakePHP files/directories visitable in web browsers. I need chmod for few files or directories etc?

The fact that you are running such an ancient CakePHP version is enough to call your app not safe in my honest opinion.

These kinds of questions need to be asked to a security consultant, not a CakePHP Support forum.