Apps Plugin Development: DB

Discussion in 'Developers' Forum' started by Horfic, Jul 5, 2010.

  1. Horfic

    Horfic Member

    I'm just writing or actually already nearly finished my app, which installs Roundcube and all plugins for ISPConfig 3 exchange.

    There is just one problem.
    How do I get access to the database, to create a new db and put the tables in it and add a remote user to ISPConfig.

    My script is working under root, because atm I'm just reading the root user and pass for the DB from the ISPConfig config file out. But it won't work under the webinterface install app. Because the user doesn't has the right permissions for the file

    Otherwise it is finished and will be released at the same time like the finished plugins. Time soon.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I will se how I can add a extension for adding sql databases to the app installer
  3. Horfic

    Horfic Member

    Maybe, that the installer isn't only executing the, e.g. a setup.sql which is than executed by the mysql user. But than whould be the problem to add the dynamic password.

    I added my

    Attached Files:

    Last edited: Jul 13, 2010
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    What do you think about this:

    1) Add a flag to the software repository that indicates that a given app needs its own mysql database.
    2) If this flag is set, ispconfig creates a database before is executed for the app and writes a file with the mysql login details of this database and puts it into the install directory of the app before is executed. This file can be e.g. a simple text file in the form:


    3) If a file named setup.sql is present, ispconfig will load this sql dump automatically into the db.
  5. Horfic

    Horfic Member

    Nice idea. Should work out of the box.
  6. 007007

    007007 New Member

  7. shoevring

    shoevring New Member

    So you can create mailbokses on the ispconfig, and the ispconfig creates the auto on the exchange server on the windows platform?
  8. giftsnake

    giftsnake New Member

    the 'exchange plugins' from horfic have nothing to do with windows.
    they are for controlling some features from within the roundcube web interface
  9. Horfic

    Horfic Member

    Nicely done, what I can see in the svn. Just one more request.

    Could we do the same for Remote Users, before the new ISPConfig 3 version is final?

    So in the script, I (the repo server) have to generate a random password for the package_config?

    PS: There is a bug in the remote_user.tform.php regarding the whitelist and blacklist. There is two times the normal white/black in it. One should be replaced with the spamuser white/black list.
    Last edited: Jul 29, 2010
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    I will try to add it before 3.0.3 gets released.

    No, not the repo server. The package_config is created by the server that runs the ispconfig interface and not in the repository. The password is generated when you click on the install button for the package.

    Pleae report bugs in the bugtracker. Thanks :)

Share This Page