Call to undefined function CodeIgniter\Router\dot_array_search() in codeigniter 4 - codeigniter-4

Hi I am working on Codeigniter 4. I have two server 1st is dev and another is live, Both have php 8.1. I am using Codeigniter 4.2.10. For dev my code is working fine. In live I am getting error: Undefined function dot_array_search(); I checked this function is defined in helper and helper is invoked just above.
`CRITICAL -> Call to undefined function CodeIgniter\Router\dot_array_search()
in SYSTEMPATH/Router/RouteCollection.php on line 1257.
1 SYSTEMPATH/Router/RouteCollection.php(970): CodeIgniter\Router\RouteCollection->create()
2 SYSTEMPATH/Config/Routes.php(23): CodeIgniter\Router\RouteCollection->cli()
3 APPPATH/Config/Routes.php(11): require('SYSTEMPATH/Config/Routes.php')
4 SYSTEMPATH/CodeIgniter.php(789): require('APPPATH/Config/Routes.php')
5 SYSTEMPATH/CodeIgniter.php(430): CodeIgniter\CodeIgniter->tryToRouteIt()
6 SYSTEMPATH/CodeIgniter.php(351): CodeIgniter\CodeIgniter->handleRequest()
7 FCPATH/index.php(68): CodeIgniter\CodeIgniter->run()
`
Need help from seniors.

Related

Pushing Results to KiwiTCMS using RobotFramework Ride Issue

I am trying to get Robotframework(Ride) work with KiwiTCMS.
I am making the connection to the KIWI server (local) but I am getting these errors that I am not sure where(In RIDE? or the .conf file?) to fix:
[ ERROR ] Calling method 'start_suite' of listener 'zealand.listener.KiwiTCMS' failed: ENVIRONFILE Version value not defined, missing one of TCMS_PRODUCT_VERSION, TRAVIS_COMMIT, TRAVIS_PULL_REQUEST_SHA or GIT_COMMIT
[ ERROR ] Calling method 'end_test' of listener 'zealand.listener.KiwiTCMS' failed: TypeError: 'NoneType' object is not subscriptable
TestKiwiRide | PASS |
------------------------------------------------------------------------------
KiwiTest.TestKiwi | PASS |
1 test, 1 passed, 0 failed
==============================================================================
KiwiTest | PASS |
1 test, 1 passed, 0 failed
==============================================================================
Output: C:\Users\hendri\Documents\KiwiTest\output.xml
Log: C:\Users\hendri\Documents\KiwiTest\log.html
Report: C:\Users\hendri\Documents\KiwiTest\report.html
(kiwi-env) C:\Users\hendri\Documents\KiwiTest>
Please assit?
Details goes into the bat file you use to call the test cases
check here : https://kiwitcms.readthedocs.io/en/stable/plugins/automation-frameworks.html
In plugin configuration section, you have to passe configuration as environment variables. e.g.
export TCMS_PLAN_ID=*PLAN_ID*

rampUser method is getting stuck in gatling 3.3

