FOG 1.0.1 on Debian 7.5 PrinterManager Error pulling printer list
- 
 Hello, 
 I have today reported some errors, after my update from 0.32 to 1.0.1.
 [url]http://fogproject.org/forum/threads/afte-1-0-1-update-no-printer-managment-no-snap-in-no-domain-regristration.10578/[/url]After I could not solve the problems, I have now set up a complete new system. Clean Install with Debian 7.5 and Fog 1.0.1. 
 Now it looks like that it works… Only the print manager still makes problems.
 I have no idea more:If I use Refresh Printers (FOG Tray) 
 [QUOTE]
 22.05.2014 16:39 FOG::printerManager Printer update was request from fog tray…
 22.05.2014 16:39 FOG::printerManager Error pulling printer list…
 22.05.2014 16:39 FOG::printerManager Der Remoteserver hat einen Fehler zurückgegeben: (500) Interner Serverfehler.
 22.05.2014 16:39 FOG::printerManager bei System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
 bei System.Net.WebClient.DownloadString(Uri address)
 bei FOG.PrinterManager.pullNewServerList()
 22.05.2014 16:39 FOG::printerManager Management level = 0
 22.05.2014 16:39 FOG::printerManager This host is set to NO MANAGEMENT, we will exit now.
 [/QUOTE]
 But the PrinterManager is activated, in the Host Configuration and in FOG GUIand by it self: 
 [QUOTE] 22.05.2014 16:43 FOG::printerManager Error pulling printer list…
 22.05.2014 16:43 FOG::printerManager Der Remoteserver hat einen Fehler zurückgegeben: (500) Interner Serverfehler.
 22.05.2014 16:43 FOG::printerManager bei System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
 bei System.Net.WebClient.DownloadString(Uri address)
 bei FOG.PrinterManager.pullNewServerList()
 22.05.2014 16:43 FOG::printerManager Failed to connect to fog server!
 22.05.2014 16:43 FOG::printerManager This is typically caused by a network error![/QUOTE]Apache Error.log: 
 [QUOTE][Thu May 22 16:36:44 2014] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u9 configured – resuming normal operations
 [Thu May 22 16:36:48 2014] [error] [client 10.231.194.28] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /var/www/fog/lib/db/MySQL.class.php on line 95
 [Thu May 22 16:36:48 2014] [error] [client 10.231.194.28] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/fog/lib/db/MySQL.class.php on line 156
 [Thu May 22 16:36:48 2014] [error] [client 10.231.194.28] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /var/www/fog/lib/db/MySQL.class.php on line 95
 [Thu May 22 16:36:48 2014] [error] [client 10.231.194.28] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/fog/lib/db/MySQL.class.php on line 156
 [Thu May 22 16:36:48 2014] [error] [client 10.231.194.28] PHP Warning: mysql_real_escape_string(): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /var/www/fog/lib/db/MySQL.class.php on line 253
 [Thu May 22 16:36:48 2014] [error] [client 10.231.194.28] PHP Warning: mysql_real_escape_string(): A link to the server could not be established in /var/www/fog/lib/db/MySQL.class.php on line 253
 [Thu May 22 16:36:48 2014] [error] [client 10.231.194.28] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /var/www/fog/lib/db/MySQL.class.php on line 95
 [Thu May 22 16:37:02 2014] [error] [client 10.231.194.50] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/fog/lib/fog/FOGBase.class.php on line 164
 [Thu May 22 16:37:22 2014] [error] [client 10.231.194.50] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/fog/lib/fog/FOGBase.class.php on line 164
 [COLOR=#ff0000][Thu May 22 16:37:49 2014] [error] [client 10.231.194.28] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/fog/lib/fog/FOGBase.class.php on line 164[/COLOR]
 [/QUOTE]I have no ideas more… Does anyone have an idea? otherwise I have to play my 0.32 backup back. 
- 
 It seems like there is a bad call somewhere as the actual name for the printer class is PrinterAssociationManager.class We are looking into this right now. 
- 
 Found the issue, resolved in revision 1717. Please update your FOG version. 
- 
 Cool! Where can I download the latest update, and how do I install it ? The lastest file on sourceforce i can see is 1.0.1 from [FONT=sans-serif][COLOR=#555555]2014-05-13 ?[/COLOR][/FONT] 
- 
 
- 
 After updating, it still wasn’t working for me until I added “\n” to the end of the print statement when the printer type isn’t a Network or iPrint printer (by the way does the printer class even set a type? I couldn’t find it anywhere). After that it worked, but it was trying to add a blank printer for every real printer I had: 
 [CODE] 5/22/2014 2:05 PM FOG::PrinterManager Adding new printers to host…
 5/22/2014 2:05 PM FOG::PrinterManager 6 found on server side.
 5/22/2014 2:05 PM FOG::PrinterManager Installation requested for
 5/22/2014 2:05 PM FOG::PrinterManager Printer Installed:
 5/22/2014 2:05 PM FOG::PrinterManager Installation requested for
 5/22/2014 2:05 PM FOG::PrinterManager Printer Installed:
 5/22/2014 2:05 PM FOG::PrinterManager Installation requested for
 5/22/2014 2:05 PM FOG::PrinterManager Printer Installed:
 5/22/2014 2:05 PM FOG::PrinterManager Printer already installed Test Printer1
 5/22/2014 2:05 PM FOG::PrinterManager Printer already installed Test Printer2
 5/22/2014 2:05 PM FOG::PrinterManager Printer already installed Test Printer3[/CODE]Not a big deal since nothing happens (I think), but I couldn’t figure out why, so I just hacked around it and this is working perfectly for me: 
 [CODE]foreach ($Printers AS $Printer)
 {
 // Send the printer based on the type.
 if ($Printer->get(‘type’) == ‘Network’)
 $return = ‘|||’.$Printer->get(‘name’).‘||’.($Host->getDefault($Printer->get(‘id’))?‘1’:‘0’);
 else if ($Printer->get(‘type’) == ‘iPrint’)
 $return = $Printer->get(‘port’).‘|||’.$Printer->get(‘name’).‘||’.($Host->getDefault($Printer->get(‘id’))?‘1’:‘0’);
 else
 $return = $Printer->get(‘port’).‘|’.$Printer->get(‘file’).‘|’.$Printer->get(‘model’).‘|’.$Printer->get(‘name’).‘|’.$Printer->get(‘ip’).‘|’.($Host->getDefault($Printer->get(‘id’))?‘1’:‘0’);if (!($return == '|||||0')) print base64_encode($return)."\n"; }[/CODE]
- 
 [quote=“naeren, post: 27894, member: 24314”]After updating, it still wasn’t working for me until I added “\n” to the end of the print statement when the printer type isn’t a Network or iPrint printer (by the way does the printer class even set a type? I couldn’t find it anywhere). After that it worked, but it was trying to add a blank printer for every real printer I had: 
 [CODE] 5/22/2014 2:05 PM FOG::PrinterManager Adding new printers to host…
 5/22/2014 2:05 PM FOG::PrinterManager 6 found on server side.
 5/22/2014 2:05 PM FOG::PrinterManager Installation requested for
 5/22/2014 2:05 PM FOG::PrinterManager Printer Installed:
 5/22/2014 2:05 PM FOG::PrinterManager Installation requested for
 5/22/2014 2:05 PM FOG::PrinterManager Printer Installed:
 5/22/2014 2:05 PM FOG::PrinterManager Installation requested for
 5/22/2014 2:05 PM FOG::PrinterManager Printer Installed:
 5/22/2014 2:05 PM FOG::PrinterManager Printer already installed Test Printer1
 5/22/2014 2:05 PM FOG::PrinterManager Printer already installed Test Printer2
 5/22/2014 2:05 PM FOG::PrinterManager Printer already installed Test Printer3[/CODE]Not a big deal since nothing happens (I think), but I couldn’t figure out why, so I just hacked around it and this is working perfectly for me: 
 [CODE]foreach ($Printers AS $Printer)
 {
 // Send the printer based on the type.
 if ($Printer->get(‘type’) == ‘Network’)
 $return = ‘|||’.$Printer->get(‘name’).‘||’.($Host->getDefault($Printer->get(‘id’))?‘1’:‘0’);
 else if ($Printer->get(‘type’) == ‘iPrint’)
 $return = $Printer->get(‘port’).‘|||’.$Printer->get(‘name’).‘||’.($Host->getDefault($Printer->get(‘id’))?‘1’:‘0’);
 else
 $return = $Printer->get(‘port’).‘|’.$Printer->get(‘file’).‘|’.$Printer->get(‘model’).‘|’.$Printer->get(‘name’).‘|’.$Printer->get(‘ip’).‘|’.($Host->getDefault($Printer->get(‘id’))?‘1’:‘0’);if (!($return == '|||||0')) print base64_encode($return)."\n"; }[/CODE][/quote]Which part did you add the \n to? 
- 
 I’ve found and added the \n on the last part of the checks. Sorry I missed it. 
- 
 No worries. Thank you! 
- 
 Installed the last SVN 1726… and didn´t work: 
 Started from Fog Tray
 [QUOTE]23.05.2014 07:54 FOG::printerManager Printer update was request from fog tray…
 23.05.2014 07:54 FOG::printerManager Management level = 1
 23.05.2014 07:54 FOG::printerManager Adding new printers to host…
 23.05.2014 07:54 FOG::printerManager 0 found on server side.
 23.05.2014 07:55 FOG::printerManager Failed to connect to fog server!
 23.05.2014 07:55 FOG::printerManager This is typically caused by a network error!
 23.05.2014 07:55 FOG::printerManager Sleeping for 1 minute.
 23.05.2014 07:56 FOG::printerManager Failed to connect to fog server!
 23.05.2014 07:56 FOG::printerManager This is typically caused by a network error!
 23.05.2014 07:56 FOG::printerManager Sleeping for 1 minute.[/QUOTE]
 And from self:
 [QUOTE] 23.05.2014 07:58 FOG::printerManager Failed to connect to fog server!
 23.05.2014 07:58 FOG::printerManager This is typically caused by a network error!
 23.05.2014 07:58 FOG::printerManager Sleeping for 1 minute.
 [/QUOTE]
 Apache Error.log:
 [QUOTE][Fri May 23 07:48:48 2014] [error] [client 10.231.194.28] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/fog/lib/fog/FOGBase.class.php on line 164
 [Fri May 23 07:49:49 2014] [error] [client 10.231.194.28] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/fog/lib/fog/FOGBase.class.php on line 164[/QUOTE]The message is now different in the fog.log, but the result is equal. 
- 
 SAME PROBLEM: [Fri May 23 09:33:35 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164 
 [Fri May 23 09:34:36 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164
 [Fri May 23 09:35:36 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164
 [Fri May 23 09:35:41 2014] [error] [client 172.16.64.224] File does not exist: /var/www/html/fog/management/css/images, referer: [url]http://172.16.10.230/fog/management/index.php?node=about&sub=settings[/url]
 [Fri May 23 09:35:41 2014] [error] [client 172.16.64.224] File does not exist: /var/www/html/fog/management/css/images, referer: [url]http://172.16.10.230/fog/management/index.php?node=about&sub=settings[/url]
 [Fri May 23 09:35:41 2014] [error] [client 172.16.64.224] File does not exist: /var/www/html/fog/management/css/images, referer: [url]http://172.16.10.230/fog/management/index.php?node=about&sub=settings[/url]
 [Fri May 23 09:36:37 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164
 [Fri May 23 09:37:38 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164
 [Fri May 23 09:38:38 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164
 [Fri May 23 09:39:39 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164
 [Fri May 23 09:40:39 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164
 [Fri May 23 09:41:40 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164
 [Fri May 23 09:42:40 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164
 [Fri May 23 09:43:41 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164
 [Fri May 23 09:44:41 2014] [error] [client 172.16.35.14] PHP Fatal error: Class ‘PrinterManagementAssociationManager’ not found in /var/www/html/fog/lib/fog/FOGBase.class.php on line 164
- 
 When you updated to svn, did you reinstall with ./installfog.sh or just update what was in your svn folder? I assure you, this Error has since been corrected: (NOTE THERE’S NO FILES RETURNED 
 [code][root@mastaweb fog]# grep -rl ‘PrinterManagementAssociation’ .
 [root@mastaweb fog]# [/code]If PrinterManagementAssociationManager was found it would be in /var/www/{FOGWEBDIR}/service/PrinterManager.php 
 If you can edit the file, Change the part that says PrinterManagementAssociationManager to:
 PrinterAssociationManager
- 
 I did the update according to the instructions from: [url]http://www.fogproject.org/wiki/index.php/SVN[/url] 
 so it was a reinstall with ./installfog.sh
- 
 I’ve tried it out with a fresh install and it’s working for me. Maybe the new file isn’t overwriting the old one. I run into weird problems when updating a lot of times unless I delete the web directory (rm -rf /var/www/fog) before reinstalling. 


