Hi, I tried to install the module but I get the following:

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 [runtime function name](). 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 /var/www/vhosts/vdu.it/subdomains/ebvip/httpdocs/modules/last_node/last_node.module on line 33

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 [runtime function name](). 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 /var/www/vhosts/vdu.it/subdomains/ebvip/httpdocs/modules/last_node/last_node.module on line 50

However, I don't get to access to my php.ini file, so is there any way to sort this out in another way (maybe using htaccess?)

Thanks a lot!

Comments

TheCrow’s picture

Change this line (n. 33): _last_node_blocknode($op,'2',&$blocks);
with this: _last_node_blocknode($op,'2',$blocks);

and this line (n.50): $block['subject'] = _last_node_blocknode($op,$delta,&$block);
with this: $block['subject'] = _last_node_blocknode($op,$delta,$block);

slombardi’s picture

Thanks!!!
now it works.
Just what I needed.
D.

TheCrow’s picture

Assigned: slombardi » TheCrow
Status: Active » Closed (fixed)

Tnx for your notice i update them at next version

TheCrow’s picture

Status: Closed (fixed) » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
pandian123’s picture

hi. i learner for PHP . i writing a Coding for some Problem with conditions applied their.
i send error coding. plz help me anyone.


require("ws2300_driver.php");

/* temperature_indoor
 * Read indoor temperature, current temperature only
 * 
 * Input: temperature_conv flag (integer) controlling
 *            convertion to deg F
 *
 * Returns: Temperature (deg C if temperature_conv is 0)
 *                      (deg F if temperature_conv is 1)
 *
*/

function temperature_indoor($temperature_conv)
{

	$address=0x346;
	$bytes=2;

	if (read_safe($address, &$data, $bytes) != $bytes)
		return -1;

	if ($temperature_conv)
		return (((($data[2] >> 4) * 10 + ($data[2] & 0xF) +
		          ($data[1] >> 4) / 10.0 + ($data[1] & 0xF) / 100.0) -
		          30.0) * 9 / 5 + 32);
	else
		return (((($data[2] >> 4) * 10 + ($data[2] & 0xF) +
		          ($data[1] >> 4) / 10.0 + ($data[1] & 0xF) / 100.0) - 30.0));
}

/* temperature_outdoor
 * Read indoor temperature, current temperature only
 * 
 * Input: temperature_conv flag (integer) controlling
 *            convertion to deg F
 *
 * Returns: Temperature (deg C if temperature_conv is 0)
 *                      (deg F if temperature_conv is 1)
 *
*/
function temperature_outdoor($temperature_conv)
{
	$address=0x373;
	$bytes=2;

	if (read_safe($address, &$data, $bytes) != $bytes)
		return -1;

	if ($temperature_conv)
		return (((($data[2] >> 4) * 10 + ($data[2] & 0xF) +
		          ($data[1] >> 4) / 10.0 + ($data[1] & 0xF) / 100.0) -
		          30.0) * 9 / 5 + 32);
	else
		return (((($data[2] >> 4) * 10 + ($data[2] & 0xF) +
		          ($data[1] >> 4) / 10.0 + ($data[1] & 0xF) / 100.0) - 30.0));
}

/* Dewpoint
 * Read dewpoint
 * 
 * Input: temperature_conv flag (integer) controlling
 *            convertion to deg F
 *
 * Returns: Dewpoint (deg C if temperature_conv is 0)
 *                      (deg F if temperature_conv is 1)
 *
*/
function dewpoint($temperature_conv)
{
	$address=0x3CE;
	$bytes=2;

	if (read_safe($address, &$data, $bytes) != $bytes)
		return -1;

	if ($temperature_conv)
		return (((($data[2] >> 4) * 10 + ($data[2] & 0xF) +
		          ($data[1] >> 4) / 10.0 + ($data[1] & 0xF) / 100.0) -
		          30.0) * 9 / 5 + 32);
	else
		return (((($data[2] >> 4) * 10 + ($data[2] & 0xF) +
		          ($data[1] >> 4) / 10.0 + ($data[1] & 0xF) / 100.0) - 30.0));
}

/* Windchill
 * Read windchill
 * 
 * Input: temperature_conv flag (integer) controlling
 *            convertion to deg F
 *
 * Returns: Temperature (deg C if temperature_conv is 0)
 *                      (deg F if temperature_conv is 1)
 *
*/
function windchill($temperature_conv)
{
	$address=0x3A0;
	$bytes=2;

	if (read_safe($address, &$data, $bytes) != $bytes)
		return -1;

	if ($temperature_conv)
		return (((($data[2] >> 4) * 10 + ($data[2] & 0xF) +
		          ($data[1] >> 4) / 10.0 + ($data[1] & 0xF) / 100.0) -
		          30.0) * 9 / 5 + 32);
	else
		return (((($data[2] >> 4) * 10 + ($data[2] & 0xF) +
		          ($data[1] >> 4) / 10.0 + ($data[1] & 0xF) / 100.0) - 30.0));
}

