Run Joomla in Swoole ?
Moderator: mindphp
Run Joomla in Swoole ?
Run Joomla in Swoole ?
Hi
I wonder if anyone have experience of use swoole with Joomla similar like Drupal and Wordpress for swoole.
Hi
I wonder if anyone have experience of use swoole with Joomla similar like Drupal and Wordpress for swoole.
- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 46159
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
Re: Run Joomla in Swoole ?
Yes, you can run Joomla on Swoole, but it requires setting up a Swoole HTTP server and adapting Joomla to work in Swoole's asynchronous environment. This involves simulating PHP superglobals ($_GET, $_POST, etc.) and addressing challenges with Joomla's session handling and extensions compatibility.
It’s ideal for improving performance in specific use cases, like APIs,
but may require significant testing and adjustments.
It’s ideal for improving performance in specific use cases, like APIs,
but may require significant testing and adjustments.
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 46159
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
Re: Run Joomla in Swoole ?
Set Up a Swoole HTTP Server
Create a custom PHP script to act as the Swoole HTTP server. For example:
Save this file, for instance, as swoole-server.php.
Adjust Joomla's Configuration
Ensure Joomla can handle the non-traditional server setup:
Update the configuration.php file if needed to match the Swoole server environment.
Joomla’s index.php and framework might need slight tweaks to adapt to the Swoole request lifecycle.
Start the Swoole Server
Enjoy your joomla on swoole or fix bug ... 
Create a custom PHP script to act as the Swoole HTTP server. For example:
โค้ด: เลือกทั้งหมด
<?php
use Swoole\Http\Server;
$server = new Server("0.0.0.0", 9501);
$server->on("start", function ($server) {
echo "Swoole server started at http://127.0.0.1:9501\n";
});
$server->on("request", function ($request, $response) {
// Simulate a PHP environment for Joomla
$_SERVER = $request->server;
$_GET = $request->get ?? [];
$_POST = $request->post ?? [];
$_COOKIE = $request->cookie ?? [];
$_FILES = $request->files ?? [];
ob_start();
include __DIR__ . '/index.php';
$content = ob_get_clean();
$response->header("Content-Type", "text/html");
$response->end($content);
});
$server->start();
Adjust Joomla's Configuration
Ensure Joomla can handle the non-traditional server setup:
Update the configuration.php file if needed to match the Swoole server environment.
Joomla’s index.php and framework might need slight tweaks to adapt to the Swoole request lifecycle.
Start the Swoole Server
โค้ด: เลือกทั้งหมด
php swoole-server.php

ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
- byronvoyle
- PHP Newbie
- โพสต์: 1
- ลงทะเบียนเมื่อ: 26/12/2024 9:33 am
Re: Run Joomla in Swoole ?
Well, it seems like things are quite complicated. I tried and got errors
.

- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 46159
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
Re: Run Joomla in Swoole ?
show command andbyronvoyle เขียน: ↑26/12/2024 9:39 am Well, it seems like things are quite complicated. I tried and got errors.
show your errors .
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
-
- Similar Topics
- ตอบกลับ
- แสดง
- โพสต์ล่าสุด
-
-
โพสต์ใหม่ ทำเว็บ API แรงๆใช้กันด้วย Expressive + Swoole และการใช้ API บน Joomla (VDO)
โดย mindphp » 08/04/2022 9:42 pm » ใน PHP Knowledge - 1 ตอบกลับ
- 1525 แสดง
-
โพสต์ล่าสุด โดย mindphp
10/09/2022 3:58 pm
-
-
-
โพสต์ใหม่ อยากให้ทำเนื้อหา php Swoole เพิ่มค่อยติดตามอยู่
โดย somyote » 23/01/2025 10:05 am » ใน Programming - PHP - 1 ตอบกลับ
- 307 แสดง
-
โพสต์ล่าสุด โดย mindphp
24/01/2025 3:27 pm
-
-
-
โพสต์ใหม่ ติดตั้ง PHP Swoole บน Ubuntu 20.04
โดย mindphp » 07/03/2022 5:42 am » ใน Linux - Web Server - 4 ตอบกลับ
- 1505 แสดง
-
โพสต์ล่าสุด โดย mindphp
28/03/2022 3:08 am
-
ผู้ใช้งานขณะนี้
สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 3