No announcement yet.

Question concerning databases and projects

  • Filter
  • Time
  • Show
Clear All
new posts

  • Question concerning databases and projects

    I want to verify that his isn't just happening to me...
    Here is the scenario
    I have an intranet site that has multiple projects deployed to it

    I have a project lets call it human resources
    It uses a database called employees
    It has group level security

    I have another project lets call it invoices
    It uses a database called payables
    It also has group level security

    I login to the human resource login application and I get in fine and works great
    I log out of that application and go back to the intranet site (in the same browser!!)
    I click on the invoices login and I get an error saying it can't find the database called employees

    This is a serious pain in the a$$
    I have had to go in and create database connections in all my projects deployed for every project I have on the intranet and when I add a new project that means going back into all the others and adding the connection for the new one....

    Can someone lease verify that this is happening to everyone ?.

    Sorry for the expanded post, just wanted to make sure I was clear


  • #2
    My quick guess is that you use the same cookie name for both servers. So if you logout from one website then the cookie is changed.
    I assume that you use uniserver or another wamp/lamp server..
    If so then add in the root of your www path the following line in your .htaccess file (create the file if it doesnt exist).
    php_value "EMPLOYEESSESSID"

    and in the other
    php_value "PAYABLESESSID"

    This gives each website its own cookie. So if you logout on one then you can not screw up your connection on the other.


    • #3
      Maybe I should have given the exact error.
      The error I am getting is:
      The database connection was not found, contact the system administrator. Connection: conn_employee
      Which is telling me that the name of the data base isnt what it is looking at, its looking at the connection name.

      I am putting the .htaccess under the employee root folder on the server.
      That is what you mean correct?
      I will try changing the text from php_value "EMPLOYEESSESSID"
      php_value "conn_employeeSESSID"



      • #4
        nope.. still got the same error..
        cant believe I am having this issue and nobody else does,


        • #5

          Here is the solution:
          Add the .htaccess file with the following code:
          php_value "connection_nameSESSID"
          the connection name is what you call the connection in scriptcase not the database name

          and put it in the root of each project and then make sure ht access is enabled in apache

          THANK YOU RR



          • #6
            A yeah my bad I meant in the project root of course.. But you found that out already.. I my case we run more then one deployment of the same project, e.g. one for development and one for production.
            Both use their own session id...


            • #7
              As with my fast thinking i think that you use the same cookies name for both web servers. So if you logout from one web page then the the cache, cookies in the memory are modified. I believe that you use uniserver as i used to know it beacuse i was also using it while creating a custom website design
              Last edited by OliveAlbert; 02-22-2014, 05:09 AM.


              • #8
                Yep uniserver.. It is easier then wamp. But basically it is just another windows, apache, php, mysql clone. Tho we use it with oracle and dont use mysql. The newest uniserverz also works, I use that locally to test and debug (if needed) deployments. Just install xdebug with it and you can debug locally..
                My webserver is a single server with multiple environments in it, e.g. acceptation and production. And with the trick you can login on one envrionment without disturbing the other connection.