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 HowtoForge Supporter

    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

    Code:
    /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 -> example.com -> 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:
    Code:
    /var/www/clients/client[client_id]/web[website_id]
    
    PHP open_basedir:
    Code:
    [website_path]/web:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web
    
    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 HowtoForge Supporter

    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 3.0.3.3, but I have vms testing 3.0.4.3

    Regards
     
  5. cbj4074

    cbj4074 HowtoForge Supporter

    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 3.0.4.3.

    I opened a bug for this issue, too: http://bugtracker.ispconfig.org/index.php?do=details&task_id=2154&project=3
     
    Last edited: Mar 30, 2012
  6. falko

    falko Super Moderator

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

    erosbk New Member

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

    cbj4074 HowtoForge Supporter

    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