OSRM: Profile profiles/car.lua not found

So you build OSRM map routing server and attempt to run it following the instructions on how to do it, only to see a message:

[error] Profile profiles/car.lua not found!

Well… You shouldn’t leave the “osrm-backend” directory. As the message says, OSRM was looking for a certain file in the “profiles” subdirectory of the location where you are now and it couldn’t find one. The chances are that after building and installing OSRM you went to another directory where your OSM map files are stored to test it.

The quickest solution is to simply create a symbolic link to the map file in the “osrm-backend” directory.



Mail log says – connect to example.com / Connection timed out

In your /var/mail/mail.log you see repeating records containing the same text:
(connect to example.com[]:25: Connection timed out)

This means that your system has an outgoing e-mail addressed to a mail account at the example domain, and it is stuck in the outgoing message queue.

It will remain there forever and be re-processed over and over again, unless you manually remove it.

Use the following command to see what the stuck (deferred) emails are:

  • postqueue -p

If you want to see what’s inside the email, do this, replacing the ID, A65961B8BDB, with the actual ID of the message you are interested in:

  • postcat -vq A65961B8BDB

And then, if you still want to get rid of it, just delete it:

  • postsuper -d A65961B8BDB

References: [1],[2]

PrestaShop: The geolocation database is unavailable.

If you seemingly follow the PrestaShop instructions “In order to use Geolocation, please download this file and extract it (using Winrar or Gzip) into the /app/Resources/geoip/ directory.” and still you get an error message saying “The geolocation database is unavailable.”, you probably misread the instructions.

You are supposed to extract the compressed file under its own name into a directory called “/app/Resources/geoip/” and not “/app/Resources/geoip/directory“.

PrestaShop 404 Not Found

Running PrestaShop you may experience error “404 Not Found” when attempting to connect to the back office.

If running nginx, add the following to your site’s configuration file in sites_enabled:

location /<YOUR_ADMIN_FOLDER>/ {
   if (!-e $request_filename) {
      rewrite ^/.*$ /<YOUR_ADMIN_FOLDER>/index.php last;

Where <YOUR_ADMIN_FOLDER> is your admin directory in Prestashop’s installation path, looking something like “admin563hdsk25”.

If you already see in the configuration file something like this, check if the <YOUR_ADMIN_FOLDER> parameter matches the actual path, as it may be simple leftover from another case.

Apache ignores .htaccess file

If your Apache2 server straight ignores .htaccess files as if they would not be there at all, see if the particular site configuration file has the “AllowOverride All” statement within it’s “Directory” section.

Add the statement and restart/reload the Apache2 server.

Enable SSL for Apache

If you are configuring SSL site with your Apache2 server and everything seems fine, but the server is  stubbornly refusing HTTPS connections, you may have overlooked enabling the SSL module.

Enable SSL with Apache2:

  • sudo a2enmod ssl

Prestashop front page error – too many redirects

A very frustrating feature of Prestashop online store package is it being prone to unexplainable endless redirect loop at the shop front right after successfully completing installation. The admin access is working just fine, but as soon as you want to see the store, you get an error.

The actual error message will vary depending upon your browser:

  • Firefox:
    The page isn’t redirecting properly
  • Chrome/Vivaldi:
    This page isn’t working
    redirected you too many times.
  • Brave:
    Attempting to load an URL resulted in too many redirects.

It is also extremely irritating, that the shop you initially set up in your test environment works perfectly, but after setting up the same thing on your production server it enters endless redirect loop right after the setup was supposedly successfully completed.

I am calling it a “feature” and not a “bug”, because I can see that it has been around for many years, but nothing was done to fix it, so it is tempting to assume that it is there by design and is supposed to remain there forever. Also it is extremely hard, nearly impossible to find the solution to this unfortunate phenomenon. There is a lot of various cryptic advices online, but next to nothing that would actually work.

Well. Anyway… The problem obviously is the SSL.

It is very likely that your test environment did not use SSL, while the production server does. In order to break out of the redirect loop, you must enable SSL in Prestashop settings, where it is off by default.

In Prestashop 1.6:

  • Go to Preferences -> General -> Enable SSL, switch it from No to Yes.
  • Click the save icon bottom right to save the setting.
  • Go to Preferences -> General -> Enable SSL on all pages, switch it from No to Yes.
  • Click the save icon bottom right to save the setting.

In Prestashop 1.7:

  • Go to CONFIGURE -> Shop Parameters -> General -> Enable SSL, switch it from No to Yes.
  • Click the save icon bottom right to save the setting.
  • Go to CONFIGURE -> Shop Parameters -> General -> Enable SSL on all pages, switch it from No to Yes.
  • Click the save icon bottom right to save the setting.

That is all.

Thanks to Daria Gavrilova at plesk.