This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 405061

Summary: Line longer than the maximum allowed (255 characters)
Product: [Fedora] Fedora Reporter: John Ellson <john.ellson>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.3.5-2.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-27 02:18:41 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 235704    
Attachments:
Description Flags
/var/cache/cups/remote.cache
none
/var/cache/cups/ppds.dat
none
file returned from above python incantation none

Description John Ellson 2007-11-29 15:49:07 EST
Description of problem:
I want to turn on the banner page for printing to a shared network on our
corporate network.  I'm assuming I do this through "Set Printer Options"
on the printer entry on the CUPS web page?

Selecting "Set Printer Options" results in a web page containing the error message:
    "Line longer than the maximum allowed (255 characters)"

The (local) URL for the page with the error message is:
    http://localhost:631/admin/?op=set-printer-options&printer_name=mta54xb

Version-Release number of selected component (if applicable):
cups-1.3.4-4.fc8.x86_64

How reproducible:
100%

Steps to Reproduce:
1.http://localhost:631/printers/?QUERY=mta54
2. click on "Set Printer Options"
3.
  
Actual results:
http://localhost:631/admin/?op=set-printer-options&printer_name=mta54xb
containing the error message: "Line longer than the maximum allowed (255
characters)"

Expected results:
No artificially low limits.
Ability to change printer options (assuming this is the right place to do it)

Additional info:
I thought gtklp might provide another way to set this option, but it can't
handle the number of share printers we have on our network.
Comment 1 Tim Waugh 2007-11-30 08:47:27 EST
Please attach the PPD for that printer.  I suspect it has a line whose length
exceeds 255 characters, and PPD parsers are required to treat this as an error
according to the PPD spec.
Comment 2 John Ellson 2007-11-30 09:01:42 EST
Where do I find the ppd?   This is a remote printer provided via cups, not a
locally attached printer.   I'll attach /var/cache cups/remote.cache
in case thats what you need?
Comment 3 John Ellson 2007-11-30 09:02:47 EST
Created attachment 273801 [details]
/var/cache/cups/remote.cache
Comment 4 John Ellson 2007-11-30 09:08:06 EST
Created attachment 273811 [details]
/var/cache/cups/ppds.dat

Perhaps /var/cache/cups/ppds.dat contains the ppd?   But its in some binary
format.
Comment 5 Tim Waugh 2007-11-30 09:17:20 EST
Sorry, I should have pointed you to the location:

/etc/cups/ppd/mta54xb.ppd

is what I need.  Thanks.
Comment 6 Tim Waugh 2007-11-30 09:34:05 EST
Oh, I just saw your comment about it being a remote printer.  Then please do this:

python -c 'import cups; c=cups.Connection(); print c.getPPD("mta54xb.ppd")'

This will show you the location of a temporary file holding the PPD.  Please
attach that file.
Comment 7 Tim Waugh 2007-11-30 10:24:38 EST
I mean: python -c 'import cups; c=cups.Connection(); print c.getPPD("mta54xb")'
Comment 8 John Ellson 2007-11-30 12:29:51 EST
Created attachment 274031 [details]
file returned from above python incantation
Comment 9 John Ellson 2007-11-30 12:47:24 EST
Looks like the offending line is in a comment?  Perhaps the 255 char limit
shouldn't apply to comments?

I hate to say this ;-)   but Windows users around here aren't having any
problems with this printer.
Comment 10 Tim Waugh 2008-01-09 07:13:09 EST
That PPD was generated by an older version of foomatic -- newer versions do not
present this problem.

However, CUPS could probably be a little more tolerant of this particular problem.

I've reported this upstream, with a suggested patch:
  http://cups.org/str.php?L2662
Comment 11 Tim Waugh 2008-01-09 12:45:42 EST
That patch was rejected upstream.  However, I think we'll need to carry it for a
short while.  Applied in CVS.
Comment 12 Fedora Update System 2008-01-22 10:31:20 EST
cups-1.3.5-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cups'
Comment 13 Tim Waugh 2008-01-23 08:07:38 EST
Test update works for me.
Comment 14 Fedora Update System 2008-01-27 02:18:30 EST
cups-1.3.5-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.