We love curl
Urania Logico - curl EN techWe just love curl
and I want to tell you the funny story about how it helped me with an issue experienced with Aruba services.
The issue
So, I was updating a Moodle learning platform for my client when I forgot to update the version of php first. I know, my mistake. Then there was a clear error message when I tried to access the website:
Moodle 4.4 or later requires at least PHP 8.1 (currently using version 8.0.30). Some servers may have multiple PHP versions installed, are you using the correct executable?
Matter of a cuple of minutes, I access the admin area, updated php, the software, the plugins and everything. Moodle was supposed to be available, but when I tried to access the website the error was still there. But hard refreshing with Ctrl+Shift+R didn’t show any error.
The update was ok, but I messed something with cache.
*panicking.php*
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣤⣄⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢀⣠⣴⠞⠛⠉⠉⠉⠈⠈⠉⠉⠛⠷⣦⣄⡀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢀⣴⠟⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢻⣦⡀⠀⠀⠀
⠀⠀⢀⣴⡟⠁⠀⡀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⡀⠀⢀⠀⡀⠘⢷⣆⠀⠀
⠀⢀⣾⠏⢀⠈⢄⣀⣀⡀⠐⠀⠀⠄⠀⠀⠠⠀⠀⣀⣀⣀⡀⠂⠄⢻⣆⠀
⠀⣾⡏⡐⣦⠿⠛⣉⡉⠛⢷⣤⠈⠀⠠⢁⢀⣶⠟⠛⣉⡙⠻⢷⣌⠌⢿⡆
⢰⣿⢂⣽⠋⣴⣿⣿⣿⣷⡄⢹⣧⠈⡐⢠⣿⢃⣴⣿⣿⣿⣷⡈⢿⡜⣸⣧
⢸⣿⠤⣿⡘⣿⣿⣿⣿⣿⡟⢠⣿⠀⡐⢸⣧⠸⣿⣿⣿⣿⣿⡇⢸⡗⣼⡗
⠘⣿⡆⡹⣧⡙⠻⠿⠿⠛⢁⣼⠃⢄⠡⠂⢻⣆⠙⠿⠿⠿⠋⣠⡿⢱⣸⡇
⠀⢹⣷⢡⠎⡛⠷⠶⠶⠞⡛⠡⡈⠤⠑⡌⢠⠘⠻⠶⠶⠶⢞⢫⡐⢧⡿⠁
⠀⠀⢻⣷⡜⡰⠣⠜⣠⠓⢄⠣⢘⠠⢃⠌⡂⢍⢢⠱⣈⠎⢆⠦⣹⣿⠃⠀
⠀⠀⠀⠹⣿⣜⠥⣋⠴⣈⠆⣿⣷⣿⣶⣿⣾⡆⢎⠴⣡⢚⣬⣾⠿⠁⠀⠀
⠀⠀⠀⠀⠈⠙⠷⣎⡶⣡⠚⣤⢃⠖⡰⢢⠱⡘⣬⢒⣵⡾⠟⠁⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠈⠙⠓⠻⢦⣯⣞⣥⣧⡷⠿⠞⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
*lovemyjob.sh*
Cache cache cache
Since with curl -vL -H 'Cache-Control: no-cache' mywebsite.it
the website was properly functioning, I deleted all the cache from Moodle. BUT, it still gave me that error.
Another exquisite feature of curl is that you can check headers.
curl -vL mywebsite.it
< HTTP/2 200
< server: aruba-proxy
< date: Mon, 06 Jan 2025 16:45:56 GMT
< content-type: text/html; charset=UTF-8
< vary: Accept-Encoding
< x-servername: webx.aruba.it
< x-aruba-cache: HIT
< alt-svc: h3=":443"; ma=86400
< Moodle 4.4 or later requires at least PHP 8.1 (currently using version 8.0.30).
Some servers may have multiple PHP versions installed, are you using the correct executable?
We can see that there is Aruba cache involved.
With the option 'Cache-Control: no-cache'
the header was x-aruba-cache: BYPASS
.
Solution
Finally, I only had to find the cache in Aruba interface and delete it. It was a funny experience because I knew something with the cache was wrong, but it was curl
that helped understanding which one.
Such a powerful tool!
This was the interface I had to use.