Skip to content

DCoder and php include files on Android

I’ve downloaded the DCoder app for Android on Google play hoping to code some php code on Android. However, I’ve created two php files in the top level directory and included one from the other with require_once. The result was that DCoder couldn’t find the other file. Is it possible to incl…

Include files from function

I am trying to include a file from a function. This function doesn’t return anything, it is just initializing many things. This function also apply the language so I need to include the language file….

Instantiate object from an accessor

I have a strange issue with php and instantiating objects: Background There’s a class structure I’ve created (some interfaces, some traits etc) where I automatically extend a class with a whole load …

Recaptcha v2 not validating in PHP

I am trying to validate google recaptcha V2 in my PHP application registration form. But its not getting validated. Its giving a success message and its redirecting to the login page. Can someone …

Use Laravel Eloquent joining

Hello I want to retrieve only rows of quizzes that the student didn’t take yet When he completes a quiz the variable done in QuizStudent table is going to become 1 Quiz table My relationships: …

Database migration not working in Laravel 7

I get this type of exception in all my Laravel projects. IlluminateDatabaseQueryException SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * …

PHPUnit Stalling in CI

We’re having an issue with PHPUnit sometimes failing to correctly run our test suite in CI. The behaviour manifests as roughly 1/3 tests failing to start and the CI step timing out. Interestingly enough, we don’t see this behaviour: Locally on our machines Every time we run the tests Occur with th…