Jump to content


Can anyone shed some light on this..

  • Please log in to reply
2 replies to this topic

#1 jaymc

  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 27 October 2006 - 01:24 PM

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/jaydio/public_html/site/login/whosonline/index.php on line 161

Here is line 161

$scfp = fsockopen($reqqq, "2005", &$errno, &$errstr, 4);

I would love to change the world, but they won't give me the source code

SEO Agency

#2 Psycho

  • Moderators
  • Move along, nothing to see here
  • 11,892 posts
  • LocationCanada

Posted 27 October 2006 - 01:50 PM

The 2nd link on a Google search for "Call-time pass-by-reference has been deprecated" brought up a perfect explanation and solution.
The quality of the responses received is directly proportional to the quality of the question asked.

I do not always test the code I provide, so there may be some syntax errors. In 99% of all cases I found the solution to your problem here: http://www.php.net

#3 obsidian

  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 27 October 2006 - 02:06 PM

Basically, the fsockopen() function doesn't accept a pass by reference in it's API. As of PHP 4, I believe it is, you have to declare in the function declaration itself whether you are allowing for pass by reference. So... as you have it now, to avoid that warning, you'll have to pass $errno and $errstr directly.
You can't win, you can't lose, you can't break even... you can't even get out of the game.

while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users