Joomla Development - Allow Direct File Access AND use Joomla-intern Framework

Posted by Email on Stack Overflow See other posts from Stack Overflow or by Email
Published on 2010-05-10T12:00:53Z Indexed on 2010/05/19 10:40 UTC
Read the original article Hit count: 301

Filed under:
|
|
|
|

Hi

As usual you write in Joomla Development

defined('_JEXEC') or die('Restricted access');  

I make a plugin which needs access from Paypal/IPN, so i exclude that in that specific file. BUT I also need to use the Joomla-intern Variables to access the Database, so i tried this:

require("../filewithaccesstoframework.php");  

OR even

$baseurl = $_SERVER['HTTP_HOST'];
$baseurl ="http://".$baseurl."/configuration.php";
require($baseurl);  

By using the first code it displays "Restircted Access" since it seems to take this from the included file which i can't skip to put-in-there.

The second code does not seem to recognize the Variables used in configuration.php like $host, $db, $password. the file configuration.php is chmod 444

Why this happens and is there a workarround to allow direct access to a file AND using the Joomla intern Framework (Variables, Functions)?

© Stack Overflow or respective owner

Related posts about joomla

Related posts about joomla1.5