getApplication in external script no longer works. - Joomla! Forum - community, help and support


hi all,

somewhere along way external script stopped working. basically, needed have pop-up window pulled joomla database in extension. see code below, note had locate factory.php, moved somewhere along way.

code: select all

define( '_jexec', 1 );
define( 'jpath_base', realpath(dirname(__file__)).'/../..');
define( 'ds', '/' );
require_once ( jpath_base .ds.'includes'.ds.'defines.php' );
require_once ( jpath_base .ds.'includes'.ds.'framework.php' );
require_once ( jpath_base .ds.'libraries'.ds.'joomla'.ds.'database'.ds.'factory.php' );
$mainframe = jfactory::getapplication('site');


i had debug statements , works until last line, calling getapplication. i've searched, saw examples looked code (with exception changed looking factory in 'libraries' now.

any idea on problem is?

brian

the jfactory class has not moved. loading jdatabasefactory, action unnecessary.

the code included should work right. issue must in rest of code. add following lines before getapplication() statement , see php error messages, warnings etc:

code: select all

ini_set( 'display_errors', true );
error_reporting(e_all);





Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support