ISPConfig 3 Help

Discussion in 'Installation/Configuration' started by pitchinnate, Aug 2, 2011.

  1. pitchinnate

    pitchinnate New Member

    I am running ISPConfig 3.0.3.3 on CentOS 5.6

    A few problems and I think they are all related. First off when I go to the Monitors none of the monitors work they all say:

    No log data available at the moment. Please check again later.

    Second when I create a client, or site, or just about anything I see the job added to the job queue and it is processed correctly without any errors being displayed. I have set log level to debug and get responses like this:

    2011-08-02 13:36 server.hostname.net Debug Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    2011-08-02 13:36 server.hostname.net Debug Processed datalog_id 93
    2011-08-02 13:36 server.hostname.net Debug Found 1 changes, starting update process.
    2011-08-02 13:36 server.hostname.net Debug Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock

    I have check all over the place for an error that may occur but I can't find an error in any logs. When I add a client first off no user gets added into Linux (cat /etc/passwd) and no group gets created. According to ISPConfig the most recent one I tried to add should have a user name of web17 and a group name of client13. Also if I go to /var/www/clients/ there is no folder created for client13.

    I do have a client1 that I added a longtime ago and everything works fine for it. The only thing I know that has changed since then is in the php.ini file I added some disable_functions but I have tried changing this back to no functions disabled at all and restarted apache and it makes no difference.

    Anyone have any ideas as to why it seems as though ISPConfig can't make changes to the system at all?
     
  2. till

    till Super Moderator

    Thats the most likely reason for your problems. ISPConfig uses e.g. the exec function to add a user, if you disable thet, no users will get added anymore. There might be more then one php.ini file on your system, please check all these files and make sure that no functions are disabled.
     
  3. pitchinnate

    pitchinnate New Member

    php.ini disabled functions

    I have tested to make sure the exec command is working by creating a php script under the client1 website it seems to be working fine. Here is the script I wrote:

    <?
    $ping_ex = exec("ping -c2 google.com", $ping_result, $pr);

    if (count($ping_result) > 1){
    echo "ping online - response";
    foreach($ping_result as $key => $val) {
    echo "{$ping_result[$key]} <br />";
    }
    } else {
    echo 'ping offline - response';
    }
    ?>

    I get a valid response and it displays the ping for me.

    Anything else you can think of that would prevent ISPConfig from being able to execute commands?
     
  4. till

    till Super Moderator

    You can not test it like that. What you tested is if exec commands are allowed in this single website of client 1, but the ispconfig server part ispconfig is a shell script and does not run in apache and additionaly, every website can have its own php.ini file. So if you want to test exec commands, you would have to write a shell script in php which comntains a exec statement.
     
  5. pitchinnate

    pitchinnate New Member

    Shell script

    Ok I did what you said and created a shell script (/usr/local/ispconfig/server/test.sh) which has the following lines in it:

    clear

    /usr/bin/php -q /usr/local/ispconfig/server/test.php

    I then created test.php and put the same thing as the other php file I created (pinging google with the exec command).

    I then ran test.sh as both root and as user ispconfig and it completed successfully for both. Do I need to run the script as a different user? What user do the cron jobs run under? All the files are owned by ispconfig user.
     
  6. CSsab

    CSsab New Member

    I install xdebug from here because I am hopeless with php:
    http://xdebug.org/

    I can't guarantee that it will help you but ...
    On Debian based servers here is how:

    apt-get install php5-dev

    cd /tmp

    wget http://xdebug.org/files/xdebug-2.1.2.tgz

    tar xvfz xdebug-2.1.2.tgz

    cd xdebug-2.1.2/

    phpize


    (you should get this output)
    Zend Module Api No: 20090626
    Zend Extension Api No: 220090626

    if you don't then something is wrong - if you do then go ahead and configure.

    ./configure
    make
    (< this makes xdebug.so)

    cp modules/xdebug.so /usr/lib/php5/20090626

    vi /etc/php5/cli/php.ini

    and put in this line:

    zend_extension = /usr/lib/php5/20090626/xdebug.so

    /etc/init.d/apache2/restart
    /etc/init.d/mysql/restart


    make clean
    cd ..
    rm -rf xdebug-2.1.2*


    Now run some php scripts and see what is going on, for example:

    php -i /usr/local/ispconfig/server/cron_daily.php
     
    Last edited: Aug 3, 2011
  7. pitchinnate

    pitchinnate New Member

    Xdebug Output

    I did what you recommend and installed xdebug and ran /usr/local/ispconfig/server/server.php and here is the output (attachment test3.txt). Nothing stood out to me but I don't really know what I am looking for.
     

    Attached Files:

  8. pitchinnate

    pitchinnate New Member

    More tests

    Just to experiement I modified my php file that ran an exec command from a ping command to useradd command. Here is the command I created.
    useradd -g client1 web22

    Also instead of running the test.sh file from shell I created a cron job to run it and it ran fine and created the user without a problem.

    Any ideas at all?
     
  9. CSsab

    CSsab New Member

    There is no point in that I think - what you want is to repair your system.

    I am no expert but from your output it would appear that there is something wrong with your PHP5.

    These lines:
    G_BROKEN_FILENAMES => 1
    _ => /usr/bin/php


    Like till said you need to fix your php.ini files - something is not working as it should be.

    Which one did you edit?

    Commonly they can be is /etc/php5/ ... subdirectories.
    Did you edit all of them?

    If I was stuck like this, I would to get a new php.ini from your version in /var/cache/apt/archives.

    Then I would compare all uncommented and decide which changes you have made and repair your working config like that.

    Just as some advise for the future which I have learned the hard way - after you have installed your system as per one of the supported setups - try to stay away from the command line as much as possible.
    Good luck.
     

Share This Page