Page MenuHomePhabricator

Warning: No such file or directory in /srv/mediawiki/php-1.29.0-wmf.6/extensions/MobileFrontend/includes/api/ApiWebappManifest.php on line 31
Closed, ResolvedPublic2 Estimated Story PointsPRODUCTION ERROR

Description

From logstash fatalmonitor, appears to be new in 1.29.0-wmf.6

Warning: No such file or directory in /srv/mediawiki/php-1.29.0-wmf.6/extensions/MobileFrontend/includes/api/ApiWebappManifest.php on line 31

Event Timeline

Could it be that allow_url_fopen is set to false on the server so getimagesize() can't be used with a distant file?

The URL should be relative... maybe its configured incorrectly on one box to a 404 @mmodell which server was that on?
@Rudloff what happens if wgAppleTouchIcon points to a file that doesn't exist?

Relative or not, the code uses wfExpandUrl() to always give an absolute URL to getimagesize() (in order to have a consistent behavior, because $wgAppleTouchIcon can also be absolute).
So if it points to a non-existing file, the error should be:

failed to open stream: HTTP request failed

But we have a different error here, talking about a local file, which makes me think getimagesize() treats the URL as a local path because of some PHP config option.

Anyway, I think I know how to fix this so I will submit a patch.

Change 327420 had a related patch set uploaded (by Rudloff):
Use getimagesizefromstring() instead of getimagesize()

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

Change 327420 merged by jenkins-bot:
Use getimagesizefromstring() instead of getimagesize()

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

Change 327582 had a related patch set uploaded (by 20after4):
Use getimagesizefromstring() instead of getimagesize()

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

Change 327582 merged by 20after4:
Use getimagesizefromstring() instead of getimagesize()

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

Mentioned in SAL (#wikimedia-operations) [2016-12-15T22:07:22Z] <twentyafterfour@tin> Synchronized php-1.29.0-wmf.6/extensions/MobileFrontend/includes/api/ApiWebappManifest.php: fix T153250 (duration: 00m 41s)

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:11 PM