WordPress: How to dynamically change sender email and from name within PHP function

I am using the following function to send emails on a WordPress website:

add_action( 'phpmailer_init', 'my_phpmailer_smtp' );
function my_phpmailer_smtp( $phpmailer ) {
    $phpmailer->From = 'Info';
    $phpmailer->FromName = '[email protected]';
}

We are currently building some custom functionality, sending transactional emails from the website. The sender from name/email depends on a few different factors and should dynamically updated.

Now, after setting the default from email and from name like above, how can I dynamically updated these within another PHP function? I have tried calling this phpmailer_init again within our own function, but then the from email and name are just empty. Any help would be appreciated.

mysqli_sql_exception: Access denied for user ‘root’@’localhost’ (using password: NO)

I facing this issue for couple of days. Iam working on a php web development project and iam using wamp3.3.5 . When I first encountered this situation I solved it by changing the port, But after couple of days I was met with the same error. This time I uninstalled the wamp server and installed it aggain. It worked for a single day, then the same error. Iam realy scared. I have some important files in there. Also please note that i don’t have any password since iam trying to access using root.

the steps i followed for changing port

  • in my.ini wrote skip-grant-tables after [mysqld]

-change all “port=number” present in my.ini to 3307.

  • changed $cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1’; to $cfg[‘Servers’][$i][‘host’] = ‘localhost:3307′; in config.inc.php

restarted the wamp server and it worked perfectly the first time. after installing the second time i tried to access mysql cli from the wamp tray menu. It worked. But on entering the same creds to phpMyAdmin this error popped up. So i followed the above given steps. Now I can open phpMyadmin But i the database which i was working in can no longer be seen.(it vanished). then i tried it through mysql cli. Still its missing.

Also this error is present in the Apache error log

Warning


The three 'port=number' directives in the MySQL my.ini file:
[client], [wampmysqld64], [mysqld]
do not have the port number defined in wampmanager.conf: mysqlPortUsed

Press ENTER to continue

PHP Date object that needs localization on the server [closed]

I have an Android app that needs to grant an in-app purchase benefit for 7 calendar days.
I have been able to calculate the difference in days and determine whether or not to grant the benefit.

However, I have not taken into consideration the internationalization of time.

I compute the extra 7 calendar days on a server via a hosting service. (I assume that wherever the user is that pins the server the call will go to the nearest server. So, I have a need for internationalized time!)

The server code that computes the extra 7 calendar days is as such:

$today = date_create();

date_modify($today,"+7 days");

$modified_date = date_format($today,"m/d/y"); //I see a big problem here with m/d/y format

echo "{$modified_date}";

From, the code above I can see that the format m/d/y will not work in European countries, since they use the d/m/y format!

How does this code adapt to where the server location is? Will the creation of the variable $today be Localized automatically or should I add something to it?

siremis configuretion on php8.3

I want to configure siremis on php version 8.3 and use it, is it possible? If so, how should I do it?

I used php version 7.3 and there was no problem, but after using php version 8.3 I lost the localhost configuration page and could not configure Siremis properly.

SplFileObject’s fgetcsv method reads ” as part of the text and not as a cell end character

I ran into a problem that SplFileObject’s fgetcsv method reads ” as part of the text and not as a cell end character

Example:

File:

;12;012345678;"foo";1;"100 000 000;"
;13;012345679;"bar";1;"100 000 000;"

Output:

(
    [0] => 
    [1] => 12
    [2] => 012345678
    [3] => foo";1;100 000 000
    [4] => 
;13;012345679;bar"
    [5] => 1
    [6] => 100 000 000;
)

Code:

$file = new SplFileObject('1.txt');
$file->openFile();
$file->setCsvControl(';');
while ($str = $file->fgetcsv()) {
    print_r($str);
}

Tell me, please, is it possible to force fgetcsv not to read “” as escaping?

Laravel 11 Axios POST Request to Controller Method Returns 404 Error

I’m facing an issue when trying to execute a POST request from the frontend using Axios to a Laravel controller method. The request URL returns a 404 error as below.
AxiosError {message: ‘Request failed with status code 404’, name: ‘AxiosError’, code: ‘ERR_BAD_REQUEST’, config: {…}, request: XMLHttpRequest, …}

My project uses a custom database connection middleware. Below are the detailed configurations and code snippets:
web.php

use AppHttpControllersClientDataController;
use AppHttpControllersQueryController;
use AppHttpControllersRecordingController;
use IlluminateSupportFacadesRoute;

