Last modified: 2012-03-29 20:19:26 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.
This is fixed for 1.19, and as such is fixed in 1.19wmf1 Note, using the wmf branches for other sites is generally not recommended due to site specific hacks that go into it. http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_18/phase3/includes/profiler/ProfilerSimpleUDP.php?view=markup#l23 http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_19/phase3/includes/profiler/ProfilerSimpleUDP.php?view=markup#l23 http://svn.wikimedia.org/viewvc/mediawiki/branches/wmf/1.18wmf1/includes/profiler/ProfilerSimpleUDP.php?view=annotate#l23 http://svn.wikimedia.org/viewvc/mediawiki/branches/wmf/1.19wmf1/includes/profiler/ProfilerSimpleUDP.php?view=annotate#l23
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.
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
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.