Last modified: 2012-03-29 20:19:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37580, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35580 - ProfilerSimpleUDP does not check for function_exists( 'socket_create' )
ProfilerSimpleUDP does not check for function_exists( 'socket_create' )
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.18.x
All Windows Server 2003
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-29 10:00 UTC by Dmitriy Sintsov
Modified: 2012-03-29 20:19 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dmitriy Sintsov 2012-03-29 10:00:01 UTC
When debugging my extension, sometimes I get the following error in Chrome console (it seems to be catched at server-side then thrown by client-side of ResourceLoader):

mw.loader.implement("jquery.ui.map", ["http://localmoscow.priv/extensions/JQGmap/jquery-ui-map-3.0-beta/ui/jquery.ui.map.js"], {}, {});
mw.loader.implement("jquery.ui.map.services", ["http://localmoscow.priv/extensions/JQGmap/jquery-ui-map-3.0-beta/ui/jquery.ui.map.services.js"], {}, {});

Fatal error: Call to undefined function socket_create() in E:\www\1.18wmf1\includes\profiler\ProfilerSimpleUDP.php on line 23
Uncaught SyntaxError: Unexpected identifier

Call Stack:
    0.0002      74080   1. {main}() E:\www\1.18wmf1\load.php:0
    0.1287   12406104   2. wfLogProfilingData() E:\www\1.18wmf1\load.php:50
    0.1287   12407648   3. ProfilerSimpleUDP->logData() E:\www\1.18wmf1\includes\GlobalFunctions.php:903

The target machine is Windows Server 2003 SP2 with
e:\www\1.18wmf1\includes\profiler>php -v
PHP 5.2.9-2 (cli) (built: Apr  9 2009 08:23:19)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

I know that PHP is really old, however version check of 1.18wmf1 does not refuse to run at this configuration.

Also, I think there probably should be "Component" entry for profiler in Bugzilla.
Comment 2 Dmitriy Sintsov 2012-03-29 18:06:14 UTC
The customer is using 1.18wmf1 for their hosting that's why I am using it as well.
Although I'd like to move my own farm from usual set of setup-generated LocalSettings.php to nested array of $wgConf in the future.

I never compared 1.18 and 1.18wmf1, that would be interesting.
Comment 3 Sam Reed (reedy) 2012-03-29 18:11:39 UTC
http://php.net/manual/en/function.socket-create.php

The function has been there for ever, pretty much.

It would seem you don't have the php_socket.dll module loaded into the webserver config
Comment 4 Dmitriy Sintsov 2012-03-29 20:19:26 UTC
Many versions of MediaWiki since 1.9.3 lived happily without that module.

That is really low-level thing, in PHP we are usually dealing with abstracts of much higher level, streams like "php://" "http://" and so on. However I read interesting article why UDP is being used by Wikimedia, under heavy load it's the only possibility because PHP is not a daemon itself but a part of apache process. UDP packets should not be lost too often in modern reliable networks. And profiling seems to use sampling, because error wasn't appearing always, just sometimes.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links