<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[download.php]]></title><description><![CDATA[<p dir="auto">Attempting to play and download voicemails now that I have fop2 running on the right machine.</p>
<p dir="auto">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".<br />
But, before that, I'm seeing</p>
<p dir="auto">[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</p>
<p dir="auto">in my http error log, which corresponds to this line:</p>
<p dir="auto">list ($getid,$filename2) = preg_split("/!/",$_REQUEST['file'],2);</p>
<p dir="auto">Assuming that I've passed the following URL:<br />
...../fop2/download.php?file=/var/spool/asterisk/default/102/INBOX/msg0000.WAV</p>
<p dir="auto">I'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.</p>
<p dir="auto">So I wrote a little test program:<br />
$lines = file("test.out");<br />
$foo = array( "","" );</p>
<p dir="auto">foreach ($lines as $a) {<br />
echo "$a\n";<br />
$foo = preg_split("/!/",$a,2);<br />
echo "$foo[0] ... $foo[1] ..\n";<br />
}<br />
echo "done\n";</p>
<p dir="auto">And fed it these filenames:</p>
<p dir="auto">/var/foo/bar/test<br />
foo/bar/test/gooey/<br />
/var/www/html/fop2/foo.bar</p>
<p dir="auto">and it produced the same result:</p>
<p dir="auto">/var/foo/bar/test</p>
<p dir="auto">PHP Notice:  Undefined index:  1 in /home/agiletel/test.php on line 8<br />
/var/foo/bar/test<br />
...  ..<br />
foo/bar/test/gooey/</p>
<p dir="auto">PHP Notice:  Undefined index:  1 in /home/agiletel/test.php on line 8<br />
foo/bar/test/gooey/<br />
...  ..<br />
/var/www/html/fop2/foo.bar</p>
<p dir="auto">PHP Notice:  Undefined index:  1 in /home/agiletel/test.php on line 8<br />
/var/www/html/fop2/foo.bar</p>
<p dir="auto">done</p>
<p dir="auto">I'm running php 5.1.6, and there doesn't seem to be any dependence on a particular version of PHP here.</p>
<p dir="auto">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)</p>
<p dir="auto">Ron</p>
]]></description><link>http://localhost:4567/topic/1783/download.php</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 08:29:14 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/1783.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Jul 2014 21:09:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to download.php on Fri, 25 Jul 2014 01:48:11 GMT]]></title><description><![CDATA[<p dir="auto">The download does not work unless you pass a fop2 key before the filename (as a security measure). The exclamation sign is the separator. The fop2 key is set via php sessions, so your problem could be very well related to them.</p>
]]></description><link>http://localhost:4567/post/7716</link><guid isPermaLink="true">http://localhost:4567/post/7716</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Fri, 25 Jul 2014 01:48:11 GMT</pubDate></item></channel></rss>