download.php
-
Attempting to play and download voicemails now that I have fop2 running on the right machine.
I can see a list of the vm's when I click on the envelope icons for an extension. At that point I get a screen that show Play and download icons, but neither do anything. I've read enough to recognize the issue as a likely php session issue, and when I invoke download.php directly from the browser, i get "no way".
But, before that, I'm seeing[Thu Jul 24 14:49:06 2014] [error] [client 96.56.230.76] PHP Notice: Undefined offset: 1 in /var/www/html/fop2/download.php on line 116
in my http error log, which corresponds to this line:
list ($getid,$filename2) = preg_split("/!/",$_REQUEST['file'],2);
Assuming that I've passed the following URL:
...../fop2/download.php?file=/var/spool/asterisk/default/102/INBOX/msg0000.WAVI'm seeing the entire $_REQUEST['file'] in $getid, and $filename2 is what is undefined. I've been searching far and wide for what the pattern "/!/" represents, the closest thing I've come to is a negative lookahead.
So I wrote a little test program:
$lines = file("test.out");
$foo = array( "","" );foreach ($lines as $a) {
echo "$a\n";
$foo = preg_split("/!/",$a,2);
echo "$foo[0] ... $foo[1] ..\n";
}
echo "done\n";And fed it these filenames:
/var/foo/bar/test
foo/bar/test/gooey/
/var/www/html/fop2/foo.barand it produced the same result:
/var/foo/bar/test
PHP Notice: Undefined index: 1 in /home/agiletel/test.php on line 8
/var/foo/bar/test
... ..
foo/bar/test/gooey/PHP Notice: Undefined index: 1 in /home/agiletel/test.php on line 8
foo/bar/test/gooey/
... ..
/var/www/html/fop2/foo.barPHP Notice: Undefined index: 1 in /home/agiletel/test.php on line 8
/var/www/html/fop2/foo.bardone
I'm running php 5.1.6, and there doesn't seem to be any dependence on a particular version of PHP here.
Any thoughts ? I need to get past this so I can get back to grappling with the session issue, which I think is unrelated (and not likely to be solved by this either)
Ron
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login