Page MenuHomePhabricator

DPL throws several warnings for fwrite() and fclose()
Open, Needs TriagePublic

Description

[Thu Aug 24 18:56:51.002746 2017] [:error] [pid 22441] [client ] PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPLMain.php on line 3238, referer: https://ffxiv.gamerescape.com/wiki/Green_Quartz
[Thu Aug 24 18:56:51.002913 2017] [:error] [pid 22441] [client ] PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPLMain.php on line 3239, referer: https://ffxiv.gamerescape.com/wiki/Green_Quartz
[Thu Aug 24 18:56:51.003060 2017] [:error] [pid 22441] [client ] PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPLMain.php on line 3240, referer: https://ffxiv.gamerescape.com/wiki/Green_Quartz
[Thu Aug 24 18:56:51.003187 2017] [:error] [pid 22441] [client ] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPLMain.php on line 3241, referer: https://ffxiv.gamerescape.com/wiki/Green_Quartz

here are the relevant lines in the extension file:

fwrite( $cFile, $originalInput );
fwrite( $cFile, "+++\n" );
fwrite( $cFile, $output );
fclose( $cFile );

Event Timeline

charitwo created this task.Aug 24 2017, 8:18 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 24 2017, 8:18 PM
Peachey88 updated the task description. (Show Details)Sep 9 2017, 1:22 AM
charitwo added a comment.EditedOct 11 2017, 3:36 AM

still an ongoing issue

[Wed Oct 11 03:33:12.969704 2017] [:error] [pid 16014] [client :11493] PHP Warning:  fopen(/var/www/ffxiv.gamerescape.com/htdocs/w/images/dplcache/4/234204_region2landmasstrick-<UL><LI>[[Akh Afah Amphitheatre|Akh Afah Amphitheatre]]Coerthas<_LI><LI>[[Azys Lla|Azys Lla]]Abalathia's Spine<_LI><LI>[[Bowl of Embers|Bowl of Embers]]Thanalan<_LI><LI>[[Carteneau Flats: Borderland Ruins|Carteneau Flats: Borderland Ruins]]Mor Dhona (Region)<_LI><LI>[[Central Azys Lla|Central Azys Lla]]Abalathia's Spine<_LI><LI>[[Central Shroud|Central Shroud]]The Black Shroud<_LI><LI>[[Central Thanalan|Central Thanalan]]Thanalan<_LI><LI>[[Coerthas Central Highlands|Coerthas Central Highlands]]Coerthas<_LI><LI>[[Coerthas Western Highlands|Coerthas Western Highlands]]Coerthas<_LI><LI>[[Command Room|Command Room]]La Noscea<_LI><LI>[[Company Workshop|Company Workshop]]Player Housing<_LI><LI>[[Containment Bay P1T6 (Zone)|Containment Bay P1T6 (Zone)]]Abalathia's Spine<_LI>< in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPLMain.php on line 3237, referer: https://www.google.com/
[Wed Oct 11 03:33:12.970088 2017] [:error] [pid 16014] [client :11493] PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPLMain.php on line 3238, referer: https://www.google.com/
[Wed Oct 11 03:33:13.036713 2017] [:error] [pid 16014] [client :11493] PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPLMain.php on line 3239, referer: https://www.google.com/
[Wed Oct 11 03:33:13.054772 2017] [:error] [pid 16014] [client :11493] PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPLMain.php on line 3240, referer: https://www.google.com/
[Wed Oct 11 03:33:13.066925 2017] [:error] [pid 16014] [client :11493] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPLMain.php on line 3241, referer: https://www.google.com/

Change 395162 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/DynamicPageList@master] Don't try to write crazy filenames for DPL cache files

https://gerrit.wikimedia.org/r/395162

Change 395163 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/DynamicPageList@master] Check to make sure fopen() worked before trying to write to the file

https://gerrit.wikimedia.org/r/395163

Hello,

The original errors are gone, however new ones have appeared in their place:

[Tue Dec 05 07:44:07.948440 2017] [:error] [pid 14310] [client ] PHP Warning:  asort() expects parameter 1 to be array, null given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPL.php on line 721
[Tue Dec 05 07:44:07.948639 2017] [:error] [pid 14310] [client ] PHP Warning:  Invalid argument supplied for foreach() in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPL.php on line 724
[Tue Dec 05 08:04:41.434516 2017] [:error] [pid 16157] [client ] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/ffxiv.gamerescape.com/htdocs/w/includes/libs/rdbms/database/DatabaseMysqli.php on line 46
[Tue Dec 05 10:38:45.420912 2017] [:error] [pid 13746] [client ] PHP Warning:  asort() expects parameter 1 to be array, null given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPL.php on line 721
[Tue Dec 05 10:38:45.421139 2017] [:error] [pid 13746] [client ] PHP Warning:  Invalid argument supplied for foreach() in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPL.php on line 724
[Tue Dec 05 13:24:11.334544 2017] [:error] [pid 9679] [client ] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/ffxiv.gamerescape.com/htdocs/w/languages/Language.php on line 2705
[Tue Dec 05 13:35:47.062514 2017] [:error] [pid 5752] [client ] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/ffxiv.gamerescape.com/htdocs/w/includes/parser/Preprocessor_DOM.php on line 1047
[Tue Dec 05 16:11:53.513264 2017] [:error] [pid 6046] [client ] PHP Warning:  asort() expects parameter 1 to be array, null given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPL.php on line 721
[Tue Dec 05 16:11:53.513459 2017] [:error] [pid 6046] [client ] PHP Warning:  Invalid argument supplied for foreach() in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPL.php on line 724
[Tue Dec 05 19:40:59.605731 2017] [:error] [pid 12126] [client ] PHP Warning:  asort() expects parameter 1 to be array, null given in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPL.php on line 721
[Tue Dec 05 19:40:59.605943 2017] [:error] [pid 12126] [client ] PHP Warning:  Invalid argument supplied for foreach() in /var/www/ffxiv.gamerescape.com/htdocs/w/extensions/DynamicPageList/DPL.php on line 724
[Tue Dec 05 20:15:35.654514 2017] [:error] [pid 23502] [client ] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/ffxiv.gamerescape.com/htdocs/w/includes/libs/rdbms/database/DatabaseMysqli.php on line 46
[Tue Dec 05 20:15:48.426510 2017] [:error] [pid 22634] [client ] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/ffxiv.gamerescape.com/htdocs/w/includes/libs/objectcache/MemcachedClient.php on line 572
[Tue Dec 05 20:15:54.338514 2017] [:error] [pid 18476] [client ] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/ffxiv.gamerescape.com/htdocs/w/includes/cache/MessageCache.php on line 149
charitwo updated the task description. (Show Details)Dec 5 2017, 9:10 PM

Change 395162 merged by jenkins-bot:
[mediawiki/extensions/DynamicPageList@master] Don't try to write crazy filenames for DPL cache files

https://gerrit.wikimedia.org/r/395162

Change 395163 merged by jenkins-bot:
[mediawiki/extensions/DynamicPageList@master] Check to make sure fopen() worked before trying to write to the file

https://gerrit.wikimedia.org/r/395163