Shyokou Ouyou Posted September 10, 2010 Report Share Posted September 10, 2010 I was a little bit fashion to try both Carbo 6.0.1 and Carbo 6.0.2, but found both omitted a space smart ;-)I mean, the omitted space in the definition of function 'port_in_use()' in file 'UniServer/unicon/main/includes/functions.php' ... At least in the Nano 5.6.X series, the space counts; but in the new Carbo 6.0.X, it may lead to ridiculous and erroneous 'port in use' message for just something listens on 0.0.0.0:80X or 0.0.0.0:80XX ...In order to fix that without interfering with other parts, I applied this patch: --- Carbo_6_0_2/UniServer/unicon/main/includes/functions.php 2010-08-13 01:25:56.453125000 +0800 +++ Carbo_6_0_2/UniServer/unicon/main/includes/functions.php 2010-08-13 01:25:56.453125000 +0800 @@ -873,6 +873,7 @@ // Input: Port number Output: true - in use false - free to use function port_in_use($port){ $list = shell_exec("netstat -anp tcp"); // Get output list as sring + if( strpos( $list, '0.0.0.0:' . $port . ' ' ) ) return true; if(strpos($list,'0.0.0.0:'.$port)){ // Check for match return true; // Found match Port already in use print "\nA==A match =\n"; It adds nothing but a single line begins with a plus ;-) Quote Link to comment Share on other sites More sharing options...
Ric Posted September 10, 2010 Report Share Posted September 10, 2010 Thanks for the post, it is a bug and will be fixed in next release.All the bestRic Quote Link to comment Share on other sites More sharing options...
Shyokou Ouyou Posted September 15, 2010 Author Report Share Posted September 15, 2010 Yeah, I have tested the Carbo_6_0_3 on my box, it works well ;-) Thanks Thanks for the post, it is a bug and will be fixed in next release.All the bestRic Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.