Voicemails not playing - PHP Deprecated errors?

Hi! Slowly making progress with the voicemail explorer. The voicemail sound is not playing, though, and these are the apache2 errors appearing now when I press the play button.

[Wed May 11 21:45:35 2011] [error] [client 192.168.58.4] PHP Deprecated: Function split() is deprecated in /var/www/localhost/htdocs/download.php on line 18, referer: http://192.168.58.254/wavplayer.swf?gui=none
[Wed May 11 21:45:35 2011] [error] [client 192.168.58.4] PHP Deprecated: Function ereg_replace() is deprecated in /var/www/localhost/htdocs/download.php on line 19, referer: http://192.168.58.254/wavplayer.swf?gui=none
[Wed May 11 21:45:35 2011] [error] [client 192.168.58.4] PHP Deprecated: Function ereg_replace() is deprecated in /var/www/localhost/htdocs/download.php on line 20, referer: http://192.168.58.254/wavplayer.swf?gui=none
[Wed May 11 21:45:35 2011] [error] [client 192.168.58.4] PHP Deprecated: Function ereg_replace() is deprecated in /var/www/localhost/htdocs/download.php on line 21, referer: http://192.168.58.254/wavplayer.swf?gui=none
[Wed May 11 21:45:35 2011] [error] [client 192.168.58.4] PHP Notice: Undefined variable: ctype in /var/www/localhost/htdocs/download.php on line 60, referer: http://192.168.58.254/wavplayer.swf?gui=none

Could these PHP Deprecated errors be preventing the sound from playing?

Comments

  • Perhaps, you wlll have to change the split to preg_split and ereg_replace to preg_replace...

    Are you using php 5.3?
  • Thanks! Yes, I'm using PHP Version 5.3.6.

    I edited download.swf with the changes you suggested and Now I'm getting these warnings. (Obviously I don't know how to code.....)


    [Fri May 13 16:05:03 2011] [error] [client 192.168.58.144] PHP Warning: preg_split() [<a href='function.preg-split'>function.preg-split</a>]: No ending delimiter '!' found in /var/www/localhost/htdocs/download.php on line 18, referer: http://192.168.58.254/wavplayer.swf?gui=none
    [Fri May 13 16:05:03 2011] [error] [client 192.168.58.144] PHP Warning: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Delimiter must not be alphanumeric or backslash in /var/www/localhost/htdocs/download.php on line 19, referer: http://192.168.58.254/wavplayer.swf?gui=none
    [Fri May 13 16:05:03 2011] [error] [client 192.168.58.144] PHP Warning: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: No ending delimiter '%' found in /var/www/localhost/htdocs/download.php on line 20, referer: http://192.168.58.254/wavplayer.swf?gui=none
    [Fri May 13 16:05:03 2011] [error] [client 192.168.58.144] PHP Warning: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: No ending delimiter '/' found in /var/www/localhost/htdocs/download.php on line 21, referer: http://192.168.58.254/wavplayer.swf?gui=none
  • list ($getid,$filename2) = preg_split("/!/",$_REQUEST['file'],2);
    $filename2 = preg_replace("/\.\./","",$filename2);
    $filename2 = preg_replace("/%2e/","",$filename2);
    $filename2 = preg_replace("/\/+/","/",$filename2);
    

    Try that
  • Thanks, Nicolas. I made those changes and now the only error I get is an undefined variable "ctype" whenever I try to play the message from the voicemail browser:

    [Thu May 19 16:27:59 2011] [error] [client 192.168.58.144] PHP Notice: Undefined variable: ctype in /var/www/localhost/htdocs/download.php on line 60, referer: http://192.168.58.254/wavplayer.swf?gui=none

    As a test, I deleted this line from the script:

    header("Content-Type: $ctype");

    And it works like a charm. That is really cool...the way you've programmed it to play one party on the left speaker and the other party on the right speaker....

    THANKS!

    chris
  • Hi, glad it is working!

    The ctype is actually a bug, I will fix it on the next release.

    Best regards,
Sign In or Register to comment.