allow_call_time_pass_reference

jvantslot

Member
Joined
Nov 24, 2007
Messages
72
Reaction score
2
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
 

jvantslot

Member
Joined
Nov 24, 2007
Messages
72
Reaction score
2
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
 

Members online

No members online now.

Forum statistics

Threads
25,782
Messages
167,509
Members
19,202
Latest member
pbxnewguy
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top