Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.29k stars 2.74k forks source link

Served source code instead of web page #29053

Closed moiri-gamboni closed 5 months ago

moiri-gamboni commented 6 months ago

Bug

When I navigate to http://localhost/dolibarr/, I am served the code itself, not a web page.

Dolibarr Version

19.0.1

Environment PHP

8.1.2

Environment Database

install script mentions MySQL

Steps to reproduce the behavior and expected behavior

Hi all, I did a fresh install of Dolibarr on Ubuntu 22.04 from the deb file, following the online instructions. First, I had to manually start the apache2 service, since the instruction to run systemctl reload apache2 returned apache2.service is not active, cannot reload.. This resolved a ERR_CONNECTION_REFUSED I was getting when navigating to http://localhost/dolibarr/. However, I am still unable to complete the setup, as when I open this page I am now served with source code. See attached file for the text I'm getting. I see no logs in /var/lib/dolibarr or /etc/dolibarr, I'm not sure where else to check. I see no errors in the dev tools console. Thanks in advance for your help

Attached files

text I am seeing

ksar-ksar commented 6 months ago

Hello,

It's because PHP is not enabled on Apache.

The .deb of dolibarr check only dependencies, not that these dependencies are correctly configured. You should first run this kind of tutorial : https://www.digitalocean.com/community/tutorials/how-to-install-lamp-stack-on-ubuntu Before launching the dolibarr DEB.

moiri-gamboni commented 5 months ago

Hi, Thanks for the link. I managed to get it working after a bit of wrangling. I had to install some extensions, notably imap which is not listed in https://wiki.dolibarr.org/index.php/Dependencies_and_external_libraries. For good measure I also installed gd, curl, and intl since they were listed on that page, even though the install setup wasn't listing an error like for IMAP. Maybe the installation page on https://wiki.dolibarr.org/index.php?title=Dolibarr_for_Ubuntu_or_Debian should be updated, as currently it falsely states:

"Dolibarr for Ubuntu or Debian (DoliDeb) is a version of Dolibarr ERP/CRM, packaged with Mysql, PHP and Apache or Lighttpd, with an automatic installer for Ubuntu or Debian users that don't have any technical knowledge.

In a few seconds, after installing this package, you are able to work on Dolibarr, even if you don't have already a web server or if you don't know what is Apache/Lighttpd, Mysql or PHP. Everything is installed for you."