Attached is a simple patch to eliminate the following php warning
that I am seeing in my apache error log file every time the ganglia
page is loaded:

[error] PHP Warning:  Call-time pass-by-reference has been deprecated -
argument passed by value;  If you would like to pass it by reference,
modify the declaration of fsockopen().  If you would like to enable
call-time pass-by-reference, you can set allow_call_time_pass_reference
to true in your INI file.  However, future versions may not support this
any longer.  in /home/www/ganglia.php on line 273

Evidently you don't need to pass the variables by reference anymore,
php will still return the error code in those variables if there is
a problem:

http://www.php.net/fsockopen/

~Jason


-- 
/------------------------------------------------------------------\
|  Jason A. Smith                          Email:  [EMAIL PROTECTED] |
|  Atlas Computing Facility, Bldg. 510M    Phone:  (631)344-4226   |
|  Brookhaven National Lab, P.O. Box 5000  Fax:    (631)344-7616   |
|  Upton, NY 11973-5000                                            |
\------------------------------------------------------------------/
diff -uNr ganglia-webfrontend-2.5.5-dist/ganglia.php ganglia-webfrontend-2.5.5/ganglia.php
--- ganglia-webfrontend-2.5.5-dist/ganglia.php	Mon Nov 10 13:54:16 2003
+++ ganglia-webfrontend-2.5.5/ganglia.php	Fri Jan  2 12:00:45 2004
@@ -270,7 +270,7 @@
             break;
       }
 
-  $fp = fsockopen( $ip, $port, &$errno, &$errstr, $timeout);
+  $fp = fsockopen( $ip, $port, $errno, $errstr, $timeout);
    if (!$fp)
       {
          $error = "fsockopen error: $errstr";

Reply via email to