1.5.0 error in pdf
Moderator: Thorsten
1.5.0 error in pdf
Hi, first of all congratulations for this version.
System Information
phpMyFAQ Version
phpMyFAQ 1.5.0
Server Software
Apache
PHP Version
PHP 4.3.11
PHP Memory Limit
Register Globals
on
Safe Mode
off
Database Client Version
4.0.25
Database Server Version
4.0.25-standard
Webserver Interface
APACHE
when i create a pdf
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 120
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 121
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 122
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 131
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 132
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 133
%PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream xÅ“mPËRÂ0Ã
System Information
phpMyFAQ Version
phpMyFAQ 1.5.0
Server Software
Apache
PHP Version
PHP 4.3.11
PHP Memory Limit
Register Globals
on
Safe Mode
off
Database Client Version
4.0.25
Database Server Version
4.0.25-standard
Webserver Interface
APACHE
when i create a pdf
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 120
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 121
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 122
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 131
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 132
Warning: Cannot modify header information - headers already sent by (output started at /home/acceso/public_html/phpmyfaq150/font/helveticai.php:30) in /home/acceso/public_html/phpmyfaq150/pdf.php on line 133
%PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream xÅ“mPËRÂ0Ã
Hi,
I'll take a look at this issue.
bye
Thorsten
I'll take a look at this issue.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
error in pdf
in windows installation works fine
System Information
phpMyFAQ Version
phpMyFAQ 1.5.0
Server Software
Apache/2.0.53 (Win32) mod_ssl/2.0.53 OpenSSL/0.9.7f PHP/5.0.4
PHP Version
PHP 5.0.4
PHP Memory Limit
Register Globals
on
Safe Mode
off
Database Client Version
4.1.7
Database Server Version
4.1.11
Webserver Interface
APACHE2HANDLER
System Information
phpMyFAQ Version
phpMyFAQ 1.5.0
Server Software
Apache/2.0.53 (Win32) mod_ssl/2.0.53 OpenSSL/0.9.7f PHP/5.0.4
PHP Version
PHP 5.0.4
PHP Memory Limit
Register Globals
on
Safe Mode
off
Database Client Version
4.1.7
Database Server Version
4.1.11
Webserver Interface
APACHE2HANDLER
Interesting, it appears that the trailing LF from the font file is causing PHP to throw these errors. Once I modified the fonts/helveticai.php and fonts/helvetica.php files to remove them, the script functions normally when using these fonts. I opened the files in vim and deleted the final "^M" character in the file, which seems to work.
I've observed this behavior under both Linux and MacOS X at this point, and have verified the quick hackish solution under Linux. It appears that the Windows version may expect the final LF to be there in any case.
I've observed this behavior under both Linux and MacOS X at this point, and have verified the quick hackish solution under Linux. It appears that the Windows version may expect the final LF to be there in any case.
Confirmation
Confirmed fix here as well - thanks for finding that!
I also checked my old 1.4.10 and 1.4.7 installs and they appear to have shipped without the extra LF.
Edit: Note that you need to change all font faces that you use - helveticabi.php if you use bold sans-serif, etc. There is an extra line feed at the end of each line, but removing only the final one is sufficient. This indicates that it was last developed on windows, then copied straight over instead of converting CR/LF entries - also explains why the individual above has no problems on windows.
For a quick (but also correct) fix, run 'dos2unix fonts/*.php fonts/makefont/*.php'
I also checked my old 1.4.10 and 1.4.7 installs and they appear to have shipped without the extra LF.
Edit: Note that you need to change all font faces that you use - helveticabi.php if you use bold sans-serif, etc. There is an extra line feed at the end of each line, but removing only the final one is sufficient. This indicates that it was last developed on windows, then copied straight over instead of converting CR/LF entries - also explains why the individual above has no problems on windows.
For a quick (but also correct) fix, run 'dos2unix fonts/*.php fonts/makefont/*.php'
Hi,
you're right. I'll fix all font files for 1.5.1! Thanks a lot!
bye
Thorsten
you're right. I'll fix all font files for 1.5.1! Thanks a lot!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
the patched files will be included in 1.5.1.
bye
Thorsten
the patched files will be included in 1.5.1.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist