V.2.3.1 -problem while ad first user/admin

Discussion in 'Installation/Configuration' started by datayoung, Aug 11, 2006.

  1. datayoung

    datayoung New Member

    I can't post in dev forum,so I post here if somebody know How-to fix,
    the problem is when I add user/email address for each site I got error ,but data had saved in database except everytime it show error like bellow:

    Warning: Invalid argument supplied for foreach() in /home/admispconfig/ispconfig/lib/plugins/isp_username.plugin.php on line 192

    Warning: implode() [function.implode]: Bad arguments. in /home/admispconfig/ispconfig/lib/plugins/isp_username.plugin.php on line 200

    Warning: Cannot modify header information - headers already sent by (output started at /home/admispconfig/ispconfig/lib/plugins/isp_username.plugin.php:192) in /home/admispconfig/ispconfig/web/multidoc/edit/edit.php on line 358
     
  2. Ben

    Ben Active Member Moderator

    So everytime you add a user or email, all data is saved even if you get that error?

    The first warning occurs because anything with reading co-domains does not work and the array is empty.

    Due to this error i guess the errormessage itself can not be displayed if I got updateError right.

    EDIT: Did an update to SVN, which only calls the foreach routines in case of having an array.
     
    Last edited: Aug 11, 2006
  3. datayoung

    datayoung New Member

    I found somethings interested

    its need User Prefix:
    If I leave it blank we will got problem like previous posted
    I don't have ablilty to fix in /home/admispconfig/ispconfig/lib/plugins/isp_username.plugin.php

    may be someone advice me how-to?
     
  4. Ben

    Ben Active Member Moderator

    Well if the user_prefix read from sysconfig is empty $web will be unset, so the query will throw an error, cause there is no else to initilse $web in any other way or throw an error.
    The co_domain query will fail in that case or returinig no records:
    So the question is what shall happen if no prefix is set or can be read and why / if there is no prefix set in your case. Can you insert a var_dump($user_prefix); after "$user_prefix = $sys_config["user_prefix"];"
     
  5. datayoung

    datayoung New Member

    Is statable version dont have this problem?

    I don't have the stable version right now,
    I was used ,and no problem with leave it blank,
    may be have to get it compare diff code
     
  6. Ben

    Ben Active Member Moderator

    No I meant using your local code. Make a copy of the isp_username.plugin.php and comment out

    if($user_prefix != '') {
    LINE 155

    and
    }
    LINE 169

    so that the stuff is run even with no prefix if you say you are fine without prefix. But I'm still not sure if that's wanted to have no prefix by conecpt.
     
  7. datayoung

    datayoung New Member

    Thanks Ben Its Work!

    I put comment in line 155,169 as you told,now It is Working well
    // if($user_prefix !='') {

    and

    // }
    Thanks for your help
     

Share This Page