HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   ISPConfig 3 Help (http://www.howtoforge.com/forums/showthread.php?t=53633)

pitchinnate 2nd August 2011 20:21

ISPConfig 3 Help
 
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?

till 2nd August 2011 20:26

Quote:

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

pitchinnate 2nd August 2011 21:08

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?

till 2nd August 2011 22:16

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.

pitchinnate 2nd August 2011 23:42

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.

CSsab 3rd August 2011 14:29

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

pitchinnate 3rd August 2011 16:47

Xdebug Output
 
1 Attachment(s)
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.

pitchinnate 3rd August 2011 18:10

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?

CSsab 4th August 2011 07:26

Quote:

Originally Posted by pitchinnate (Post 260882)
Just to experiement I modified my php file that ran an exec command from a ping

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.


All times are GMT +2. The time now is 01:26.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.