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
  #11  
Old 28th May 2010, 20:05
BorderAmigos BorderAmigos is offline
Senior Member
 
Join Date: Apr 2008
Location: San Diego & Tijuana
Posts: 302
Thanks: 26
Thanked 33 Times in 31 Posts
Send a message via MSN to BorderAmigos Send a message via Yahoo to BorderAmigos
Default

There are only 2 occurrences but in the datalogSave function, none in the diffrec function...

$diffstr = $app->db->quote(serialize($diffrec_full));
$username = $app->db->quote($_SESSION["s"]["user"]["username"]);

changed to...

$diffstr = $this->quote(serialize($diffrec_full));
$username = $this->quote($_SESSION["s"]["user"]["username"]);

(my previous hack removed)

... and does not work, error returns.
__________________
System6Hosting.com, ISPConfig 3, Debian.
Reply With Quote
Sponsored Links
  #12  
Old 28th May 2010, 20:23
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,011
Thanks: 826
Thanked 5,379 Times in 4,226 Posts
Default

Quote:
... and does not work, error returns.
Ant which error returns...? I can not guess them
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #13  
Old 28th May 2010, 20:29
BorderAmigos BorderAmigos is offline
Senior Member
 
Join Date: Apr 2008
Location: San Diego & Tijuana
Posts: 302
Thanks: 26
Thanked 33 Times in 31 Posts
Send a message via MSN to BorderAmigos Send a message via Yahoo to BorderAmigos
Default

The same one I previously mentioned:

Code:
Fatal error: Call to a member function quote() on a non-object in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 280
The $old_rec is being declared as array() and seems to not being passed as an object. If I just assign it to equal $new_rec this error goes away.
__________________
System6Hosting.com, ISPConfig 3, Debian.
Reply With Quote
  #14  
Old 28th May 2010, 20:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,011
Thanks: 826
Thanked 5,379 Times in 4,226 Posts
Default

Please post line 280.

Quote:
The $old_rec is being declared as array() and seems to not being passed as an object.
You misinderpreted the error message. It is not talking about passed variables. $old_rec must be an array.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #15  
Old 28th May 2010, 20:44
BorderAmigos BorderAmigos is offline
Senior Member
 
Join Date: Apr 2008
Location: San Diego & Tijuana
Posts: 302
Thanks: 26
Thanked 33 Times in 31 Posts
Send a message via MSN to BorderAmigos Send a message via Yahoo to BorderAmigos
Default

Line 280 is
Code:
$diffstr = $app->db->quote(serialize($diffrec_full));
Changing it to
Code:
$diffstr = $this>quote(serialize($diffrec_full));
Does not fix it.

$diffrec_full comes from
Code:
$tmp = $this->diffrec($record_old, $record_new);
$diffrec_full = $tmp['diff_rec'];
where $record_old and $record_new are passed from $old_rec and $new_rec respectively, one is an object, one is not.
Code:
$old_rec = array();
$new_rec = $this->queryOneRecord("SELECT * FROM $tablename WHERE $index_field = '$index_value'");
------------

Changing
Code:
$old_rec = array();
to
Code:
$old_rec = (object) array();
fixes the error. I don't think I am misinterpreting.
__________________
System6Hosting.com, ISPConfig 3, Debian.

Last edited by BorderAmigos; 28th May 2010 at 20:53.
Reply With Quote
  #16  
Old 28th May 2010, 21:01
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,011
Thanks: 826
Thanked 5,379 Times in 4,226 Posts
Default

Quote:
fixes the error. I don't think I am misinterpreting.
You misinterpreted it. believe me, I have written this library. So undo the change with the object as this might surpress an error and cause the library to fail without error.

The reason for the error message is a typo in line 280, you kissed a "-":

wrong:

$diffstr = $this>quote(serialize($diffrec_full));

correct:

$diffstr = $this->quote(serialize($diffrec_full));
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
BorderAmigos (28th May 2010)
  #17  
Old 28th May 2010, 21:23
BorderAmigos BorderAmigos is offline
Senior Member
 
Join Date: Apr 2008
Location: San Diego & Tijuana
Posts: 302
Thanks: 26
Thanked 33 Times in 31 Posts
Send a message via MSN to BorderAmigos Send a message via Yahoo to BorderAmigos
Default

You're right, I was looking at the wrong file. Local vs. on the server. And there is one additional change...
Code:
$app->db->query($sql);
to
Code:
$this->query($sql);
So that part of datalogSave() contains
Code:
		if($diff_num > 0) {
			//print_r($diff_num);
			//print_r($diffrec_full);
			$diffstr = $this->quote(serialize($diffrec_full));
			$username = $this->quote($_SESSION["s"]["user"]["username"]);
			$dbidx = $primary_field.":".$primary_id;
						
			if($action == 'INSERT') $action = 'i';
			if($action == 'UPDATE') $action = 'u';
			if($action == 'DELETE') $action = 'd';
			$sql = "INSERT INTO sys_datalog (dbtable,dbidx,server_id,action,tstamp,user,data) VALUES ('".$db_table."','$dbidx','$server_id','$action','".time()."','$username','$diffstr')";
			$this->query($sql);
		}
With only the three
$app->db->
locations changed to
$this->
it appears to work now as far as putting the values in the database.

The mail filters do not show as active in ISPConfig 3 interface though, the 'active' column in the table is all 'y'.
__________________
System6Hosting.com, ISPConfig 3, Debian.

Last edited by BorderAmigos; 28th May 2010 at 22:17.
Reply With Quote
  #18  
Old 28th May 2010, 22:19
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,011
Thanks: 826
Thanked 5,379 Times in 4,226 Posts
Default

Quote:
If someone can point out why they need to be manually activated I'd appreciate it.
Compare a activated and non activated record to see which field was set wrong as you inserted the records.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #19  
Old 28th May 2010, 22:23
BorderAmigos BorderAmigos is offline
Senior Member
 
Join Date: Apr 2008
Location: San Diego & Tijuana
Posts: 302
Thanks: 26
Thanked 33 Times in 31 Posts
Send a message via MSN to BorderAmigos Send a message via Yahoo to BorderAmigos
Default

I did that and all the fields in that table look the same.

Some issues still.

Thanks.
__________________
System6Hosting.com, ISPConfig 3, Debian.
Reply With Quote
  #20  
Old 28th May 2010, 22:27
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,011
Thanks: 826
Thanked 5,379 Times in 4,226 Posts
 
Default

Quote:
I did that and all the fields in that table look the same.
No other tables are involved, so there is a difference. Check the data that you insert again. E.g. it matters if you set the value of the active column in upper or lower case.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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
sarg issue while generating reports for squid mail4vij Server Operation 3 31st December 2009 13:12
Ubuntu Server, ISPConfig, Domain name, and problems NYCSavage Server Operation 5 27th November 2009 17:45
Google Apps dayjahone General 19 29th March 2008 17:25
Unable send receive emails vassilis3 Installation/Configuration 15 19th May 2007 14:34
No SPF record. beryl Installation/Configuration 6 17th May 2007 19:52


All times are GMT +2. The time now is 14:18.


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