php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54436 gzip issues with -P PHP -f manpage
Submitted: 2011-03-31 19:58 UTC Modified: 2011-04-05 05:46 UTC
From: philip@php.net Assigned: moacir (profile)
Status: Closed Package: Doc Build problem
PHP Version: 5.3.6 OS: Any
Private report: No CVE-ID: None
 [2011-03-31 19:58 UTC] philip@php.net
Description:
------------
This attempts to use a newChunk() method. The PDF packages use parent::newChunk() 
because it's define in Package/Generic/PDF.php.... but that's not the case here.

Test script:
---------------
philip@water ~/tmp> phd -d pman.xml -P PHP -f manpage
[10:43:21 - Heads up              ] Creating output directory..
[10:43:21 - Indexing              ] Indexing...
[10:47:00 - Indexing              ] Indexing done
[10:47:00 - Rendering Style       ] Running full build
[10:47:02 - Rendering Format      ] Starting PHP-Functions rendering
PHP Fatal error:  Call to undefined method phpdotnet\phd\Package_PHP_Functions::newChunk() in /Users/philip/php/lib/php/phpdotnet/phd/Package/PHP/Functions.php on line 183

Fatal error: Call to undefined method phpdotnet\phd\Package_PHP_Functions::newChunk() in /Users/philip/php/lib/php/phpdotnet/phd/Package/PHP/Functions.php on line 183



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-31 20:07 UTC] philip@php.net
This also applies to closeChunk() usage, although it does not appear defined 
anywhere.
 [2011-04-04 21:48 UTC] philip@php.net
-Summary: Missing package_PHP_Functions::newChunk() +Summary: gzip issues with -P PHP -f manpage
 [2011-04-04 21:48 UTC] philip@php.net
Moacir has helped realize that my errors aren't in SVN, so I suspect they are from old/forgotten local phd edits by 
me as a fresh phd 1.1.0 eliminates the chunking errors.

However, this bug is being changed to deal with the current problem.


philip@water ~/tmp> phd -d pman.xml -P PHP -f manpage
[11:43:25 - Indexing              ] Indexing...
[11:47:15 - Indexing              ] Indexing done
[11:47:15 - Rendering Style       ] Running full build
[11:47:16 - Rendering Format      ] Starting PHP-Functions rendering
[11:47:24 - E_WARNING             ] /Users/philip/php/lib/php/phpdotnet/phd/Package/Generic/Manpage.php:339
	gzopen(./output/php-functions/PHP-input/output.3.gz): failed to open stream: No such file or directory
[11:47:24 - E_WARNING             ] /Users/philip/php/lib/php/phpdotnet/phd/Package/Generic/Manpage.php:341
	gzwrite() expects parameter 1 to be resource, boolean given
[11:47:24 - E_WARNING             ] /Users/philip/php/lib/php/phpdotnet/phd/Package/Generic/Manpage.php:342
	gzwrite() expects parameter 1 to be resource, boolean given
[11:47:24 - E_WARNING             ] /Users/philip/php/lib/php/phpdotnet/phd/Package/Generic/Manpage.php:343
	gzclose() expects parameter 1 to be resource, boolean given

Where the gz errors are repeated for several files. It works for most, but here's the ones that don't:

./output/php-functions/PHP-input/output.3.gz
./output/php-functions/data://.3.gz
./output/php-functions/phar://.3.gz
./output/php-functions/ssh2://.3.gz
./output/php-functions/rar://.3.gz
./output/php-functions/ogg://.3.gz
./output/php-functions/expect://.3.gz

A simple "if (!$gzfile) return;" fix could almost work, but more likely adding filename sanity checks/changes would 
be best.
 [2011-04-05 04:33 UTC] moacir@php.net
Automatic comment from SVN on behalf of moacir
Revision: http://svn.php.net/viewvc/?view=revision&revision=309955
Log: Fix bug #54436. Only render refentries under the funcref set
 [2011-04-05 05:46 UTC] moacir@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: moacir
 [2011-04-05 05:46 UTC] moacir@php.net
Only refentries under funcref should be rendered, so the fix just ignores refentries in other parts of the manual
 [2011-04-16 14:43 UTC] bjori@php.net
Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&revision=310253
Log: Revert r309955 (wrong fix for bug#54436)
 [2011-04-16 14:45 UTC] bjori@php.net
Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&revision=310254
Log: Fixed bug#54436 by replacing directory seperator symbols with nothing
(reftitles for streams, like "phar://" are now available as "phar:")
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 07:01:29 2024 UTC