Hey all,

My espocrm webgui is showing there's an upgrade available.

I get the following:

# runuser -l www-data -s /bin/bash -c "cd /var/www/espocrm && php command.php upgrade -y"
Current version is 7.2.7.
This may take a while. Do not close the terminal.
Error: Your PHP version (7.4.33) is not supported. Required version: >=8.0.0 <8.3.0.

How can I fix this? Would upgrading PHP work or are there multiple steps?

Thank you!

Jeremy Davis's picture

Thanks for the report. I'll aim to rebuild the EspoCRM appliance with newer PHP asap. I've opened an issue to track this. We'll probably use PHP 8.1.

Once we have released an updated appliance, if you use TKLBAM (or some other way of backing up your EspoCRM install) you could migrate it to the newer version (with newer PHP pre-installed).

In the meantime, you can update the PHP yourself. It's not really hard, but there does seem to be some devil in the detail. FWIW, I've done it myself a few times and it went smoothly, but I know some users have hit issues.

The most recent and relevant thread is probably this one. It is specifically related to use of FastCGI (rather than mod_php - like we use on LAMP and LAMP based apps) - but generally the theory is the same (although you may need to double check that the right PHP version of mod_php is installed and enabled). That thread in turn has links to other threads that discuss upgrading PHP too.

If you do have a go yourself, firstly, I recommend that you take a snapshot of your server before starting. Then worst case you can roll back. I recommend a backup too, but in this instance a snapshot will make a full rollback quicker and easier. Also, it's probably best to keep posting in this thread, but if you hit any issues, please link to the post(s)/thread(s) you've been following and/or note the commands you've run, where you've got to and the issues you've hit (e.g. error messages, specific things that don't work, etc).

I hope that helps. Please do not hesitate to ask if you have any further questions or concerns.

This EspoCRM is my first real use of your TurnKey Linux ecosystem.  I'd like to learn more and will probably wait until you deploy the newer PHP before I move forward.  Are there any guides/video tutorials on how this process would work within this TKL environment?

Thank you!

Jeremy Davis's picture

To create a TurnKey appliance, we pre-install and pre-configure specific software, but under the hood, it's Debian (v16.x = Debian 10/Buster, v17.x = Debian 11/Bullseye). So to upgrade PHP on TurnKey, the process is the same as on Debian. There are lots of details (that are not all strictly required), and we always try to lock things down (which again is recommended, but not strictly required), but in essence the process is relatively straight forward. Obviously "straight forward" is relative, if you're a bit new to Linux, then it may still seem a bit daunting.

If you want a better understanding of the process, I suggest that you try searching youtube for something like "install php 8 debian 11". That should turn up a few tutorials that should give you some insights.

If you have questions, please feel free to ask.

FYI we install an alternate version of PHP, we use a third party apt repository. As a general rule, it's important to be careful of what 3rd party repos you use (adding a malicious repo could cause a whole world of pain). But the PHP backports repo is supplied by a guy called Ondřej Surý. He's a trusted developer who is a member of both the Debian and Ubuntu PHP packaging teams. I'm almost certain that all the tutorials you'll come across on youtube will also use the Sury repo.

One general word of warning though, whilst Ubuntu is also based on Debian, Ubuntu is not binary compatible with Debian (TurnKey is). So whilst often Ubuntu tutorials are close enough to Debian (and therefore TurnKey) to be useful, do not use an apt repo intended for Ubuntu on TurnKey (or Debian). The exception to this rule is if the developer explicitly notes that the software is for both Debian and Ubuntu.

Thanks, Jeremy!  Upgrade complete.

I consider myself a novice Linux user.  I just didn't have a full grasp of the TKL capabilities.

I run the TKL EspoCRM on a Proxmox server.  The webhooks you have in TKL are just for online backup (or migration)...correct?  Besides that, there's no additional function...correct?

Thank you for the help!

Jeremy Davis's picture

Great work! Glad to hear you worked that out! :)

Sorry, but I'm not completely clear what you mean when you say "webhooks"? Your mention of backup makes me think that you might be talking about the first boot scripts? (The series of questions when you first boot). If so, then I'm guessing that you mean the "Link to Hub" (or similar words to the same effect) step. If so, then yes you are right. The Hub does also provide a dynamic DNS service, but the question on firstboot is explicitly related to remote Backups.

So if you are just testing, your data isn't important and/or you already have an offsite backup regime, then you can safely skip that step. If you change your mind later and do wish to use TKLBAM (our built in backup and data migration tool) then you can still create a Hub account and link your server like this (you'll need to copy/paste your Hub API key from your user profile page):


I hope that answers your question. If I missed the mark, please feel free to try again.

Yes, you got the gist of what I was asking.

I appreciate you're work and the time you took to answer my questions.

Take care!

Jeremy Davis's picture

You're welcome and thanks for your kind words.

Please don't hesitate to post back with any further questions or feedback you have for us.

Feedback from users is really important for us, especially bug reports and hearing of pain points. We can't always promise to address them all, especially not quickly but they are always taken on board. I can usually assist you to work around issues (or redirect you to those who might) if nothing else.

Add new comment