Joomla PHP command line script fails -


i have command line test script runs locally ok, when try run on host (bluehost) through ssl (using putty) fails, doesn't throw error.

i've checked error logs , there nothing there indicate failure , have turned on e_all errors there.

on local wamp server runs fine , outputs prompts:

1. environment imported 2. execute! 3. got instance 4. success 5. finished executing! 

when run on putty @ host outputs first 2 lines. 1. environment imported 2. execute!

this script (joomla 3.4.5):

<?php // initialize joomla framework const _jexec = 1;  error_reporting(e_all);  // load system defines if (file_exists(dirname(__dir__) . '/defines.php')) { require_once dirname(__dir__) . '/defines.php'; }  if (!defined('_jdefines')) { define('jpath_base', dirname(__dir__)); require_once jpath_base . '/includes/defines.php'; }  // framework. require_once jpath_libraries . '/import.legacy.php';  // bootstrap cms libraries. require_once jpath_libraries . '/cms.php';  // load configuration require_once jpath_configuration . '/configuration.php';  require_once jpath_base . '/includes/framework.php';   echo "1. environment imported\n";  class test extends japplicationcli { public function doexecute()     {          echo "4. successful execution\n";     } }  echo "2. execute\n";  $test = japplicationcli::getinstance('test'); echo "3. got instance\n";  $test->execute(); echo "5. finished executing!\n";  ?> 

i have tried running different variations of command line:

php jwjtest.php php54s -c ~/public_html/php.ini ~/public_html/cli/jwjtest.php 

i have surrounded line executes 'getinstance' 'try' , 'catch' no error caught.

any welcome. thanks!

it turned out command line have use command line version of php. on blue host have initiate using php54-cli (php-cli doesn't work) .. example test case ran

php54-cli jwjtest.php 

and worked ok.

i not sure why using php command didn't work (perhaps ran wrong version of php?) @ least have solution. set on right track reply got on joomla.stackexchange user1104799


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -