Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th March 2012, 13:02
flyguy flyguy is offline
Junior Member
 
Join Date: Mar 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP Warning: 7 is not a valid MySQL-Link resource

OK, I've been through all the related threads I could find. The problem is that the cron list of ISPConfig does not get executed.

My error response when executing

/usr/local/ispconfig/server/server.sh

is littered with

PHP Warning: mysql_real_escape_string(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 184
PHP Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 104

errors. I' ve checked the mysql access using

mysql -h localhost -u root dbispconfig -p

with the user(root) and password as stored in

/usr/local/ispconfig/server/lib/config.inc.php
/usr/local/ispconfig/server/lib/mysql_clientdb.conf

Ive done

cd /tmp
wget http://www.ispconfig.org/downloads/I...-stable.tar.gz
tar xvfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install
php -q update.php

The /var/log/mysql.err and /var/mysql.log files are empty. I've had to disable the /usr/local/ispconfig/server/server.sh entry in crontab just to keep my sever from misbehaving.

I have
IServer: 109.74.195.109 (Debian Squeeze/Sid)
ISPConfig 3.0.4.3

Everything worked fine up to the point where I did general system upgrade. My /etc/hosts file looks like this:

127.0.0.1 localhost localhost.localdomain
109.74.195.109 www.subxplore.co.za

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Anything that I can do next to solve this problem?
Reply With Quote
Sponsored Links
  #2  
Old 14th March 2012, 16:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,986
Thanks: 840
Thanked 5,647 Times in 4,457 Posts
Default

The file /usr/local/ispconfig/server/lib/config.inc.php may not contain the mysql root user or password. If it conatisn the user root on your setup, then you have a installtion error. The mysql user used by ispconfig to connect with the database is always named "ispconfig". The file mysql_cientdb.conf contains the root user which is only used to create new mysql databases.

The error can also be caused by wrong settings in the mysql my.cnf file e.g. when you set timeout values too low.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 15th March 2012, 16:35
flyguy flyguy is offline
Junior Member
 
Join Date: Mar 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks till , good to know what is happening behind the scenes.

I changed the root users to ispconfigs, and experimented a bit. The mails get delivered, and adding websites and databases works. BUT the cron list is not deleted, which causes all the actions to be repeated whenever /usr/local/ispconfig/server/server.sh is executed.

Is there any way to remove the tasks from the cronlist?
Reply With Quote
  #4  
Old 15th March 2012, 16:45
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,986
Thanks: 840
Thanked 5,647 Times in 4,457 Posts
Default

Quote:
BUT the cron list is not deleted
You mean sys_datalog? Records in that table have to be kept for 30 days and get removed after that time automatically, do nott delete any records in the database manually or the systemwill fail.

Quote:
Is there any way to remove the tasks from the cronlist?
The dont have to be removed. If they get executed again then the permissions of your database sers are still wrong as a repeated execution indicates that the permissions of the ispconfig mysql user or on multiserver systems the ispcsrv users in the main database are wrong.

Your sytem seams to be really messed up as someone must have altered a lot of ispconfig files manually and entered wrong users there or changed permissions in mysql. You should consider to run a ispconfig update and let the ispconfig updater on all servers that belong to the cluster and let the ispconfig updater reconfigure the permissions in the mysql database.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 15th March 2012, 16:49
flyguy flyguy is offline
Junior Member
 
Join Date: Mar 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, I mean the ISPconfig jobqueue under the monitor tab. Wrong wording, sorry.
Reply With Quote
  #6  
Old 15th March 2012, 17:06
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,986
Thanks: 840
Thanked 5,647 Times in 4,457 Posts
Default

Login to ispconfig, go to monitor > System state > system log and select loglevel error. If there are any errors listed, delete them by clicking on the delete icon.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 15th March 2012, 17:22
flyguy flyguy is offline
Junior Member
 
Join Date: Mar 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No errors listed.

The Monitor-> Show services shows something interesting :
Web-Server: Offline
FTP-Server: Online
SMTP-Server: Online
POP3-Server: Online
IMAP-Server: Online
mySQL-Server: Online

but my apache server is running. And all the sites are served. The System -.> system services list the web server as activated. Why would it report here as not running?
Reply With Quote
  #8  
Old 15th March 2012, 17:34
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,986
Thanks: 840
Thanked 5,647 Times in 4,457 Posts
Default

Quote:
No errors listed.
Then you might want to debug the server process and post the output:

http://www.faqforge.com/linux/debugg...-of-a-failure/

Quote:
but my apache server is running. And all the sites are served. The System -.> system services list the web server as activated. Why would it report here as not running?
Check that the apache server listens to IP 127.0.0.1 too. Or your mysql permissions are wrong as I explained in the posts above so that the ispconfig server scrippt can not update the server status anymore.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 16th March 2012, 14:30
flyguy flyguy is offline
Junior Member
 
Join Date: Mar 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Went through everything. In the end, my problem seems to be solved when I edit the database according to this link:

http://www.howtoforge.com/forums/arc...p/t-54928.html
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3.0.3.3 fresh instalation - email tab is empty artur_gib Installation/Configuration 14 28th January 2014 20:02
Not removing mysql jobs in pool stresao General 13 28th April 2011 02:07
Odd Spam behaviour itsnedkeren Installation/Configuration 1 11th December 2010 15:20
libWand.so.10 error Taxick Installation/Configuration 8 3rd May 2009 02:27
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 10:29


All times are GMT +2. The time now is 03:38.


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