User "Reedy" posted a comment on MediaWiki.r97328.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97328#c23059
Commit summary:

Noticed in apache error logs (see below). If the length of the message is 
longer than the maximum length, only send what will fit

Sep 16 20:07:28 10.0.2.193 apache2[28441]: PHP Warning:  socket_sendto() [<a 
href='function.socket-sendto'>function.socket-sendto</a>]: unable to write to 
socket [90]: Message too long in 
/home/wikipedia/common/php-1.17-test/includes/GlobalFunctions.php on line 464
Sep 16 20:07:29 10.0.2.193 apache2[26511]: PHP Warning:  socket_sendto() [<a 
href='function.socket-sendto'>function.socket-sendto</a>]: unable to write to 
socket [90]: Message too long in 
/home/wikipedia/common/php-1.17-test/includes/GlobalFunctions.php on line 464

Comment:

SOL_UDP is listed as being defined at 
[http://php.net/manual/en/sockets.constants.php Predefined Constants] as 
"SOL_UDP (integer)", it is used further up and apparently a value of 17, which 
is the same as:
<pre>
> print getprotobyname( 'udp' );
17

> print defined( 'SOL_UDP' );
1

</pre>

Using that in socket_get_options() complains "Warning: socket_get_option(): 
unable to retrieve socket option [92]:"

Reading the UDP documentation, there is seemingly no option to get this 
information.

Would it be simplest to back this change out, and then use 65507 (and 65506 for 
the \n appended version) on the substring commands above to limit the length of 
the string?

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to