/*
 * humidity_indoor
 * Read indoor relative humidity, current value only
 * 
 * Input: nothing
 * Returns: relative humidity in percent (integer)
*/
function humidity_indoor()
{
	$address=0x3FB;
	$bytes=1;

	if (read_safe($address, $data, $bytes) != $bytes)
		return -1;

	return (($data[1] >> 4) * 10 + ($data[1] & 0xF));
}

/*
 * humidity_outdoor
 * Read outdoor relative humidity, current value only
 * 
 * Input: nothing
 * Returns: relative humidity in percent (integer)
*/
function humidity_outdoor()
{
	$address=0x419;
	$bytes=1;

	if (read_safe($address, $data, $bytes) != $bytes)
		return -1;

	return (($data[1] >> 4) * 10 + ($data[1] & 0xF));
}

/*
 * rel_pressure
 * Read relaive air pressure, current value only
 * 
 * Input: nothing
 *
 * Returns: pressure in hPa
 *
*/
function rel_pressure()
{
	$address=0x5E2;
	$bytes=3;
	
	if (read_safe($address, $data, $bytes) != $bytes)
		return -1;


	return ((($data[3] & 0xF) * 1000 + ($data[2] >> 4) * 100 +
	         ($data[2] & 0xF) * 10 + ($data[1] >> 4) +
	         ($data[1] & 0xF) / 10.0));
}

/*
 * rel_pressure
 * Read relaive air pressure, current value only
 * 
 * Input: nothing
 *
 * Returns: pressure in hPa
 *
*/
function abs_pressure()
{
	$address=0x5D8;
	$bytes=3;
	
	if (read_safe($address, $data, $bytes) != $bytes)
		return -1;


	return ((($data[3] & 0xF) * 1000 + ($data[2] >> 4) * 100 +
	         ($data[2] & 0xF) * 10 + ($data[1] >> 4) +
	         ($data[1] & 0xF) / 10.0));
}

/*
 * wind_current
 * Read wind speed, wind direction and last 5 wind directions
 *
 * Input: Handle to weatherstation
 *        wind_speed_conv_factor controlling convertion to other
 *             units than m/s
 *
 * Output: winddir in degrees
 *
 * Returns: Wind speed in m/s
 *
*/
function wind(&$winddir)
{
	$address=0x527; //Windspeed and direction
	$bytes=3;
	
	if (read_safe($address, $data, $bytes) != $bytes)
		return -1;
	
	//Calculate wind directions

	$winddir = ($data[3]>>4)*22.5;

	//Calculate raw wind speed 	- convert from m/s to whatever
	return( ((($data[3]&0xF)<<8)+($data[2])) / 10.0);
}

/*
 * rain_1h
 * Read rain last 1 hour, current value only
 * 
 * Input: nothing
 *
 * Returns: rain quantity
 *
*/
function rain_1h()
{
	$address=0x4B4;
	$bytes=3;

	if (read_safe($address, $data, $bytes) != $bytes)
		return -1;

	return (($data[3] >> 4) * 1000 + ($data[3] & 0xF) * 100 +
	          ($data[2] >> 4) * 10 + ($data[2] & 0xF) + ($data[1] >> 4) / 10.0 +
	          ($data[1] & 0xF) / 100.0 );
}

/*
 * rain_24h
 * Read rain last 24 hours, current value only
 * 
 * Input: nothing
 *
 * Returns: rain quantity
 *
*/
function rain_24h()
{
	$address=0x497;
	$bytes=3;

	if (read_safe($address, $data, $bytes) != $bytes)
		return -1;

	return (($data[3] >> 4) * 1000 + ($data[3] & 0xF) * 100 +
	          ($data[2] >> 4) * 10 + ($data[2] & 0xF) + ($data[1] >> 4) / 10.0 +
	          ($data[1] & 0xF) / 100.0 );
}

/*
 * rain_total
 * Read rain last 24 hours, current value only
 * 
 * Input: nothing
 *
 * Returns: rain quantity
 *
*/
function rain_total()
{
	$address=0x4D2;
	$bytes=3;

	if (read_safe($address, $data, $bytes) != $bytes)
		return -1;

	return (($data[3] >> 4) * 1000 + ($data[3] & 0xF) * 100 +
	          ($data[2] >> 4) * 10 + ($data[2] & 0xF) + ($data[1] >> 4) / 10.0 +
	          ($data[1] & 0xF) / 100.0 );
}

/*
 * tendency_forecast
 * Read Tendency and Forecast
 * 
 * Input: nothing
 *
 * Output: tendency - 0 - Steady, 1 - Rising, 2 - Falling
 *         forecast - 0 - Rainy, 1 - Cloudy, 2 - Sunny
 *
 * Returns: nothing
 *
*/
function tendency_forecast(&$tendency, &$forecast)
{
	$address=0x26B;
	$bytes=1;

	if (read_safe($address, $data, $bytes) != $bytes)
		return -1;

	$tendency = $data[1] >> 4;
	$forecast = $data[1] & 0xF;

	return;
}

Error: Deprecated: Call-time pass-by-reference has been deprecated in C:\wamp\www\ws2300_php\ws2300.php on line 22.

TheCrow’s picture

because you wrote:
read_safe($address, &$data, $bytes)
instead of:
read_safe($address, $data, $bytes)
(look how the ampersand vanish in the good version)