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.
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
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:
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
Post a Comment