Forums / Developer / Launching a script

Launching a script

Author Message

Gabriel Santonja

Wednesday 21 June 2006 10:10:03 am

Hello,

I'm trying to launch a script fot importing data ( moving an old site ti ezpublish) and i want to launch a script but i have an an error :

Fatal error: eZ publish did not finish its request
The execution of eZ publish was abruptly ended, the debug output is present below.

include_once( 'lib/ezutils/classes/ezcli.php' );
include_once( 'kernel/classes/ezscript.php' );


$cli =& eZCLI::instance();
$script =& eZScript::instance( array( 'description' => ( "Reprise de donnees" ),
                                      'use-session' => false,
                                      'use-modules' => true,
                                      'use-extensions' => true ) );
$script->initialize();
if ( !$script->isInitialized() )
{   
    $cli->error( 'Error initializing script: ' . $script->initializationError() . '.' );
    $script->shutdown();
    exit();
}

$script->startup();
$cli->output( 'Using Siteaccess '.$GLOBALS['eZCurrentAccess']['name'] );
// login as admin

include_once( 'kernel/classes/datatypes/ezuser/ezuser.php' );
$user =&eZUser::loginUser("xxx","xxx");

The script failed at this line without any error ...

Is somebody can help me please.?.

thank you
Gabriel

Kristof Coomans

Wednesday 21 June 2006 11:18:56 am

Hi Gabriel,

Have you configured PHP to display all errors? See http://ez.no/community/forum/install_configuration/fatal_error_ez_publish_did_not_finish_its_request#msg99842

Launch the script again with the --debug option and tell us what the errors are.

Good luck!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Gabriel Santonja

Wednesday 21 June 2006 2:12:07 pm

Hello and thank you for your reply.

I'm using php cli and I have set the error_reporting = E_ALL in the php.ini and nothing.

Damien Pobel

Thursday 22 June 2006 1:37:46 am

Hi Gabriel,

At the end of your script or before using die (or exit) php function you have to put this :

$script->shutdown();

to inform eZ Script Object that your script is terminating without "problem".

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish