Recently I have been unable to download any recordings. Every time I click on the download link, I get a 404 error. This has always worked in the past and I have made no recent updates to my system (nor is there anything to update, presently).
The 404 error only happens when the “recindex” variable is passed. If I remove it, the page is blank and no error presents. I think this might be a PHP session issue, but I’ve cleared all session info and even rebooted the server, all to no avail.
[edit] This happens across multiple browsers on multiple computers, so it’s not a local thing either. [/edit]
Look at the URL for the recording and check to make sure the file you are looking for is actually at the location. While everyone would agree that it should be there, obviously there’s a problem with the pointer.
OK, so are you using the “asterisk” user as the owner of the Web Server, or are you using different users (webuser for the web server and asterisk for the phone system)?
posting the output from 'ps -ef | egrep ‘(httpd|apache2|apache)’ ’ would have been just fine. That would have actually given us some information.
I can’t read your mind or access your system to tell you what is going on. Did you look at the recording files to see who they are owned by? If the answer is “asterisk”, then this isn’t a permissions problem. If they are not owned by asterisk, then that’s your problem.
I don’t see how this can be a session issue. Enlighten us.
I still suspect a problem with your directory tree starting at /var/www/html (which is where the recordings “link” starts). Since you can’t (or won’t) actually tell us what is not working (only that it doesn’t), I’m afraid no one is going to be able to help you more than the generic “Good luck.”
Recording files are all owned by asterisk (all in /var/spool/asterisk/monitor/), so I agree it doesn’t appear to be a permissions problem (unless I’m missing something).
I believe it’s a session issue because the the 404 error only occurs when I pass the script a GET variable, and the variable is a generic reference which couldn’t possibly reference a file directly. I suspect session variables are being stored and the ‘recindex’ value is part of the session array.
I altered the script to output the entire $_SESSION array and unfortunately, there’s no key named ‘ari_user’. That would certainly cause my problems.
I’m going to dig deeper into some of the included files in that script, but I’m not sure why it all of a sudden changed without my making any changes to my box.
OK - you actually said what I was driving at, so I don’t think you’re seeing it.
You check the files in /var/spool/asterisk/monitor/
When you check the files through the web browser, you are checking /var/www/html/{something}.
Unless you can see the link (and have follow-links enabled) from inside the /var/www/html/{something} tree, you are going to get a 404 error.
You can double check your path names by looking at the /var/log/httpd/error_log and seeing what file the system is looking for. As a matter of course, it will tell you the file name it couldn’t find relative to the /var/www/html directory. Check for imporper permissions on the link and that the link from that web directory points to the /var/spool/asterisk/monitor/ directory.