Category "php"

How to find the date a user created their Google account

I referer this link Login with Google using PHP API library and other tutorial and implement Google Login API in my script. Once the user has logged in I am lo

Undefined Array Key error when uploading image on php

im new here, hope to grow into this community. I am currently learning php and i am making a program to upload a file. i found a tutorial with some code that ma

Timber: Single post pagination does not work (wp_link_pages)

I am fairly new to Timber and I am trying to get the pagination for a single post item working. Since there are a lot of topics around the pagination for archiv

Windows 10 defender detects Backdoor:PHP/Dirtelti.MTF for php file

I am running wamp with Windows 10 and I have a simple example code that uses eval function: <?php echo eval(file_get_contents('test2.php')); Windows defende

does swoole table destroy itself when swoole websocket server shuts down

i am setting up a Swoole web socket server for my chat application on CentOS 7 host machine. and will use Swoole table for storing users list. But i am not sure

Sendgrid 550 unauthenticated senders not allowed laravel swiftmailer

When I'm using SendGrid to send email in Laravel, it results in the following error: "550 unauthenticated senders not allowed" I couldn't find out why thi

PHP block shortcut in Visual Studio Code

How can I open a basic PHP block in Visual Studio Code, like so - <?php ?>? In Sublime Text I simply type php and press Tab, and the block is created. But

ldap is missing from system when installing adldap2 in laravel

firstly, im trying to install package inside the laravel composer using "composer install", but then it returns an error: Your requirements could not be resolv

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

When I run composer install on command promp, there exist error like this : Problem 1 - Installation request for laravel/horizon v1.1.0 -> satisfiabl

sort() not affecting original array while inside foreach loop

I have array with structure: Array ( [months] => Array ( [01] => Array ( [0] => 16

Finding and editing a WordPress site in cpanel w/o access to WordPress

I have a client who needs his website edited, he is no longer in contact with the original creator of the site, and it seems that the creator used WordPress to

How to install ZeroMQ for PHP on an Alpine Linux container?

To be able to push notifications via WebSockets from PHP using Ratchet, I need to install ZeroMQ as stated in the documentation. However I didn't find any infor

Javascript print function not working inside a modal

I want to print data from a pop-up modal on my website, so in the footer of the modal, I added a print button. (The extra divs at the end are from code above):

Required field only if another field has a value, must be empty otherwise

My question is about Laravel validation rules. I have two inputs a and b. a is a select input with three possible values: x, y and z. I want to write this rule

How to implement functions from PHP openssl_pkey_get_private, openssl_sign on NodeJS?

I write code according to the documentation, where the examples are shown in PHP $data = json_encode([...]); $key = openssl_pkey_get_private( file_get_c

Laravel Pagination links() not working

After doing this in my controller $activities = Package::where('attraction',1) ->where('hotel', 0) ->where('flight', 0)

Reading input in php from terminal

I want to read the following input in php which is entered in termial 3 5 1 4 0 2 5 2 0 5 1 4 4 1 1 7 2 1 13 2 1 3 3 1 7 2 5 4 Where: The first li

Phpunit partial mock + proxy Entity

I tried find solution to my issue but didn't find anything. I use: Symfony, Doctrine, PhpUnit I have one entity class InvoiceNumerator: /** * InvoiceNumerat

Cannot retrieve error message using Symfony HttpClient if the response is not "ok"

I use Symfony HttpClient to call an external API. When the status code is 200 I can use getContent() method to retrieve the API response. If the API response is

How to add class name to an existing tag in php

I have a hidden tag in html code: <p class="class1">something<p> and php code: if(SomeCondition){ select element by DOM and add class "active" so