1

I am working on CakePHP project on the server. Actually, on the server are placed two projects with the same content - one as production version and one as testing site. So I actually copied everithing from non-testing application to testing one (including app, lib, plugins, vendors and all other stuff...). But when I tried to change Controller on my testing application (AppController as well) in app/Controller folder, nothing happend on testing site, it had no effect, becouse testing application was not looking for controllers in this folder, but in folder when my original (non-testing) application is placed. So now, when I change something in some Controller of original application, it also change my testing site. I guess something is wrong with configuration of paths and I was looking for the line where this is set to wrong location, but I have foud nothing, what could satisfy me. Can you please help me with this problem?

1 Answer 1

1

I think you should create separate database for your testing app. If you have copied all the files without modification the database configuration is the same and it makes no sense, since if you change data in your test app it will affect production data.

The problem you have described may be related to session. Maybe if you are running two instances (production and test) of the same app, they share the same session. Her is what you should try

  1. change 'Security.salt' in app/Config/core.php of test app
  2. Cakephp, per default, uses the PHP Session storage mechanism, but you have also cake and database session store method. The current method is stored in the Session.save variable in app/config/core.php. Change the method from php to cake, this will make Cakephp store the Session variables in the app/tmp/sessions directory. Also remember to give the appropriate permissions to this directory.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.