1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

allow_call_time_pass_reference

Discussion in 'Bug Reporting and Fixes' started by jvantslot, Dec 27, 2007.

  1. jvantslot

    jvantslot
    Expand Collapse
    Member

    Joined:
    Nov 24, 2007
    Messages:
    72
    Likes Received:
    0
    I'm not sure when the problem started, but last night I wasn't able to use Asteridex or Webmeetme. I was getting an "no route to host (113)" error in Asteridex and Webmeetme just filled the error log with socket errors. After a bit of chasing I figured out why. I suspect that an update changed a value in php.ini.

    Turns out the php apps were failing to connect to the asterisk manager using the fsockopen() call in php.

    Examining the http error log in /var/log/httpd/error.log revealed:

    Code:
    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 /var/www/html/asteridex/callboth.php on line 61
    
    Sure enough... modifying php.ini and changing the following line from:

    Code:
    allow_call_time_pass_reference = Off
    
    to

    Code:
    allow_call_time_pass_reference = On
    
    fixes the problem but according to the php warning in the log file this has been depreciated so that setting SHOULD be set to off. Looks like the apps themselves will need to be modified to support the new method.

    I'll do a bit of research to see what needs to be done to these apps to bring them up to spec.

    james
     
  2. jvantslot

    jvantslot
    Expand Collapse
    Member

    Joined:
    Nov 24, 2007
    Messages:
    72
    Likes Received:
    0
    OK, by simply removing the "&" character (reference) from the vars passed to the fsockopen() call solves the issue. So in Asteridex change line 61 of callboth.php from:
    Code:
    $fp = fsockopen ("localhost", 5038, &$errno, &$errstr, 20);
    
    to

    Code:
    $fp = fsockopen ("localhost", 5038, $errno, $errstr, 20);
    
    james
     

Share This Page