Category "php"

php Blob url to directory

throught ajax send a blob url var blob = new Blob([content], { type: 'text/html; charset=utf-8' }); var urlBlob = URL.createObjectURL(blob); $.ajax({ url:

Unable to uninstall brew php from homebrew

I am trying to uninstall [email protected] using homebrew but it keeps on saying Error: No such keg: /usr/local/Cellar/[email protected] how to uninstall it and what is keg?

How to run a shell as root from php (apache)

I am using ubuntu server 20.04 LTS, where I have multiple shell files, using php from apache I need to run multiple shell files from a browser but need to run a

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

I use WooCommerce short-code [add_to_cart ] inside a widget sidebar On WordPress website to display “Add to cart” button on product pages (wanted to

Duplicate hidden form with not unique input ID

I have a layout that require to have the same form in 2 different place for mobile and desktop view What I did is to wrap both in a container that hide one or a

LARAVEL: How to fetch id dynamically in a query builder?

I want to join multiple tables in laravel with query builder. My problem is that my code only works if I specify the id myself that I want like this: $datauser

XAMPP/SQLSRV: Unable to find Sqlsrv in PHPINFO(); - errors coming from connection

I'm attempting to connect into a SQL Server DB I have hosted on my Linux VM. I'm running xampp on my development windows machine and the connection is coming fr

"There is no active transaction" when refreshing database in Laravel 8.0 test

Using php 8.0.2 and Laravel 8.37.0, I am running tests where for every test the database data should be refreshed, since there is conflicting data per test (due

The sum of the user's points

I am a beginner when it comes to PHP and it is not my specialty, I am rather in the front end and I have a big problem. I need to edit one of the tables after a

The PHP code skips the main image on my product feed from Woocommerce

This function should return an array of Woocommerce product photos links, but it seems that the product feed that is created take the main picture only when the

I want a way to give path to my files which are outside of public folder in laravel

suppose <link rel="stylesheet" href="{{asset('css/style.css')}}"> helps to get style.css file which is in public folder but similarly how can I access f

Implode columnar values between two arrays into a flat array of concatenated strings

I have two arrays, $array_A and $array_B. I'd like to append the first value from $array_B to the end of the first value of $array_A and repeat this approach fo

LTI integration with Laravel websites as LMS

There're two websites of educational courses. I own the one built with Laravel. I want to access another website's courses into my website. So basically I want

Swoole server run failed, "unsupported option [worker_max_concurrency] in @swoole-src"

i successfully install swoole on mac. but when i try to run it from the app dir php bin/console swoole:server:run the console return: Error: Uncaught ErrorExc

Group data in a multidimensional array based on two columns

I have an indexed array of associative arrays like this: [ ['brand' => 'ABC', 'model' => 'xyz', 'size' => 13], ['brand' => 'QWE', 'model' =&

Doctrine - The referenced column name 'id' has to be a primary key

Hy, I have problem with validation and schema creation I am creating an api via the api platform, (this is my 1st project under symfony) I have a constraint, th

How to use a PHP MVC Controller, one thats invoked by calling a URL, to call and execute more than one function? [duplicate]

Currently I have been teaching myself CodeIgniter3, which is a MVC framework. I am failing to understand a couple of things. One such subject

Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

Can anyone help me with this problem. When i try to create a docker image from a dockerfile for laravel application i get this error: checking for onigurum

how to avoid w3c markup validation to use server redirection via url checking

I found the w3c validator very useful for me for testing the final markup of a current page. I have a link for each of my page, like this: https://validator.w3.

Symfony 3.4 and MySQl 8. General error: 2006 MySQL server has gone away when running a transaction in a rabbitmq queue

I have one system (Symfony 5, symfony/messenger) sending data to another (Symfony 3.4, enqueue/enqueue-bundle 0.9) using a rabbitmq queue. The data is used to c