Route::middleware(['auth', 'verified'])->group(function () {
    Route::get('/dashboard', fn() => Inertia::render('Dashboard'))->name('dashboard');

    // Routes that do not need the connection middleware
    Route::get('/clients', [ClientDataController::class, 'index'])->name('client.index');
    Route::get('/clients/create', [ClientDataController::class, 'create'])->name('client.create');
    Route::post('/clients', [ClientDataController::class, 'store'])->name('client.store');
    Route::delete('/clients/{client}', [ClientDataController::class, 'destroy'])->name('clients.destroy');
    Route::post('/set-connection', [ClientDataController::class, 'setConnection'])->name('set-connection');

    // Routes that need the connection middleware
    Route::middleware(['connection'])->group(function () {
        Route::get('/clients/{connection}/queries', [ClientDataController::class, 'show'])->name('clients.show');

        // Queries
        Route::get('/queries', [QueryController::class, 'index'])->name('query.index');
        Route::get('/queries/create', [QueryController::class, 'create'])->name('query.create');
        Route::post('/queries/store', [QueryController::class, 'store'])->name('query.store');
        Route::get('/queries/{id}', [QueryController::class, 'show'])->name('query.show');
        Route::get('/queries/{id}/edit', [QueryController::class, 'edit'])->name('query.edit');
        Route::put('/queries/{id}', [QueryController::class, 'update'])->name('query.update');
        Route::delete('/queries/{id}', [QueryController::class, 'destroy'])->name('query.destroy');
        Route::post('/query/verify', [QueryController::class, 'verify'])->name('query.verify');

        // Recordings
        **Route::post('/recordings/execute/{query}', [RecordingController::class, 'recordQueryExecution'])->name('recording-execution');
    });**
});

I’m so confusing why the error only happens in the ‘/recordings/execute/{query}’

I think the function ‘recordQueryExecution’ in the RecordingController is fine because when I executed it with query.store or quey.update. It’s work.

RecordingController.php

namespace AppHttpControllers;

use AppModelsQuery;
use AppModelsRecording;
use IlluminateSupportFacadesAuth;
use IlluminateSupportFacadesDB;
use IlluminateHttpRequest;

class RecordingController extends Controller
{
    public function recordQueryExecution(Query $query)
    {
        try {
            $result = DB::select($query->query_sql);
            $csvFilePath = $this->generateCsvFile($query->id, $result);

            $recording = new Recording();
            $recording->query_id = $query->id;
            $recording->query_sql = $query->query_sql;
            $recording->csv_file_path = $csvFilePath;
            $recording->updated_by = Auth::id();
            $recording->updated_at = now();
            $recording->status = 'success';
            $recording->save();

            return response()->json(['success' => true]);
        } catch (Exception $e) {
            $recording = new Recording();
            $recording->query_id = $query->id;
            $recording->query_sql = $query->query_sql;
            $recording->updated_by = Auth::id();
            $recording->updated_at = now();
            $recording->status = 'fail';
            $recording->fail_reason = $e->getMessage();
            $recording->save();

            return response()->json(['success' => false, 'message' => $e->getMessage()], 500);
        }
    }

    private function generateCsvFile($queryId, $result)
    {
        $csvDir = storage_path("app/public/csv");

        if (!file_exists($csvDir)) {
            mkdir($csvDir, 0777, true);
        }

        $csvFileName = "query_{$queryId}_" . now()->format('Ymd_His') . '.csv';
        $csvFilePath = "{$csvDir}/{$csvFileName}";

        $file = fopen($csvFilePath, 'w');

        if (!empty($result)) {
            fputcsv($file, array_keys((array)$result[0]));
        }

        foreach ($result as $row) {
            fputcsv($file, (array)$row);
        }

        fclose($file);

        return $csvFileName;
    }
}

Axios Request in Show.jsx:

import axios from 'axios';

const runQuery = async (queryId) => {
        try {
            const response = await axios.post(`/recordings/execute/${queryId}`);
            if (response.data.success) {
                window.location.reload();
            } else {
                console.error("Error running query:", response.data.message);
            }
        } catch (error) {
            console.error("Error running query:", error);
        }
    };

I’m not sure but maybe it’s the reason I used the wrong way to register the middleware.

bootstrap/app.php

<?php

use IlluminateFoundationApplication;
use IlluminateFoundationConfigurationExceptions;
use IlluminateFoundationConfigurationMiddleware;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware) {
        $middleware->web(append: [
            AppHttpMiddlewareHandleInertiaRequests::class,
            IlluminateHttpMiddlewareAddLinkHeadersForPreloadedAssets::class,
            AppHttpMiddlewareConnection::class,
        ]);

        $middleware->alias([
            'connection' => AppHttpMiddlewareConnection::class,
        ]);
    })
    ->withExceptions(function (Exceptions $exceptions) {
        //
    })->create();

Are there any obvious issues with my routes or controller methods that might be causing this 404 error?

Tried
1.Verified the routes in web.php are correctly set.
2.Confirmed that the recordQueryExecution method works when called directly from QueryController.

How to Create a Separate Algolia Index for JSON Attributes in Laravel Model

