1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. A serious FreePBX vulnerability has been reported. Update your Framework Module immediately. Click here for details.
  4. Critical FreePBX vulnerability! Update your server immediately. Details here.


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

  1. jvantslot Member

    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:

    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:

    allow_call_time_pass_reference = Off

    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.

  2. jvantslot Member

    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:
    $fp = fsockopen ("localhost", 5038, &$errno, &$errstr, 20);

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

Share This Page