Skip to main content

6 posts tagged with "joomla"

View All Tags

Joomla - Run a SQL statement outside Joomla and display a nice HTML table

5 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Joomla - Run a SQL statement outside Joomla and display a nice HTML table

A long time ago, years from now, I needed to expose data from my Joomla site in a simple web page outside Joomla, as an HTML table. This was so that I could link a Microsoft Excel spreadsheet to this table and therefore, in Excel, simply do a Refresh to obtain the most recent data from my Joomla site.

The aim was to find the list of people who had bought software or services from me. Among other things, I needed their first name, family name, billing address, etc. so that I could create an invoice in Microsoft Word using the mail merge functionality (data source=Excel).

Real world use case

Oh, wait, so a web page that would execute a SQL query of the type SELECT ... FROM ... WHERE ... against the Joomla database, retrieve the records then display them in an HTML page so Excel can link the table and Word can retrieve them and generate f.i. pdf. Cool, isn't it?

Of course, just running a query on your database and show the result as a web page can be really useful.

FTP - Remove files and folders at light speed

2 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

FTP - Remove files and folders at light speed

Have you ever deleted a website from your FTP client? It's easy, just select the folder containing the website and press the delete key.

Easy, simple and ... so slow. It takes ages to suppress files / folders. Several dozen minutes! Ouch.

If you've a SSH connection to your web server and if you're comfortable with it; you can rm -rf the folder and it'll be done in seconds.

But what if you don't have SSH or fear to make errors?

There is an alternative, the erase.php script.

Joomla - delete tables from your database according to a certain prefix

2 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Joomla : delete tables from your database according to a certain prefix

A recent post on the Joomla French forum was asking for being able to delete tables present in the Joomla database; the ones using a given prefix like old_ or something like that.

Indeed, from time to time, it can be useful to take a look on the list of tables in your database and perhaps, you'll find tables prefixed with f.i. old_ or an old tool you've used years ago (using the correct prefix but with a component you've removed since like joomla_oldcomp).

Years ago, I've written such PHP utility, let's see how to use it.

Create your Joomla website using Docker

25 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Create your Joomla website using Docker

  • Updated 2024-03-23, adding health condition in yml and update Joomla tag to 5.1-php8.2-apache.

In this article, we will learn how to use Docker to install Joomla on your localhost and start a new website in seconds (don't want to wait? Jump to the "Final docker-compose.yml" chapter).

I will use a Linux console (I'm running WSL on my Windows computer and I have chosen Ubuntu for my distribution) but since Docker can also be used on Windows, you can perfectly run, exactly, the same commands in an MS-DOS / Powershell console.

Update php.ini when using a Docker image

3 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Update php.ini when using a Docker image

This article aims to answer the following situation: I'm using a Docker image to run my website and I should modify the php.ini file; how do I do this?

A real-world example is: you've followed my article Create your Joomla website using Docker and everything is working fine. The website is running and you wish, using the Joomla administration web interface, upload a big file to your site. But, then, you get an error The selected file cannot be transferred because it is larger than the maximum upload size allowed.

FrankenPHP, a modern application server for PHP

4 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

FrankenPHP

Version updated on November 21, 2023 after a discussion with Alexandre about making his Docker image available on hub.docker.com

Based on their documentation, FrankenPHP is 3.5 faster than PHP FPM.

It is still fairly young for use on production sites, but because it's so promising, it's certainly worth playing with when developing locally.

Alexandre Elis茅 has written a script to use FrankenPHP with Joomla. You can find the source here: https://github.com/alexandreelise/frankenphp-joomla.