The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL/PgSQL MAXSQL/MAXPSQL

Discussion in 'cPanel Developers' started by darklca, Oct 5, 2007.

  1. darklca

    darklca Member

    Joined:
    Jul 10, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    im trying to implement separate limits for both

    - seperate version in main screen 100% (easy)
    - seperate countdbs and and var in main screen 100% (easy)
    - seperate var in package + editing creating by reseler/whm and Accounting.pm 100% (easy)




    - cPAddons.pm this is bottleneck its seems that pg_createdbs is smh called by mysql functions:

    sub my_createdbs {
    ...

    my $needs = @{$db_ar};
    if ($needs) {
    my ( $ok, $cnt ) = checkmaxdbs();
    my $nume = $Cpanel::CPDATA{'MAXSQL'} =~ m/^\d+$/ ? $Cpanel::CPDATA{'MAXSQL'} : 999999;

    if ( !$obj->{'existing_mysql'} && ( !$ok || ( $cnt + $needs ) > $nume ) ) {
    my $s = $needs == 1 ? '' : 's';
    my $s2 = $nume == 1 ? '' : 's';

    # NEWLANG, plural/singular tense
    $lang->print(
    q{Sorry, this feature requires [_1] additional mysql database[_2], and your current plan limits you to [_3] database[_4].<br />},
    $needs, $s, $Cpanel::CPDATA{MAXSQL}, $s2 );
    return 0;
    }


    is this function is related to creating DB in cpanel ? sql ? or its only for addons (deprecated)
    and creating dbs are hardly coded in cpanel/bin/mysqlwrap/admin postgresadmin/wrap ?
    i see that Postgres.pm hardly call Adminbin to run postgres from cpanel/bin
     
    #1 darklca, Oct 5, 2007
    Last edited: Oct 5, 2007
Loading...

Share This Page