Hello,
I am testing out a small plugin whereby I just print the cpanel user to the screen.
I have saved the code below as /usr/local/cpanel/base/frontend/x3/test.live.php
When I run this by going to https://12.34.56.78:2083/frontend/x3/MyApp/test2.live.php in my browser I get the error:
Warning: array_shift() expects parameter 1 to be array, null given in /usr/local/cpanel/base/frontend/x3/MyApp/test.live.php on line 3
I have seen this exact code being referenced on numerous forum posts and it seems to work fine for everyone else. Can anyone point out to me where I am going wrong?
I have included the entries from the cpanel error logs below.
Regards,
Colin
# tail -f /usr/local/cpanel/logs/error_logs
PHP Warning: array_shift() expects parameter 1 to be array, null given in /usr/local/cpanel/base/frontend/x3/MyApp/test2.live.php on line 3
[2012-04-26 10:20:33 +0100] die [Internal Death while parsing [live php] 14202] Timed out waiting for live api connection. at cpanel line 4903.
main::__ANON__('ALRM') called at cpanel line 4906
main::setup_external_engine() called at cpanel line 389
Timed out waiting for live api connection. at cpanel line 4903.
I am testing out a small plugin whereby I just print the cpanel user to the screen.
I have saved the code below as /usr/local/cpanel/base/frontend/x3/test.live.php
PHP:
<?php
$opts = array();
$argv0 = array_shift($argv);
while(count($argv)) {
$key = array_shift($argv);
$value = array_shift($argv);
$opts[$key] = $value;
}
$user = $opts['user'];
echo $user;
?>
Warning: array_shift() expects parameter 1 to be array, null given in /usr/local/cpanel/base/frontend/x3/MyApp/test.live.php on line 3
I have seen this exact code being referenced on numerous forum posts and it seems to work fine for everyone else. Can anyone point out to me where I am going wrong?
I have included the entries from the cpanel error logs below.
Regards,
Colin
# tail -f /usr/local/cpanel/logs/error_logs
PHP Warning: array_shift() expects parameter 1 to be array, null given in /usr/local/cpanel/base/frontend/x3/MyApp/test2.live.php on line 3
[2012-04-26 10:20:33 +0100] die [Internal Death while parsing [live php] 14202] Timed out waiting for live api connection. at cpanel line 4903.
main::__ANON__('ALRM') called at cpanel line 4906
main::setup_external_engine() called at cpanel line 389
Timed out waiting for live api connection. at cpanel line 4903.