Client ID is incorrect in "PHP open_basedir" field of Website -> Options [tab]

Discussion in 'Installation/Configuration' started by cbj4074, Mar 29, 2012.

  1. cbj4074

    cbj4074 Member

    On the Website -> Options tab for this particular site, the user and group appear as follows:

    Linux User web3
    Linux Group client1

    However, the value in the "PHP open_basedir" field reads

    /var/www/clients/client0/web3/web:/var/www/clients/client0/web3/tmp [...]
    Shouldn't the client value be 1, and not 0 in that field?

    It seems that deleting the contents of this field and clicking "Save" forces the field to be populated with the values defined in System -> Server Config -> -> Web [tab] -> PHP open_basedir. As such, I expected the issue to be corrected when I emptied the field and saved the record. However, the values continue to contain client0.

    The values for the relevant fields in the Server Configuration are:

    Website path:
    PHP open_basedir:
    Any thoughts, anyone? Thanks in advance.
  2. erosbk

    erosbk New Member

    I had the same problema a few times... if you look in database of ispconfig it should be generated ok, but you will need to replace value 0 for the correct one in a few places... or just delete site and create again... as I recall...

    I never tested it enought, but sometime when you switch from tabs when creating client/web and after it you save the data (only with new clients/sites), is like the variable changes to client0 in some operation... the results are what you posted here...

    I will see this weekend if I can find why this happens and fix the bug.
  3. cbj4074

    cbj4074 Member

    Thank you for the reply, erosbk.

    Yes, the `web_domain`.`system_group` value is "client1", so the database reflects the correct value.

    So, this seems to be a problem with the function that performs the string replacements on the "client[client_id]" portion of the "Website path" when populating the "PHP open_basedir" field on the website's Options tab.

    If this behavior is not in any way intentional, I'm happy to open a bug report.

    And, unfortunately, recreating this particular site is not an option at the moment.
  4. erosbk

    erosbk New Member

    Good, you just need to check related tables to verify if client0 is there and update those values. php_openbasedir is not the only affected by this "bug". Check too "/etc/passwd" and "/etc/group" files too to see if client0 is present there, and correct them if needed.

    Could you post which version of ispconfig are u using? I have this bug in ispconfig, but I have vms testing

  5. cbj4074

    cbj4074 Member

    I have searched the entire ISPConfig database for the string '%client0%' and only 5 results were found:

    4 matches inside table sys_datalog

    1 match inside table web_domain

    The first result-set contains logs of the changes (in serialized format) to the Web Domain, and the second result-set contains the php_open_basedir string that I cited in my original post.

    /etc/passwd and /etc/group are accurate; they contain "client1" where appropriate, instead of "client0".

    So, it appears as though the client ID is correct everywhere, except for the in the php_openbasedir field of the Options tab (which, of course, corresponds to the `web_domain`.`php_open_basedir` column in the database).

    I'm running ISPConfig

    I opened a bug for this issue, too:
    Last edited: Mar 30, 2012
  6. falko

    falko Super Moderator ISPConfig Developer

    We've just fixed this in SVN. :)
  7. erosbk

    erosbk New Member

    Falko, did you recall where the error was? thanks!
  8. cbj4074

    cbj4074 Member

    Yup, it's fixed! I just deleted the contents of the "PHP open_basedir" field and hit "Save", and the value is now 1 instead of 0. Thanks again for addressing this.

Share This Page