Access Denied Error

Permalink
Hi,

I was wondering if anybody has any idea on how to fix the following problem, i have a single page that im trying to use to upload some files to a directory, im using the jQuery plugin uploadify, the plugin uploads the files via ajax by using a flash upload button, the problem is that when the plugin tries to access a page called upload.php located under the tools folder i get a error "Access Denied" as the response, if i remove the line at the top of the upload.php file that reads
defined('C5_EXECUTE') or die(_("Access Denied."));
it works fine, any idea why i get the Access Denied error when inputting the line
defined('C5_EXECUTE') or die(_("Access Denied."));
at the beginning of the upload php file?

Any help is appreciated, thanks.

mdzoidberg
 
kutis replied on at Permalink Reply
kutis
it's just saying that if C5_EXECUTE is not defined, then die

basically it's just stopping others from accessing other concrete5 files directly...

since you're just slapping the uploadify on, it's not executed via concrete5 thus the C5_EXECUTE is not defined..

better off taking that line off
tcmfan replied on at Permalink Reply
tcmfan
If you need to include some file from outside of the concrete5 and you are sure it doesn't have any vulnerability, you can simply declare the constant and include the file then:

define("C5_EXECUTE", true);
include "some_concrete5_file.php";
mdzoidberg replied on at Permalink Reply
mdzoidberg
Thanks for all the responses, the help is appreciated. :)