You need to log in before you can comment on or make changes to this bug.
It is not possible to download a map image with the Print widget. Some PHP errors are output instead (see below). Fedora Core 2 Chameleon beta 3 20041022 ----------------- PHP errors: [24-Oct-2004 19:46:54] PHP Notice: Undefined variable: file_name in /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml on line 151 [24-Oct-2004 19:46:54] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml:151) in /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml on line 160 [24-Oct-2004 19:46:54] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml:151) in /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml on line 161 [24-Oct-2004 19:46:54] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml:151) in /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml on line 163 [24-Oct-2004 19:46:54] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml:151) in /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml on line 164 [24-Oct-2004 19:46:54] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml:151) in /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml on line 165 [24-Oct-2004 19:46:54] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml:151) in /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml on line 166 [24-Oct-2004 19:46:54] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml:151) in /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml on line 167
This is likely happening because you have "display_errors" set in your php.ini (just a guess). If php starts any type of text output (like a notice or warning), then it is not possible for it to start outputting a file stream. Can you confirm that your php.ini "display_error" entry is set to "On"?
Yes you are right for my settings. But nevertheless the error should not come out.
Changed target to 1.99 Beta 3.
Unfortunately it is a legacy thing that certain aspects of Chameleon require the display of errors to be turned off. I believe it is a requirement of Chameleon set "display_errors" to off. That being said, I agree that this is a pain and should be dealt with. I would propose to close this bug and add a new enhancement to remove this dependancy. As it is all new widgest are hopefully being developed with this in mind.
To clarify, what I meant to say was that I think we should open a new bug as an enhancent for the ENTIRE Chameleon application to be looked at to remove this dependancy.
Makes sense to open a bug for the dependancy. But to make myself clear too, when I set the "display_error" to off. It works, the map image is downloaded. But if I look in errors log produced by PHP I saw the following error: [25-Oct-2004 08:34:25] PHP Notice: Undefined variable: file_name in /home/nsavard/proj/chameleon_beta/htdocs/widgets/download.phtml on line 151
actually there is a bug here ... the code on line 137 tests $szFileName but later (line 148 and line 151) refer incorrectly to $file_name. I've committed the changes, I think this should fix the problem. For the record, Chameleon is supposed to work cleanly with Notices turned on and we should all be testing that way. Note that MS4W comes with notices turned off by default because some of the older apps have not been cleaned up. For production use of Chameleon, we should be recommending to turn off display_errors and use log_errors instead.
Paul this has not been fixed in beta 3 20041101. This was tested on windows by doing the following steps: * loading app http://localhost/chameleon/samples/sample_enhanced.phtml * zooming into an area of canada. * selecting the Print Map button. * in the PrintMap popup selected the download button. * in the popup I get the following error. http://localhost//ms_tmp/4186a4c27ed6a.png Warning: Cannot modify header information - headers already sent by (output started at D:\ms4w\apps\chameleon\htdocs\widgets\download.phtml:167) in D:\ms4w\apps\chameleon\htdocs\widgets\download.phtml on line 212
there was an extra 'echo' that was causing the download to fail in this particular case. Fixed in cvs.
able to preview and download print map for windows using beta 3 20041105
Verified on Fedora Core 2.