I am having issues using rampUser() method in my gatling script. The request is getting stuck after the following entry which had passed half way through.
Version : 3.3
================================================================================
2019-12-18 09:51:44 45s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=2 KO=0 )
> graphql / request_0 (OK=1 KO=0 )
> rest / request_0 (OK=1 KO=0 )
---- xxxSimulation ---------------------------------------------------
[##################################### ] 50%
waiting: 1 / active: 0 / done: 1
================================================================================
I am seeing the following in the log which gets repeated for ever and the log size increases
09:35:46.495 [GatlingSystem-akka.actor.default-dispatcher-2] DEBUG io.gatling.core.controller.inject.open.OpenWorkload - Injecting 0 users in scenario xxSimulation, continue=true
09:35:47.494 [GatlingSystem-akka.actor.default-dispatcher-6] DEBUG io.gatling.core.controller.inject.open.OpenWorkload - Injecting 0 users in scenario xxSimulation, continue=true
The above issue is happening only with rampUser and not happening with
atOnceUsers()
rampUsersPerSec()
rampConcurrentUsers()
constantConcurrentUsers()
constantUsersPerSec()
incrementUsersPerSec()
Is there a way to mimic rampUser() in some other way or is there a solution for this.
My code is very minimal
setUp(
scenarioBuilder.inject(
rampUsers(2).during(1 minutes)
)
).protocols(protocolBuilder)
I am stuck with this for some time and my earlier post with more information can be found here
Can any of the gatling experts help me on this?
Thanks for looking into it.
It seems you have slightly incorrect syntax for a rampUsers. You should try remove a . before during.
I have in my own script this code and it works fine:
setUp(userScenario.inject(
// atOnceUsers(4),
rampUsers(24) during (1 seconds))
).protocols(httpProtocol)
Also, in Gatling documentation example is also without a dot Open model:
scn.inject(
nothingFor(4 seconds), // 1
atOnceUsers(10), // 2
rampUsers(10) during (5 seconds), // HERE
constantUsersPerSec(20) during (15 seconds), // 4
constantUsersPerSec(20) during (15 seconds) randomized, // 5
rampUsersPerSec(10) to 20 during (10 minutes), // 6
rampUsersPerSec(10) to 20 during (10 minutes) randomized, // 7
heavisideUsers(1000) during (20 seconds) // 8
).protocols(httpProtocol)
)
My guess is that syntax can't be parsed, so instead 0 is substituted. (Here is example of rounding. Not applicable, but as reference: gatling-user-injection-constantuserspersec)
Also, you mentioned that others method work, could you paste working code as well?

Samples from RcppArmadillo and R returns different outputs [duplicate]

I'm creating a document in a Rmarkdown file and knitting to HTML for file submission. Generating seeded samples using the sample function provide different results in the console and the knitted file.
I am using R Studio version 1.0.153 and R 3.6.0
edit: I have updated R Studio to version 1.2.1335 and am still having this issue
set.seed(1)
rnorm(1)
sample(1:10, 1)
in the console and knitted file, the value for rnorm(1) is the same, however, in the console, I see that I have sampled 6 in the console, and 7 in the knitted document
R 3.6.0 changed the sampling method. With the new method (default or Rejection) I get 7. With the old one I get 6:
set.seed(1)
rnorm(1)
#> [1] -0.6264538
sample(1:10, 1)
#> [1] 7
set.seed(1, sample.kind = "Rounding")
#> Warning in set.seed(1, sample.kind = "Rounding"): non-uniform 'Rounding'
#> sampler used
rnorm(1)
#> [1] -0.6264538
sample(1:10, 1)
#> [1] 6
Created on 2019-05-23 by the reprex package (v0.2.1)
So it seems you have somehow set sample.kind = "Rounding" in the console. You can check this from the output of RNGkind().

Bluez MediaEndpoint1 Timeout Issue When Replying To Dbus Call From Node Addon