I have a Laravel model called Car, with a JSON attribute named arabic_data. This attribute stores the same car model but with values in Arabic. Here’s an example of how I create and populate the model:

$car = new Car();
$car->fill([
            'make_id' => 1,
            'model_id' => 1,
            'year' => 2024,
            'body_type_id' => 1,
            'km' => 50000,
// other attributes...
        ]);

$arabicCar = $car->clone();
$arabicCar->fill([
            'body_type' => self::BODY_TYPE_ARABIC_MAPPER[$valuationData['carNameBody']] // other Arabic attributes...

        ]);
$car->arabic_data = $arabicCar->toJson();
$car->save();
return $car;

When synchronizing this model to Algolia, it gets saved with one index. The Arabic data is treated as another attribute, and Algolia creates indexes based on the model ID. Thus, I can’t create a new index for the Arabic data separately because both the original and Arabic versions share the same ID.

My question:
Is there a way to configure Algolia to create a separate index specifically for the Arabic data stored in the JSON attribute Arabic_data? If so, how can I implement this in my Laravel application?

WooCommerce does not cancel a pending order

WooCommerce does not cancel a pending order after 60 minutes what should i do to resolve this problem ?

I did many things like updating wordpress or WooCommerce but it didn’t work.

please let me know if you have any solution.

thanks

Moving through pages using PHP

ok, this is may problem:
suppose I reach page ‘B’ clicking a button in page ‘A’, then reach page ‘C’ starting from page ‘B’ etc..
because I know path, in page B I can put <a href="/pathBackToPageA">Go Back </a> to go back form B to A and so on and after I could return page A going back from C to B and the to A.
Suppose now you want reach page B starting from page D obviously you would return to D going back form C to B and from B to D, but in page B the ‘Go Back’ button is pointing A . So wich is the way, if you want have only a button to go back the right page ?

I was trying this class :

class ReturnHereVM
{
    protected string $base='/';
    protected string $backWardPage='';
    protected string $forWardPage='';
    protected string $curPage='';
    protected string $curController='';

    public function __construct(
        ?string $curController='',
    ){
        $this->curController=$curController;
    }

    public function getBackWardPage()
    { 
        return $this->backWardPage;
    }
    public function getCurPage(){
        if(isset($_SESSION['returnHere']['curPage'])){
            $this->curPage= $_SESSION['returnHere']['curPage'];
        }
        return $this->curPage;
    }
    public function getForWardPage()
    {
        return $this->forWardPage;
    }
    public function getCurController()
    {
        return $this->curController;
    }
    public function setCurController($val){
        $this->curController=$val;
    }
    public function setBackWard($val){
        $_SESSION['returnHere']['backWard'] = $val;
        $this->backWardPage=$val;
    }
    public function setCurPage($val){
        $_SESSION['returnHere']['curPage']=$val;
        $this->curPage=$val;
    }
    public function setForWard($val)
    {
        $_SESSION['returnHere']['forWard'] = $val;
        $this->forWardPage=$val;
    }
    public function setBacPages(){

    }
    public function setPages(string $start,string $val,string $fval){
        if($start=='i'){
            unset($_SESSION['returnHere']);
            $this->setBackWard($this->base);
        }else{
            $this->setBackWard($start);
        }
        $this->setCurPage($val);
        $this->setForWard($fval);

}

but it goes fine only if i go from page A to B and return directly to A from B.
Steps I performed are:
($this->contrName is controller Name of the page;
$this->pagination is the object class of the paginator;)

in page A

        //because page A is the first, previous is Index = 'i'
        $thisPage= '/' . $this->contrName . '/list/pag&' . $this->pagination->getPage();
        $nextPage='/'.$this->contrName.'/detail/';//this is to reach page B
        $this->returnHere->setPages('i',$thisPage,$nextPage);

in page B

        $prevPage=  $this->returnHere->getCurPage();
        $thisPage= '/' . $this->contrName . '/detail/' . $id;
        $nextPage= '/' . $this->contrName . '/edit/'.$id;//this is to reach page C
        $this->returnHere->setPages($prevPage, $thisPage, $nextPage);

in page C

        $prevPage =  $this->returnHere->getCurPage();
        $thisPage = '/' . $this->contrName . '/edit/' . $id;
        $nextPage = '';//this is last page of the series
        $this->returnHere->setPages($prevPage, $thisPage, $nextPage);

but if I should return from C to B I never could return A!
because this isn’t right way I didn’t try from page D

deploy flutter web and laravel as backend api to ubuntu nginx

frontend flutter works fine at domain. when I open console at browser I found these error.

[Error] Origin https://www.championmaung.com is not allowed by Access-Control-Allow-Origin. Status code: 404
[Error] XMLHttpRequest cannot load https://championmaung.com/api/login due to access control checks.
Failed to load resource: Origin https://www.championmaung.com is not allowed by Access-Control-Allow-Origin. Status code: 404

I am not sure the about configuration and laravel works correctly.

configuration file here

root@srv543846:/etc/nginx/sites-available# nano flutter

server {
    listen 80;
    listen [::]:80;

    server_name championmaung.com www.championmaung.com;

    root /var/www/html/web;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }

    error_page 404 /index.html;

    location ~ /. {
        deny all;
    }


}

root@srv543846:/etc/nginx/sites-available# nano laravel

server {
    listen 80;
    server_name championmaung.com www.championmaung.com; # Replace with your domain or IP

    root /var/www/html/laravel_for_football/public;
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ .php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; # Ensure the PHP version matches
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

-rw-rw-r– 1 root root 1217 Jun 22 15:15 default.conf
lrwxrwxrwx 1 root root 34 Jun 22 08:13 flutter -> /etc/nginx/sites-available/flutter
lrwxrwxrwx 1 root root 34 Jun 22 13:13 laravel -> /etc/nginx/sites-available/laravel

root@srv543846:/etc/nginx/sites-enabled# nano default.conf

server {
    if ($host = www.championmaung.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = championmaung.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    listen [::]:80;
    server_name championmaung.com www.championmaung.com api.championmaung.com;

    return 301 https://$host$request_uri;




}
server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name championmaung.com www.championmaung.com;
    ssl_certificate /etc/letsencrypt/live/championmaung.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/championmaung.com/privkey.pem; # managed by Certbot

    root /var/www/html/web;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
    }

    error_page 404 /index.html;

    location ~ /. {
        deny all;
 }
    location /api {
        alias /var/www/html/laravel_for_football/public;
        try_files $uri $uri/ /index.php?$query_string;

        location ~ .php$ {
            include snippets/fastcgi-php.conf;
            fastcgi_param SCRIPT_FILENAME $request_filename;
            include fastcgi_params;
        }
    }


}

Laravel Foreach in Foreach Loop (Loop Design)

I am making a registration system with reference. Everything works fine so far, but there’s a point I’m stuck on.

First of all, anyone who is a member can invite someone. The person who accepts the invitation can register with the reference code of the person who sent the invitation.

However, there is such a situation in the system. Person A invited person B, person B invited person C. There are three people in the system.

When person A enters the panel, she should be able to see people B and C in the guest list.

This list will go on and on, the more foreach loops I add to the foreach loop, the more people in the lower row I can reach. How can I design this loop until I get to the last person?

enter image description here

My example foreach loop:

@php $leg = AppModelReference::where(['user_id' => $reference->worker_id])->get(); @endphp

@foreach($leg as $user)
   {{ $user->user->name }}

   @php $leg = AppModelReference::where(['user_id' => $user->worker_id])->get(); @endphp

   @foreach($leg as $user)
      {{ $user->user->name }}
   @endforeach
@endforeach

Since the records are cross-linked to each other, I don’t know how to design a loop and how to display information about how many people have been invited via one person at a time.

How to change a Lesson in my course site project with Laravel and Livewire

Good evening. I’m coming to you because I’m facing an issue with my project.
I’m developing a courses web site and everything is working great, except when changing courses lessons. I mean, if I start playing a video on the platform, it does it just one time, for example, from lesson 1 to lesson 2, or 2 to 1. But it does it just one time, then it doesn’t change video,
lesson name, description etc.

This is my Livewire Controller/Model.

<?php

namespace AppLivewire;

use LivewireComponent;
use AppModelsCourse;
use AppModelsLesson;
use IlluminateFoundationAuthAccessAuthorizesRequests;

class CourseStatus extends Component
{
    use AuthorizesRequests;

    public $course, $current;

    public function mount(Course $course)
    {
        $this->course = $course;

        foreach ($course->lessons as $lesson) {
            if (!$lesson->completed) {
                $this->current = $lesson;
                break;
            }
        }

        if (!$this->current) {
            $this->current = $course->lessons->last();
        }

        $this->authorize('enrolled', $course);
    }

    public function render()
    {
        return view('livewire.course-status');
    }

    // Métodos
    public function changeLesson(Lesson $lesson)
    {
        $this->current = $lesson;
    }

    public function completed()
    {
        if ($this->current->completed) {
            // Eliminar registro
            $this->current->users()->detach(auth()->user()->id);
        } else {
            // Agregar registro
            $this->current->users()->attach(auth()->user()->id);
        }

        $this->current = Lesson::find($this->current->id);
        $this->course = Course::find($this->course->id);
    }

    // Propiedades computadas
    public function getIndexProperty()
    {
        return $this->course->lessons->pluck('id')->search($this->current->id);
    }

    public function getPreviousProperty()
    {
        if ($this->index == 0) {
            return null;
        } else {
            return $this->course->lessons[$this->index - 1];
        }
    }

