• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue Dolibarr Fatal error: Cannot declare class Contact, because the name is already in use

sandraolt

New Pleskian
Server operating system version
Ubuntu 22.04.5 LTS
Plesk version and microupdate number
18.0.64
Hello,
I have been attempting to install Dolibarr on my site.

Fatal error: Cannot declare class Contact, because the name is already in use in /var/www/vhosts/*****/httpdocs/contact/class/contact.class.php on line 44

I keep getting the above error in Step 5. I’m not sure how to solve the problem. I did find a similar issue in the French dolibarr forum (I used google translate to read it), and I have included the link; however, they never posted how it was resolved.

I posted in the Dolibarr forum Step 5 - Fatal error: Cannot declare class Contact
Their response is that I should ask here, as they firmly believe this is a Plesk/php issue.

Plesk Obsidian 18.0.64 Update #1 Web Host Edition
OS - Ubuntu 22.04.5 LTS
MariaDB - 10.6.18
PHP vs - 8.2.25
Server API CGI/FastCGI

I have no idea what is causing this problem, and I would appreciate some help resolving it.
 
Hi!

To be honest, I am not familiar with Dolibarr, but could you please provide a link to the document with the steps, especially step #5, you are referring to?
 
Sorry for the long delay. Only right now do I have free time to test Dolibarr and the installation process.

To make a long story short, I did not face any issues and could install Dolibarr in less than 15 minutes.

Here are the steps I did:
  • Created a new domain in Plesk
  • Downloaded v20.0.2 (latest) from Releases · Dolibarr/dolibarr
  • Uploaded the file "dolibarr-20.0.2.zip" into the subscription's home directory, unzip the archive
  • Moved the "htdocs" content into "httpdocs" ("httpdocs" is the directory Plesk uses).
1733232897033.png

  • A quick check showed that everything is ok except the "PHP is too high" warning; I changed the PHP version to 8.2.x
1733232916379.png

  • Created a database in Plesk for Dolibarr
  • Step 1
1733232948443.png

  • Continued the installation process until it was finished, step by step,
  • Step 2
1733233067020.png

  • Step 3 is missed ¯\_(ツ)_/¯
  • Step 4
1733233131928.png


  • Step 5
1733233206222.png

  • Opened the Dolibarr interface when the installation was finished
1733233281095.png


I hope it will help users who decide to host Dolibarr on top of a server with Plesk.
 

Attachments

  • 1733233086286.png
    1733233086286.png
    169.6 KB · Views: 4
Hello,

Thank you for all of your help on this.
What I have been wondering is whether there might be a package missing on my Plesk, or something to that effect.

Right now I have:
(from my php.ini)

Ubuntu SMP Build Thu May 23 07:48:21 UTC 2024 x86_64
PHP Version 8.2.26

Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /opt/plesk/php/8.2/etc

PHP API 20220829
PHP Extension 20220829

Zend Extension 420220829
Zend Extension Build API420220829,NTS

PHP Extension Build API20220829,NTS
Debug Build no
Thread Safety disabled

Zend Signal Handling enabled
Zend Memory Manager enabled
Zend Multibyte Support provided by mbstring
Zend Max Execution Timers disabled
IPv6 Support enabled
DTrace Support disabled

Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Registered Stream Filters zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk
 
Back
Top