apache / mysql errors

> also...
>
> I figured out the mysql module error and the VirtualHost thing.
>
> I stopped the VirtualHost error by commenting out the first line of
> the /etc/apache2/sites-available/default file. This statement is
> loaded elsewhere. It now reads
>
> #NameVirtualHost *
>
>
> To get rid of the mysql module error, I took the
> /etc/php5/apache2/php.ini file and edited out the load module line at
> the end. I did the same thing for the cli file. This module is loaded
> elsewhere because a phpinfo shows it.
>
> I have not poked around enough to figure out where these are already loaded.
>
> On Sat, Mar 21, 2009 at 11:22 AM, Tom Haynes wrote:
>> Thanks for the reply.
>>
>> I restarted ehcp, and got the logs below.
>>
>> checking apache syntax Syntax OK
>>
>> apache configde hata gorunmuyor... yukluyor.
>> Executing: /etc/init.d/apache2 reload * Reloading web server config apache2
>> ...done.
>>
>>
>> miscconfig:Array
>> (
>> [dnsip] => 75.xxxxxxx
>> [adminname] => xxx@yyyy
>> [adminemail] => xxx@yyyy.org
>> [ehcpdir] => /var/www/vhosts/ehcp
>> [banner] => this is banner.. you may write here somthing using > href="?op=options">server settings
>>
>> [defaulttemplate] => xp3
>> [defaultlanguage] => en
>> [updatehostsfile] => on
>> [messagetonewuser] => Dns servers for our server:
>> ...........
>>
>> (This will be sent to new users)
>> [backupdir] => /var/backup
>> [localip] => 10.1.10.103
>> )

>> localhost)
>> update complete
>> trying re-connecting to mysql db..
>> reconnect successfull.
>> Array
>> (
>> )
>> Array
>> (
>> )
>>
>>
>> ehcp V.0.25- Daemon loop number:1
>> -----------daemon suspended for 10 sec ---------
>> Array
>> (
>> )
>> Array
>> (
>> )
>>
>>
>> ehcp V.0.25- Daemon loop number:2
>> -----------daemon suspended for 10 sec ---------
>> Array
>> (
>> )
>> Array
>> (
>> )
>>
>>
>> ehcp V.0.25- Daemon loop number:3
>> -----------daemon suspended for 10 sec ---------
>> trying re-connecting to mysql db..
>> reconnect successfull.
>> Array
>> (
>> )
>> Array
>> (
>> )
>>
>>
>> ehcp V.0.25- Daemon loop number:4
>> -----------daemon suspended for 10 sec ---------
>>
>>
>> On Sat, Mar 21, 2009 at 9:56 AM, bvidinli wrote:
>>> what is lines from /var/log/ehcp.log ?
>>>
>>> normally, ehcp does an apache2 restart only when a new domain added or
>>> syncdomains is issued.
>>>
>>> do
>>> /etc/init.d/ehcp restart
>>> then re-look at logs..
>>>
>>> see you
>>>
>>>
>>> On Sat, Mar 21, 2009 at 1:10 AM, wrote:
>>>> Tom haynes sent a message using the contact form at
>>>> http://www.ehcp.net/?q=contact.
>>>>
>>>> Hello...
>>>> I am wanting to move some personal domains from a hosting service to a
>>>> machine at home. I have tried a couple of things and like EHCP the most so
>>>> far. I have a couple of questions though.
>>>>
>>>> What does this mean in my logs?
>>>> [Fri Mar 20 18:50:26 2009] [notice] Apache/2.2.9 (Ubuntu)
>>>> PHP/5.2.6-2ubuntu4.1 with Suhosin-Patch configured -- resuming normal
>>>> operations
>>>> [Fri Mar 20 18:58:46 2009] [notice] Graceful restart requested, doing
>>>> restart
>>>> [Fri Mar 20 18:58:46 2009] [warn] NameVirtualHost *:0 has no VirtualHosts
>>>> PHP Warning: Module 'mysql' already loaded in Unknown on line 0
>>>>
>>>> Is the webserver supposed to restart every 8 min or so?