    public function getNextProperty()
    {
        if ($this->index == $this->course->lessons->count() - 1) {
            return null;
        } else {
            return $this->course->lessons[$this->index + 1];
        }
    }

    public function getAdvanceProperty()
    {
        $i = 0;

        foreach ($this->course->lessons as $lesson) {
            if ($lesson->completed) {
                $i++;
            }
        }

        $advance = ($i * 100) / ($this->course->lessons->count());

        return round($advance, 2);
    }

    public function download()
    {
        return response()->download(storage_path('app/' . $this->current->resource->url));
    }
}

This is where I get the course id and of course the lesson id. With this I change the lesson with the Next and Previous stuff. Download lesson content and everything related to the play lesson view.

Observer: Lesson Observer

This is where I Create, Update and Delete a Lesson.

<?php

namespace AppObservers;

use AppModelsLesson;
use AppModelsCourse;
use IlluminateSupportFacadesStorage;

class LessonOberver
{
    public function creating(Lesson $lesson)
    {
        $url = $lesson->video_path;
        $lesson->video_frame = '<video x-ref="player" playsinline controls data-poster=""><source src="'. $url .'" type="video/mp4" /></video>';
    }

    public function updating(Lesson $lesson)
    {
        $url = $lesson->video_path;
        $lesson->video_frame = '<video x-ref="player" playsinline controls data-poster=""><source src="'. $url .'" type="video/mp4" /></video>';
    }

    public function deleting(Lesson $lesson)
    {
        if ($lesson->resource) {
            Storage::delete($lesson->resource->image_path);
            $lesson->resource->delete();
        }
    }
}

Finally, my view:

<div class="mt-8">
    @push('stylesheets')
    <link rel="stylesheet" href="https://cdn.plyr.io/3.7.8/plyr.css" />
    @endpush
    <div class="container grid grid-cols-1 lg:grid-cols-3 gap-8">
        <div class="lg:col-span-2">
            {{-- Reproductor de video --}}
            <div class="">
                @if ($current->video_path)
                    <div>
                        <div x-data x-init="let player = new Plyr($refs.player)">
                            {!! $current->video_frame !!}
                        </div>
                    </div>
                @endif
            </div>

            <h1 class="text-3xl text-gray-600 font-bold mt-4">
                {{ $current->name }}
            </h1>

            @if ($current->description)
                <div class="text-gray-600 mt-2">
                    <p class="text-slate-600">{{ $current->description->name }}</p>
                </div>
            @endif

            {{-- Marcar como culminado --}}
            <div class="flex justify-between mt-4">
                <div class="flex items-center" wire:click="completed">
                    @if ($current->completed)
                        <i class="fas fa-toggle-on text-green-500 text-2xl cursor-pointer transition duration-150 ease-out"></i>
                    @else
                        <i class="fas fa-toggle-off text-neutral-400 text-2xl cursor-pointer transition duration-150 ease-out"></i>
                    @endif
                    <p class="text-sm ml-2 dark:text-neutral-200">Marcar esta unidad como culminada</p>
                </div>

                @if ($current->resource)
                    <div wire:click="download" class="flex items-center">
                        <i class="fa-solid fa-cloud-arrow-down text-neutral-500 hover:text-green-500 text-lg cursor-pointer transition duration-150 ease-out mr-3"></i>
                        <p class="text-slate-600 hover:text-green-500 transition duration-150 ease-out cursor-pointer">Descargar recurso</p>
                    </div>
                @endif
            </div>

            <div class="card mt-4">
                <div class="card-body flex text-gray-500 font-semibold items-center">
                    @if ($this->previous)
                        <a wire:click="changeLesson({{ $this->previous }})" class="cursor-pointer text-sm md:text-base">Lección anterior</a>
                    @endif

                    @if ($this->next)
                        <a wire:click="changeLesson({{ $this->next }})" class="ml-auto cursor-pointer text-sm md:text-base">Siguiente lección</a>
                    @endif
                </div>
            </div>
        </div>

        <div class="card">
            <div class="card-body">
                <h1 class="text-2xl lead-8 text-center mb-4">{{ $course->title }}</h1>

                <div class="flex items-center">
                    <figure>
                        <img class="w-12 h-12 object-cover rounded-full mr-4" src="{{ $course->teacher->profile_photo_url }}" alt="">
                    </figure>
                    <div>
                        <p>{{ $course->teacher->name }}</p>
                        <a class="text-blue-500 text-sm" href="">{{ '@' . Str::slug($course->teacher->name, '') }}</a>
                    </div>
                </div>

                <p class="text-neutral-600 text-sm mt-3">{{ $this->advance . '%' }} completado</p>
                <div class="relative pt-2">
                    <div class="overflow-hidden h-2 mb-4 text-xs flex rounded bg-gray-200">
                        <div style="width:{{ $this->advance . '%' }}" class="shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-green-500 transition-all duration-1000"></div>
                    </div>
                </div>

                <ul>
                    @foreach ($course->sections as $section)
                        <li class="text-gray-600 mb-4">
                            <a class="font-bold text-base inline-block mb-2" href="">{{ $section->name }}</a>

                            <ul>
                                @foreach ($section->lessons as $lesson)

                                    <li class="flex mb-1">
                                        <div>

                                            @if ($lesson->completed)
                                                @if ($current->id == $lesson->id)
                                                    <span class="inline-block w-4 h-4 border-2 border-green-300 rounded-full mr-2 mt-1 transition-all duration-1000"></span>
                                                @else
                                                    <span class="inline-block w-4 h-4 bg-green-300 rounded-full mr-2 mt-1 transition-all duration-1000"></span>
                                                @endif

                                            @else
                                                @if ($current->id == $lesson->id)
                                                    <span class="inline-block w-4 h-4 border-2 border-gray-500 rounded-full mr-2 mt-1 transition-all duration-1000"></span>
                                                @else
                                                    <span class="inline-block w-4 h-4 bg-gray-500 rounded-full mr-2 mt-1 transition-all duration-1000"></span>
                                                @endif

                                            @endif
                                        </div>
                                        <a class="cursor-pointer" wire:click="changeLesson({{ $lesson }})">{{ $lesson->name }}</a>
                                    </li>
                                @endforeach
                            </ul>

                        </li>
                    @endforeach
                </ul>
            </div>
        </div>
    </div>

    @push('js')
    <script src="https://cdn.plyr.io/3.7.8/plyr.js"></script>
    <script>
        const player = new Plyr('#player');
    </script>
    @endpush
