Category "php"

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

How to disable only_full_group_by option in Laravel

I am new to laravel and I am having an issue with DB problem. I have disabled 'only_full_group_by' sql_mode by editing /etc/mysql/my.cnf file. And I checked sq

Vimeo API: how to save a vimeo into a subfolder?

Which api allow me as developer to move a video into a folder? I, for example, have the video https://vimeo.com/12345678. In my personal area, I created the f

Laravel Nova Dependency Container what are the allowed resource properties other than id in dependsOn

I have a belongsTo field on the selection of which i want to show/hide another field using nova dependency container. But it only allows to give id in the depen

Upload media post in instagram using web api

I am using this Instagram media post third party library. When I am logged in in my Instagram account every time I am getting a checkpoint (challenge) required

Symfony there are no commands defined in the "make" namespace

Following the documentation found here I enter php bin/console make:entity Product in Terminal and get the following error: [Symfony\Component\Console\Exceptio

Image upload not working through ajax Laravel

Having a weird issue and I'm sure it's got something to do with the way my script is grabbing the value of the file input field. I know the controller function

str_replace or preg_replace random number from string

I have a url from where i am fetching value using GET method and i want to replace that value with the 4 digit random number in the string like This is my main

Assign output of PHP function to a variable

Here's my current code: function get_coins() { global $conn; $new_sql = "SELECT * FROM marketcaps ORDER BY cap DESC LIMIT 25"; $new_result = $conn-

Live search query using JS and PHP for QA forum

I am working on a QA forum using PHP and MYSQL. Now, I am creating an ask a question page like StackOverflow. In the input box when I enter a value then I get m

How to send images to Stripe Checkout Session in Laravel 8

I am having issues trying to send images using Stripe Checkout Session, I am using Laravel 8, with the Backpack Admin panel plugin. I am using Stripe's prebuilt