Bluez Version: 5.43
Let me get straight to the point:
I have following error inside the Bluez log file:
Calling SetConfiguration: name = :1.3 path = /MediaEndpoint/A2DPSink
...
Endpoint replied with an error: org.freedesktop.DBus.Error.NoReply
If I change this line of code
#define REQUEST_TIMEOUT (3 * 1000) /* 3 seconds */
inside the ~/bluez-5.43/profiles/audio/media.c file,
to be a value greater, like 5 or so... The bug goes away.
So what is this bug?
basically, I have nodejs addon code that does the following:
Intialize endpoint
void endpoint_init(DBusConnection *connection, const char *endpoint) {
DBusObjectPathVTable vtable_endpoint;
vtable_endpoint.message_function = endpoint_handler;
dbus_connection_register_object_path(connection, endpoint, &vtable_endpoint, NULL);
}
Inside the Bluez log you will see bluetoothd[25176]: Endpoint registered: sender=:1.130 path=/MediaEndpoint/A2DPSink
The endpoint_handler function will be notified of a call to set_configuration or select_configuration function...
When a call is received, it will be be replied to like so...
sender = dbus_message_get_sender(m);
r = dbus_message_new_method_return(m);
printf("!! ----- endpoint_set_configuration, time_right_before_reply_sent: ");
print_time();
assert( dbus_connection_send(conn, r, NULL) );
dbus_connection_flush(conn);
printf("!! ----- endpoint_set_configuration, time_right_after_reply_sent: ");
print_time();
As you can see I am logging some time information.
Now, I also logged time information inside Bluez and recompiled it.
Here is log from Bluez:
bluetoothd[789]: profiles/audio/media.c:media_endpoint_async_call() Calling SetConfiguration: name = :1.3 path = /MediaEndpoint/A2DPSink
bluetoothd[789]: profiles/audio/media.c:endpoint_reply() [GOT HERE -- endpoint_reply -- original_msg --] SetConfiguration: name = :1.3 path = /MediaEndpoint/A2DPSink
bluetoothd[789]: profiles/audio/media.c:print_time() TIME BEFORE -- dbus_pending_call_steal_reply --: 2017-01-25 04:54:01
bluetoothd[789]: profiles/audio/media.c:print_time() TIME AFTER -- dbus_pending_call_steal_reply --: 2017-01-25 04:54:01
bluetoothd[789]: profiles/audio/media.c:endpoint_reply() [GOT HERE -- endpoint_reply -- reply_msg] (null): name = (null) path = (null)
bluetoothd[789]: Endpoint replied with an error: org.freedesktop.DBus.Error.NoReply
Here is log from my node addon:
endpoint_handler: path=/MediaEndpoint/A2DPSink, interface=org.bluez.MediaEndpoint1, member=SetConfiguration
!! ----- endpoint_set_configuration, endpoint_path: /MediaEndpoint/A2DPSink
!! ----- endpoint_set_configuration, time_right_before_reply_sent:
2017-01-25 04:54:03
!! ----- endpoint_set_configuration, time_right_after_reply_sent:
2017-01-25 04:54:03
You can CLEARLY see with the Bluez default timeout of 3 seconds is too short... the reply is still on its way...
But pulseaudio's implementation does not have this problem... why?
Is it because there are two different event loops, ie the node addon uses lib-uv event loop and Bluez and pulse use the glib event loop...
What is going on here, can anyone please explain.
I would prefer to either identify it as Bluez bug or understand how to fix it on my node addon end...
Thank You Stackoverflowers :)
P.S.
Bluez ~/bluez-5.43/profiles/audio/media.c has code that advises to keep the REQUEST_TIMEOUT at 3, this worries me...
/* Timeout should be less than avdtp request timeout (4 seconds) */
if (g_dbus_send_message_with_reply(btd_get_dbus_connection(),
msg, &request->call,
REQUEST_TIMEOUT) == FALSE) {
error("D-Bus send failed");
g_free(request);
return FALSE;
}
I found that there is some conflict with the glib and libuv running together under the same process..
the node-dbus addon i am using is a c level binding and it instantiates a glib event loop...
nodejs has a libuv event loop
they dont work well together...
this is what i can assume the problem is..
my solution was to rip the c code from bluez media enpoint and i created my own nodejs NAN bindings to it...without using any glib event loop.
this is the node-dbus library i am using:
https://github.com/Shouqun/node-dbus

How to use vendor library in cakephp 3

I am trying to import vendor library in cakephp 3 , but am not success yet to do this.
It is giving the error:
Call to undefined method Cake\Core\App::import()
and this is the code which am using:
App::import('vendor', 'PHPMailer', array('file' => 'PHPMailer' . DS . 'PHPMailerAutoload.php'));

Resources