Announcement

Collapse
No announcement yet.

Database new connection is not saving (MySQL)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Database new connection is not saving (MySQL)

    Hi all

    I am deploying a new application, when open for the first time the browser redirects to create the database connection (as usual), I do all the steps and save, no errors.
    If I open the edit option, the conn is there and I can open. But when access to change the name there are no connections stored, if I get back to edit, the conn disappear, and if I try to open the application main page again sends me to create the connection.

    I did Google and the only thing I found was permissions over _lib, I have 777 here and in all sub files and folders.

    I am using Scriptcase 8.1. Prod environment Linux Centos 7, Apache, MySQL 5.7 and PHP 5.6.

    Any Ideas how to solve this?

    Thanks for your help
    Last edited by cfigueroa110; 02-21-2017, 03:52 PM.

  • #2
    It is the way you have to do. I did chmod -R 777 on directory. Then save database connections and chmod -R 755 back.
    Please let me know if you get this error too: http://www.scriptcase.net/forum/foru...production-not

    Comment


    • #3
      Hello
      I verify and the permission is 777 for all _lib directory and files, still not working.
      Apache log:
      [Tue Feb 21 20:21:18.230339 2017] [:error] [pid 6141] [client 172.16.0.181:58133] PHP Notice: Undefined index: url_js_thirddevel in /var/www/html/inventario/_lib/prod/lib/php/devel/tpl/scriptcase/body_admin_sys_allconections_create_wizard_dados_r ep.tpl.php on line 327, referer: http://192.168.0.188/inventario/_lib...5979685401e07c
      [Tue Feb 21 20:21:44.976415 2017] [:error] [pid 2896] [client 172.16.0.181:58134] PHP Warning: file_put_contents(/var/www/html/inventario/_lib/prod/lib/php/../../../conf/prod.config.php): failed to open stream: Permission denied in /var/www/html/inventario/_lib/prod/lib/php/devel/class/interface/nmConnection.class.php on line 323, referer: http://192.168.0.188/inventario/_lib...5979685401e07c

      Comment


      • #4
        Have you set full rights on the directory and lower levels? Or only _lib? That might not be sufficient. Other option could be that you have a problem in your upload, so you might try this again. Final option is to deploy on your local machine to check things out. At least is might give you some clues if this is a scriptcase or a hosting issue.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Hi, Albert

          About rights, yes 777 is for _lib and all sub files and subfolder inside it.
          I dud the upload 3 times in the same server but the same result: open the link -> it redirect me to create a new connection -> create the new connection test ok save -> logout -> try to open the application link again - and again redirect to the create the new conn.
          I create a new Centos, Apache, Php 5.6, MySQL 5.7 virtual server, di the deploy wit the same result.
          I did the deploy to my local windows laptop (the same with SC installed) here the connection is store with no problems I can open the application.
          I really appreciate your help; I am desperate, because the client is asking for the application

          Comment


          • #6
            Hi all

            I install a Ubuntu server, deploy the same application and it Works fine, looks like the problem is with Centos.

            Any ideas?

            Comment


            • #7
              Hi all
              I found the solution.
              The problem in Centos 7u is the Security. SELinux block’s R/W for security reasons, in order to create the conn PHP file with the database connection info in _lib/conf and in addition R/W rights to _lib/tmp.
              We only need to do the following:
              chcon -t httpd_sys_content_t /var/www/html/APP_FOLDER_NAME/_lib –R
              chcon -t httpd_sys_rw_content_t /var/www/html/ APP_FOLDER_NAME /_lib/conf -R
              chcon -t httpd_sys_rw_content_t /var/www/html/ APP_FOLDER_NAME /_lib/tmp -R
              As a base, I use this manual: https://blog.lysender.com/2015/07/ce...o-matter-what/. (It is not necessary to change the owner to ‘apache’)

              Comment


              • #8
                I have same problem, but in my case it is rather SC bug or something corrupted in the project. I cannot save new connection on a production server. I tried also locally using WAMP sever and the same thing happens.

                Comment

                Working...
                X