Hello
I have the same or a similar problem with ehcp 0.29.07 every 10 minutes aprox. the server reloads the apache2 config, restoring permission folders, etc (eg. I've erased ehcpinfo.html and the file was retored). Im' running server on ubuntu 8.10 server, followed the installation steps from Set Up Ubuntu Server With EHCP (LAMP, DNS, FTP, Mail) from how to forge. I haven't already add any domains because this is my 2nd installation. The previous installation gave me the mentioned error.

Say that the previous version of EHCp that I've used, didn't give any problems of any kind.

Console screen:

server login: * Reloading web server config apache2
* Reloading web server config apache2
* Reloading web server config apache2
... and so on

Tried to do your previous comment, but I can´t find how to do :
> To get rid of the mysql module error, I took the
> /etc/php5/apache2/php.ini file and edited out the load module line at
> the end. I did the same thing for the cli file. This module is loaded
> elsewhere because a phpinfo shows it.

My ehcp.log is as follows :

ehcp 0.29.07- Daemon loop number:50
-----------daemon suspended for 10 sec ---------

start syncing domains
Executing: mkdir -p /var/www/vhosts/domainname.com/domainname.com
Executing: mkdir -p /var/www/vhosts/domainname.com/domainname.com/httpdocs
Executing: mkdir -p /var/www/vhosts/domainname.com/domainname.com/logs
Executing: mkdir -p /var/www/vhosts/domainname.com/domainname.com/phptmpdir
Executing: chmod a+w /var/www/vhosts/domainname.com/domainname.com/phptmpdir
Executing: touch /var/www/vhosts/domainname.com/domainname.com/logs/error_log
Executing: touch /var/www/vhosts/domainname.com/domainname.com/logs/access_log
Executing: chown vsftpd:nogroup -Rf /var/www/vhosts/domainname.com/domainname.com
Executing: chown root:root -Rf /var/www/vhosts/domainname.com/domainname.com/logs
syncing domains:Array
(
[0] => Array
(
[id] => 71
[host] =>
[reseller] => admin
[panelusername] => domainname.com
[domainname] => domainname.com
[homedir] => /var/www/vhosts/domainname.com/domainname.com
[comment] =>
[status] => active
[serverip] =>
[diskquotaused] =>
[diskquota] =>
[diskquotaovernotified] =>
[diskquotaoversince] =>
[graceperiod] => 7
[apachetemplate] =>
[dnstemplate] =>
[customhttp] =>
)

)

Domain list exported (syncdomains)
passive domains are:Array
(
)

Executing: mkdir -p /var/www/passivedomainsdirs:Array
(
)

executing command: rm -rvf /etc/ehcp/htpasswd_*

executing command: /etc/init.d/apache2 reload
* Reloading web server config apache2
...done.

start syncing sub domains, syncing subdomains:Array
(
)

SUBDOMAINS-Domain list exported (syncSubdomains)

checking apache syntax Syntax OK

apache configde hata gorunmuyor... yukluyor.
Executing: /etc/init.d/apache2 reload * Reloading web server config apache2
...done.

miscconfig:Array
(
[dnsip] => 192.168.0.10
[adminname] =>
[adminemail] =>
[ehcpdir] => /var/www/vhosts/ehcp
[banner] => this is banner.. you may write here somthing using server settings^M

[defaulttemplate] => xp5
[defaultlanguage] => en
[updatehostsfile] => on
[messagetonewuser] => Dns servers for our server:^M
...........^M
^M
(This will be sent to new users)
[backupdir] => /var/backup
[quotaupdateinterval] => 6
[lastquotaupdate] => 2009-04-09 06:51:29
)
updating hosts file: ip: (192.168.0.10) line: (192.168.0.10 www.domainname.com localhost)
update complete
trying re-connecting to mysql db..

reconnect successfull.
Array
(
)
Array
(
)

ehcp 0.29.07- Daemon loop number:51
-----------daemon suspended for 10 sec ---------
Array
(
)
Array
(
)

ehcp 0.29.07- Daemon loop number:52
-----------daemon suspended for 10 sec ---------
Array
(
)
Array
(
)

ehcp 0.29.07- Daemon loop number:53
-----------daemon suspended for 10 sec ---------
Array
(
)
Array
(
)

ehcp 0.29.07- Daemon loop number:54
-----------daemon suspended for 10 sec ---------
Array
(
)
Array
(
)

ehcp 0.29.07- Daemon loop number:55
-----------daemon suspended for 10 sec ---------
trying re-connecting to mysql db..

reconnect successfull.
Array
(
)
Array
(
)

ehcp 0.29.07- Daemon loop number:56
-----------daemon suspended for 10 sec ---------

and so on... Note that I've not restart the machine any time during this log.

Please, help...
Thank you in advance

Regular apache reloads are a feature of ehcp and can be disabled with little effort.
Why we did this: Some domains admins sometime deletes logs dirs or access_log or error_log. This causes problems with apache. So, sync apache command fixes these... Sync apache also sets owner of files to be vsftpd. Otherwise, you wont be able to use files using ftp. It should not change file write modes.. only ownership is set to be vsftpd.
If you describe the problem with file ownerships, i will try to solve it..

Anyway, if you wish to disable regular (Approx each 8min) apache reloads, do this:
* Open classapp.php
find this:
if($i/50==round($i/50)) { # on every 50 sleep interval,
$this->syncDomains(); # this may slow down a bit daemon, may be disabled, only for rebuilding domains in case some log files are deleted accidentally by someone...
}

and delete this part... .. it should be in function daemon()

* To disable of file setup of ehcpinfo.html each time:
open classapp.php again:
find :
$this->executeProg2("cp -f ehcpinfo.html ".$dom['homedir']."/httpdocs/ehcpinfo.html");

delete it...
Thats it..

Unfortunately, there is no gui or easy way to disable all these... maybe i will put in future...

if you need further help, let me know..

Hello

It works!
Thank you.

I've tested a joomla CMS install under ehcp control panel. Normally I use to change the ownership of some neccesery
files/folders, but Sync apache sets the owner of files back to vsftpd. :)

I guess the only solution is to comment out the line in classapp.php!?
(I've also disabled apache reloads...)

Any suggestion?

p.s. nice code, right now am testing it!

you are right,
that is a type of bug, and fixed in latest version of 0.29.09
upgrade your ehcp,
it is fixed.

see you

hello ,
I have a litale problem ... from time to time (2-3 days) my apache stops or somethink like that... i do a /etc/init.d/apache2 restart ad everthink is ok ... how can i solve this , i can't check my site every hour ...

Thank you,

i got similar problems from someone else too,
i dont know if they use latest version of ehcp.
and I dont know the reason for apache stopping. I will try to solve it as soon as we got the reason of that...

As a temporary solution, you can add following to your crontab:

on console, type crontab -e
add following:
*/20 * * * * /etc/init.d/apache2 start

This starts apache every 20 minutes, in case it is stopped... if it is working, does nothing..
This is not a good way, but a temporary solution.
see you.

mysql warnings are not important, you may just ignore it..