Search…

X3 Photo Gallery Support Forums

Search…
 
sp0
Topic Author
Posts: 11
Joined: 14 Feb 2021, 14:23

Ubuntu installation questions

16 Feb 2021, 05:43

I have set up X3 on a DigitalOcean instance under Ubuntu 20, PHP 7.4.  

I have fixed several things and the site still seems to run ok, but am stuck on these warnings in the diagnostics page:
  • Mod Headers: Undetectable
  • Default Timezone: Not specified
The timezone is set in Linux as UTC.

I found that the installation requirements in the documentation were incomplete and perhaps I have missed another thing or two.  Beyond the requirements in the documentation ("Standard PHP extensions, including [color=var(--primary-color)]GD[/color] (image resizing) and [color=var(--primary-color)]Mcrypt[/color] (login encryption)") I found that I needed to:
  • install php7.4-mbstring (without this I just got a spinning circle on the main page)
  • enable mod_rewrite (AllowOverride All in Apache; a2enmod rewrite)
  • I also added php-7.4-curl and php-zip for installation and testing
I'd be interested to know how I can fix the warnings; and if anyone has further instructions for installation I'd appreciate that.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12765
Joined: 30 Sep 2006, 03:37

Re: Ubuntu installation questions

16 Feb 2021, 07:38

sp0 wrote:I have fixed several things and the site still seems to run ok, but am stuck on these warnings in the diagnostics page:
  • Mod Headers: Undetectable
  • Default Timezone: Not specified
We test for many things in X3 diagnostics, so that it's easier to diagnose actual problems when they happen. Depending on how PHP is installed on your server, some things like "Mod Headers" can't be detected so there is not much more we can do on our side. Mod headers are not required to run X3, and that's why there are no "warnings" from X3 if you get this feature as "Undetectable". However, you would want mod_headers to work properly if you want your server to assign cache-headers to file output ... You can simply check that by loading an image with browser network inspector open, and see if cache headers are assigned.
sp0 wrote:The timezone is set in Linux as UTC.
Timezone is not crucial either for X3, but if you have not assigned it in PHP, you might get PHP warnings. Besides, it's not your "Linux" timezone that is missing ... Timezone should be defined in your PHP ini config. X3 diagnostics just reports when it's not set.
https://stackoverflow.com/questions/322 ... p-ini-file
sp0 wrote:I found that the installation requirements in the documentation were incomplete and perhaps I have missed another thing or two.  Beyond the requirements in the documentation ("Standard PHP extensions, including [color=var(--primary-color)]GD[/color] (image resizing) and [color=var(--primary-color)]Mcrypt[/color] (login encryption)") I found that I needed to:
  • install php7.4-mbstring (without this I just got a spinning circle on the main page)
  • enable mod_rewrite (AllowOverride All in Apache; a2enmod rewrite)
  • I also added php-7.4-curl and php-zip for installation and testing
Sure, but we already test for mod_rewrite and mb_string in diagnostics. All these extensions (mbstring, mod_rewrite, curl and zipArchive) should part of default PHP installations, but I guess you installed a minimum version.
sp0 wrote:I'd be interested to know how I can fix the warnings; and if anyone has further instructions for installation I'd appreciate that.
If your only warnings are mod_header and timezone, they not not critical. You can resolve the timezone by adding a default timezone definition to your PHP. As for mod_header, is it installed? If not install it. If it's installed, and you have checked, then you can ignore "Undetectable" ... It just means we can't detect it in PHP.
 
sp0
Topic Author
Posts: 11
Joined: 14 Feb 2021, 14:23

Re: Ubuntu installation questions

16 Feb 2021, 07:53

OK, thanks, both warnings are gone.  For future readers, what I did was:
  • sudo a2enmod headers
  • edit php.ini and change timezone to "Europe/London" (I had wrongly assumed it would pick that up from the Ubuntu environment)
In terms of whether I did a "minimum" install, no, I just followed the guide to building a standard LAMP server here and did
  sudo apt install php libapache2-mod-php php-mysql
which I now understand didn't bring everything in.

All seems to be working ok now.  Very promising.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12765
Joined: 30 Sep 2006, 03:37

Re: Ubuntu installation questions

16 Feb 2021, 09:04

Good job! Thanks for feedback  :star: