• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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