</div>

Here’s a video to show you what I meaning:

https://drive.google.com/file/d/1OyOeITIILcwz8UTWqhyP1zhswfixS3iT/view?usp=sharing

Thanks in advance.

Implementing PHP into Django project [closed]

I have a project done in PHP format and I have to include Python Django to implement my machine learning algorithms such as SVM, random forest, logistic regression, and naive Bayes. Is it possible to do so? Can I use my Django project to include my PHP files? Also, my PHP files are under xampp htdocs while my Django project is under the C: folder

Can you help me with the codings so I can put them in my Django project to include my PHP files?

Unable to install openswoole with PHP 8.3 on ubuntu-22.04

I want to install ext-openswoole on my machine that running ZorinOS 17.1 Core based from Ubuntu 22.04. I was try to run sudo apt install php8.3-openswoole but it says:

E: Unable to locate package php8.3-openswoole
E: Couldn't find any package by glob 'php8.3-openswoole'

I was add PPA with running command sudo add-apt-repository ppa:openswoole/ppa -y but still getting the error. Try installing with sudo pecl install openswoole-22.1.2 I get this long output:

WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading openswoole-22.1.2.tgz ...
Starting to download openswoole-22.1.2.tgz (1,252,932 bytes)...done: 1,252,932 bytes
485 source files, building
running: phpize
Configuring for:
PHP Api Version:         20230831
Zend Module Api No:      20230831
Zend Extension Api No:   420230831
config.m4:327: warning: The macro `AC_PROG_CC_C99' is obsolete.
config.m4:327: You should run autoupdate.
./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from...
config.m4:327: the top level
configure.ac:165: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:165: You should run autoupdate.
build/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:165: the top level
enable coroutine sockets? [no] : 
enable openssl support? [no] : yes
enable http2 protocol? [no] : yes
enable coroutine mysqlnd? [no] : yes
enable coroutine curl? [no] : yes
enable coroutine postgres? [no] : 
building in /tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2
running: /tmp/pear/temp/openswoole/configure --with-php-config=/usr/bin/php-config --enable-sockets=no --enable-openssl=yes --enable-http2=yes --enable-mysqlnd=yes --enable-hook-curl=yes --with-postgres=no
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20230831
checking for PHP installed headers prefix... /usr/include/php/20230831
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking enable debug log... no
checking enable trace log... no
checking enable sockets support... no
checking enable openssl support... yes
checking enable HTTP2 support... yes
checking openswoole support... yes, shared
checking enable mysqlnd support... yes
checking enable PostgreSQL support... no
checking enable c-ares support... no
checking dir of openssl... no
checking dir of jemalloc... no
checking enable asan... no
checking if compiling with clang... no
checking for pthread_mutexattr_setrobust in -lpthread... yes
checking for pthread_mutex_consistent in -lpthread... yes
checking for ares_gethostbyname in -lcares... no
checking for gzgets in -lz... no
checking for BrotliEncoderCreateInstance in -lbrotlienc... no
checking for cpu affinity... yes
checking for socket REUSEPORT... yes
checking for ucontext... yes
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking for valgrind... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for struct cmsghdr... yes
checking for hstrerror... yes
checking for socketpair... yes
checking for if_nametoindex... yes
checking for if_indextoname... yes
checking for netdb.h... yes
checking for netinet/tcp.h... yes
checking for sys/un.h... yes
checking for sys/sockio.h... no
checking for field ss_family in struct sockaddr_storage... yes
checking if getaddrinfo supports AI_V4MAPPED... yes
checking if getaddrinfo supports AI_ALL... yes
checking if getaddrinfo supports AI_IDN... yes
checking if gethostbyname2_r is supported... yes
checking for valgrind... no
checking for clock_gettime in -lrt... yes
checking openssl fallback dir... checking for SSL_connect in -lssl... yes
checking openswoole coverage... enabled
checking whether the compiler supports GNU C++... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for g++ option to enable C++11 features... (cached) none needed
checking how to run the C++ preprocessor... g++ -E
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %sn
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) nawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/libtool --tag=CXX --mode=compile g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis  -DHAVE_CONFIG_H  -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11    -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/php_swoole.cc -o ext-src/php_swoole.lo  -MMD -MF ext-src/php_swoole.dep -MT ext-src/php_swoole.lo
libtool: compile:  g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/php_swoole.cc -MMD -MF ext-src/php_swoole.dep -MT ext-src/php_swoole.lo  -fPIC -DPIC -o ext-src/.libs/php_swoole.o
/bin/bash /tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/libtool --tag=CXX --mode=compile g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis  -DHAVE_CONFIG_H  -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11    -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/php_swoole_cxx.cc -o ext-src/php_swoole_cxx.lo  -MMD -MF ext-src/php_swoole_cxx.dep -MT ext-src/php_swoole_cxx.lo
libtool: compile:  g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/php_swoole_cxx.cc -MMD -MF ext-src/php_swoole_cxx.dep -MT ext-src/php_swoole_cxx.lo  -fPIC -DPIC -o ext-src/.libs/php_swoole_cxx.o
/bin/bash /tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/libtool --tag=CXX --mode=compile g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis  -DHAVE_CONFIG_H  -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11    -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_atomic.cc -o ext-src/swoole_atomic.lo  -MMD -MF ext-src/swoole_atomic.dep -MT ext-src/swoole_atomic.lo
libtool: compile:  g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_atomic.cc -MMD -MF ext-src/swoole_atomic.dep -MT ext-src/swoole_atomic.lo  -fPIC -DPIC -o ext-src/.libs/swoole_atomic.o
/bin/bash /tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/libtool --tag=CXX --mode=compile g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis  -DHAVE_CONFIG_H  -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11    -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_channel_coro.cc -o ext-src/swoole_channel_coro.lo  -MMD -MF ext-src/swoole_channel_coro.dep -MT ext-src/swoole_channel_coro.lo
libtool: compile:  g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_channel_coro.cc -MMD -MF ext-src/swoole_channel_coro.dep -MT ext-src/swoole_channel_coro.lo  -fPIC -DPIC -o ext-src/.libs/swoole_channel_coro.o
/bin/bash /tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/libtool --tag=CXX --mode=compile g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis  -DHAVE_CONFIG_H  -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11    -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_client.cc -o ext-src/swoole_client.lo  -MMD -MF ext-src/swoole_client.dep -MT ext-src/swoole_client.lo
libtool: compile:  g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_client.cc -MMD -MF ext-src/swoole_client.dep -MT ext-src/swoole_client.lo  -fPIC -DPIC -o ext-src/.libs/swoole_client.o
/bin/bash /tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/libtool --tag=CXX --mode=compile g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis  -DHAVE_CONFIG_H  -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11    -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_client_coro.cc -o ext-src/swoole_client_coro.lo  -MMD -MF ext-src/swoole_client_coro.dep -MT ext-src/swoole_client_coro.lo
libtool: compile:  g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_client_coro.cc -MMD -MF ext-src/swoole_client_coro.dep -MT ext-src/swoole_client_coro.lo  -fPIC -DPIC -o ext-src/.libs/swoole_client_coro.o
In file included from /usr/include/php/20230831/Zend/zend.h:30,
  from /usr/include/php/20230831/main/php.h:31,
  from /tmp/pear/temp/openswoole/php_openswoole.h:18,
  from /tmp/pear/temp/openswoole/ext-src/php_swoole_private.h:25,
  from /tmp/pear/temp/openswoole/ext-src/php_swoole_cxx.h:19,
  from /tmp/pear/temp/openswoole/ext-src/swoole_client_coro.cc:17:
/tmp/pear/temp/openswoole/ext-src/swoole_client_coro.cc: In function ‘void zim_swoole_client_coro_peek(zend_execute_data*, zval*)’:
/usr/include/php/20230831/Zend/zend_alloc.h:100:16: warning: comparison of integer expressions of different signedness: ‘zend_long’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
  100 |         ((size <= ZEND_MM_MAX_LARGE_SIZE) ? _emalloc_large(size) : _emalloc_huge(size)) 
/usr/include/php/20230831/Zend/zend_alloc.h:105:17: note: in expansion of macro ‘ZEND_ALLOCATOR’
  105 |               ZEND_ALLOCATOR(size) 
      |                 ^~~~~~~~~~~~~~
/usr/include/php/20230831/Zend/zend_alloc.h:151:65: note: in expansion of macro ‘_emalloc’
  151 | #define emalloc(size)                                           _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
      |                                                                 ^~~~~~~~
/tmp/pear/temp/openswoole/ext-src/swoole_client_coro.cc:740:20: note: in expansion of macro ‘emalloc’
  740 |     buf = (char *) emalloc(buf_len + 1);
      |                    ^~~~~~~
/bin/bash /tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/libtool --tag=CXX --mode=compile g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis  -DHAVE_CONFIG_H  -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11    -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_coroutine.cc -o ext-src/swoole_coroutine.lo  -MMD -MF ext-src/swoole_coroutine.dep -MT ext-src/swoole_coroutine.lo
libtool: compile:  g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_coroutine.cc -MMD -MF ext-src/swoole_coroutine.dep -MT ext-src/swoole_coroutine.lo  -fPIC -DPIC -o ext-src/.libs/swoole_coroutine.o
/tmp/pear/temp/openswoole/ext-src/swoole_coroutine.cc: In function ‘void zim_swoole_coroutine_select(zend_execute_data*, zval*)’:
/tmp/pear/temp/openswoole/ext-src/swoole_coroutine.cc:1315:18: warning: variable ‘key’ set but not used [-Wunused-but-set-variable]
 1315 |     zend_string *key;
      |                  ^~~
/tmp/pear/temp/openswoole/ext-src/swoole_coroutine.cc: At global scope:
/tmp/pear/temp/openswoole/ext-src/swoole_coroutine.cc:72:26: warning: ‘zend_vm_interrupt’ defined but not used [-Wunused-variable]
   72 | static zend_atomic_bool *zend_vm_interrupt = nullptr;
      |                          ^~~~~~~~~~~~~~~~~
/bin/bash /tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/libtool --tag=CXX --mode=compile g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis  -DHAVE_CONFIG_H  -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11    -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_coroutine_scheduler.cc -o ext-src/swoole_coroutine_scheduler.lo  -MMD -MF ext-src/swoole_coroutine_scheduler.dep -MT ext-src/swoole_coroutine_scheduler.lo
libtool: compile:  g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_coroutine_scheduler.cc -MMD -MF ext-src/swoole_coroutine_scheduler.dep -MT ext-src/swoole_coroutine_scheduler.lo  -fPIC -DPIC -o ext-src/.libs/swoole_coroutine_scheduler.o
/bin/bash /tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/libtool --tag=CXX --mode=compile g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis  -DHAVE_CONFIG_H  -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11    -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_coroutine_system.cc -o ext-src/swoole_coroutine_system.lo  -MMD -MF ext-src/swoole_coroutine_system.dep -MT ext-src/swoole_coroutine_system.lo
libtool: compile:  g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_coroutine_system.cc -MMD -MF ext-src/swoole_coroutine_system.dep -MT ext-src/swoole_coroutine_system.lo  -fPIC -DPIC -o ext-src/.libs/swoole_coroutine_system.o
/bin/bash /tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/libtool --tag=CXX --mode=compile g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis  -DHAVE_CONFIG_H  -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11    -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_curl.cc -o ext-src/swoole_curl.lo  -MMD -MF ext-src/swoole_curl.dep -MT ext-src/swoole_curl.lo
libtool: compile:  g++ -I. -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/include -I/tmp/pear/temp/pear-build-rootZfDe2U/openswoole-22.1.2/main -I/tmp/pear/temp/openswoole -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/tmp/pear/temp/openswoole -I/tmp/pear/temp/openswoole/include -I/tmp/pear/temp/openswoole/ext-src -I/tmp/pear/temp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/openswoole/ext-src/swoole_curl.cc -MMD -MF ext-src/swoole_curl.dep -MT ext-src/swoole_curl.lo  -fPIC -DPIC -o ext-src/.libs/swoole_curl.o
In file included from /tmp/pear/temp/openswoole/ext-src/swoole_curl.cc:17:
/tmp/pear/temp/openswoole/ext-src/php_swoole_curl.h:25:10: fatal error: curl/curl.h: No such file or directory
   25 | #include <curl/curl.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:248: ext-src/swoole_curl.lo] Error 1
ERROR: `make' failed

At the end it says ‘make’ failed.
Is openswoole doesn’t support PHP8.3 ?

I was restarting my machine several times but the error still exist. I also try to run composer require openswoole/core but this library require the ext-openswoole. Hope someone help me